Class PlainCallbackHandler

  • All Implemented Interfaces:
    javax.security.auth.callback.CallbackHandler

    public class PlainCallbackHandler
    extends java.lang.Object
    implements javax.security.auth.callback.CallbackHandler
    Callback handler for doing plain auth.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private char[] password  
      private java.lang.String username  
    • Constructor Summary

      Constructors 
      Constructor Description
      PlainCallbackHandler​(java.lang.String u, java.lang.String p)
      Construct a plain callback handler with the given username and password.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handle​(javax.security.auth.callback.Callback[] callbacks)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • username

        private final java.lang.String username
      • password

        private final char[] password
    • Constructor Detail

      • PlainCallbackHandler

        public PlainCallbackHandler​(java.lang.String u,
                                    java.lang.String p)
        Construct a plain callback handler with the given username and password.
        Parameters:
        u - the username
        p - the password
    • Method Detail

      • handle

        public void handle​(javax.security.auth.callback.Callback[] callbacks)
                    throws java.io.IOException,
                           javax.security.auth.callback.UnsupportedCallbackException
        Specified by:
        handle in interface javax.security.auth.callback.CallbackHandler
        Throws:
        java.io.IOException
        javax.security.auth.callback.UnsupportedCallbackException