Package org.gitlab4j.api.utils
Class Oauth2LoginStreamingOutput
- java.lang.Object
-
- org.gitlab4j.api.utils.Oauth2LoginStreamingOutput
-
- All Implemented Interfaces:
AutoCloseable
,javax.ws.rs.core.StreamingOutput
public class Oauth2LoginStreamingOutput extends Object implements javax.ws.rs.core.StreamingOutput, 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(String username, char[] password)
Oauth2LoginStreamingOutput(String username, CharSequence password)
-
-
-
Constructor Detail
-
Oauth2LoginStreamingOutput
public Oauth2LoginStreamingOutput(String username, CharSequence password)
-
Oauth2LoginStreamingOutput
public Oauth2LoginStreamingOutput(String username, char[] password)
-
-
Method Detail
-
write
public void write(OutputStream output) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
write
in interfacejavax.ws.rs.core.StreamingOutput
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
clearPassword
public void clearPassword()
Clears the contained password's data.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-