Package org.gitlab4j.api.utils
Class Oauth2LoginStreamingOutput
- java.lang.Object
-
- org.gitlab4j.api.utils.Oauth2LoginStreamingOutput
-
- All Implemented Interfaces:
jakarta.ws.rs.core.StreamingOutput
,java.lang.AutoCloseable
public class Oauth2LoginStreamingOutput extends java.lang.Object implements jakarta.ws.rs.core.StreamingOutput, java.lang.AutoCloseable
This StreamingOutput implementation is utilized to send a OAuth2 token request in a secure manner. The password is never copied to a String, instead it is contained in a SecretString that is cleared when an instance of this class is finalized.
-
-
Constructor Summary
Constructors Constructor Description Oauth2LoginStreamingOutput(java.lang.String username, char[] password)
Oauth2LoginStreamingOutput(java.lang.String username, java.lang.CharSequence password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPassword()
Clears the contained password's data.void
close()
void
finalize()
void
write(java.io.OutputStream output)
-
-
-
Method Detail
-
write
public void write(java.io.OutputStream output) throws java.io.IOException, jakarta.ws.rs.WebApplicationException
- Specified by:
write
in interfacejakarta.ws.rs.core.StreamingOutput
- Throws:
java.io.IOException
jakarta.ws.rs.WebApplicationException
-
clearPassword
public void clearPassword()
Clears the contained password's data.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
finalize
public void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-