Class 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.
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Oauth2LoginStreamingOutput

        public Oauth2LoginStreamingOutput​(java.lang.String username,
                                          java.lang.CharSequence password)
      • Oauth2LoginStreamingOutput

        public Oauth2LoginStreamingOutput​(java.lang.String username,
                                          char[] password)
    • Method Detail

      • write

        public void write​(java.io.OutputStream output)
                   throws java.io.IOException,
                          jakarta.ws.rs.WebApplicationException
        Specified by:
        write in interface jakarta.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 interface java.lang.AutoCloseable
      • finalize

        public void finalize()
                      throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable