Class SaslDigestCallbackHandler

  • All Implemented Interfaces:
    CallbackHandler
    Direct Known Subclasses:
    SaslClientDigestCallbackHandler

    public abstract class SaslDigestCallbackHandler
    extends Object
    implements CallbackHandler
    Common serialization methods across the client and server callback handlers for SASL. Serialization and deserialization methods must be kept in sync.
    • Constructor Detail

      • SaslDigestCallbackHandler

        public SaslDigestCallbackHandler()
    • Method Detail

      • encodeIdentifier

        public String encodeIdentifier​(byte[] identifier)
        Encode the serialized TokenIdentifier into a String.
        Parameters:
        identifier - The serialized identifier
        See Also:
        decodeIdentifier(String)
      • getPassword

        public <T extends org.apache.hadoop.security.token.TokenIdentifier> char[] getPassword​(org.apache.hadoop.security.token.SecretManager<T> secretManager,
                                                                                               T tokenid)
                                                                                        throws org.apache.hadoop.security.token.SecretManager.InvalidToken
        Generate the password from the provided SecretManager and TokenIdentifier.
        Parameters:
        secretManager - The server SecretManager
        tokenid - The TokenIdentifier from the client
        Throws:
        org.apache.hadoop.security.token.SecretManager.InvalidToken
        See Also:
        encodePassword(byte[])
      • decodeIdentifier

        public byte[] decodeIdentifier​(String identifier)
        Decode the encoded TokenIdentifier into bytes suitable to reconstitute the identifier.
        Parameters:
        identifier - The encoded, serialized TokenIdentifier
        See Also:
        encodeIdentifier(byte[])