Example usage for org.apache.hadoop.security.token SecretManager retrievePassword

List of usage examples for org.apache.hadoop.security.token SecretManager retrievePassword

Introduction

In this page you can find the example usage for org.apache.hadoop.security.token SecretManager retrievePassword.

Prototype

public abstract byte[] retrievePassword(T identifier) throws InvalidToken;

Source Link

Document

Retrieve the password for the given token identifier.

Usage

From source file:org.apache.accumulo.core.rpc.SaslDigestCallbackHandler.java

License:Apache License

/**
 * Generate the password from the provided {@link SecretManager} and {@link TokenIdentifier}.
 *
 * @param secretManager/* w w  w  .  j ava 2s  .c  o  m*/
 *          The server SecretManager
 * @param tokenid
 *          The TokenIdentifier from the client
 * @see #encodePassword(byte[])
 */
public <T extends TokenIdentifier> char[] getPassword(SecretManager<T> secretManager, T tokenid)
        throws InvalidToken {
    return encodePassword(secretManager.retrievePassword(tokenid));
}