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)
-
Method Summary
Modifier and Type Method Description void
clearPassword()
Clears the contained password's data.void
close()
void
finalize()
void
write(OutputStream output)
-
Constructor Details
-
Oauth2LoginStreamingOutput
-
Oauth2LoginStreamingOutput
-
-
Method Details
-
write
- 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
-
finalize
-