Class 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 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 interface javax.ws.rs.core.StreamingOutput
        Throws:
        IOException
        javax.ws.rs.WebApplicationException
      • clearPassword

        public void clearPassword()
        Clears the contained password's data.