/** * The same functionality with {@link #retrievePassword}, except that this * method can throw a {@link RetriableException} or a {@link StandbyException} * to indicate that client can retry/failover the same operation because of * temporary issue on the server side. * * @param identifier the identifier to validate * @return the password to use * @throws InvalidToken the token was invalid * @throws StandbyException the server is in standby state, the client can * try other servers * @throws RetriableException the token was invalid, and the server thinks * this may be a temporary issue and suggests the client to retry * @throws IOException to allow future exceptions to be added without breaking * compatibility */ public byte[] retriableRetrievePassword(T identifier) throws InvalidToken, StandbyException, RetriableException, IOException { return retrievePassword(identifier); }
private char[] getPassword(TokenIdentifier tokenid) throws InvalidToken { return SaslUtil.encodePassword(secretManager.retrievePassword(tokenid)); }
/** * Generate the password from the provided {@link SecretManager} and {@link TokenIdentifier}. * * @param secretManager * 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)); }
/** * The same functionality with {@link #retrievePassword}, except that this * method can throw a {@link RetriableException} or a {@link StandbyException} * to indicate that client can retry/failover the same operation because of * temporary issue on the server side. * * @param identifier the identifier to validate * @return the password to use * @throws InvalidToken the token was invalid * @throws StandbyException the server is in standby state, the client can * try other servers * @throws RetriableException the token was invalid, and the server thinks * this may be a temporary issue and suggests the client to retry * @throws IOException to allow future exceptions to be added without breaking * compatibility */ public byte[] retriableRetrievePassword(T identifier) throws InvalidToken, StandbyException, RetriableException, IOException { return retrievePassword(identifier); }
/** * The same functionality with {@link #retrievePassword}, except that this * method can throw a {@link RetriableException} or a {@link StandbyException} * to indicate that client can retry/failover the same operation because of * temporary issue on the server side. * * @param identifier the identifier to validate * @return the password to use * @throws InvalidToken the token was invalid * @throws StandbyException the server is in standby state, the client can * try other servers * @throws RetriableException the token was invalid, and the server thinks * this may be a temporary issue and suggests the client to retry * @throws IOException to allow future exceptions to be added without breaking * compatibility */ public byte[] retriableRetrievePassword(T identifier) throws InvalidToken, StandbyException, RetriableException, IOException { return retrievePassword(identifier); }
/** * The same functionality with {@link #retrievePassword}, except that this * method can throw a {@link RetriableException} or a {@link StandbyException} * to indicate that client can retry/failover the same operation because of * temporary issue on the server side. * * @param identifier the identifier to validate * @return the password to use * @throws InvalidToken the token was invalid * @throws StandbyException the server is in standby state, the client can * try other servers * @throws RetriableException the token was invalid, and the server thinks * this may be a temporary issue and suggests the client to retry * @throws IOException to allow future exceptions to be added without breaking * compatibility */ public byte[] retriableRetrievePassword(T identifier) throws InvalidToken, StandbyException, RetriableException, IOException { return retrievePassword(identifier); }
/** * The same functionality with {@link #retrievePassword}, except that this * method can throw a {@link RetriableException} or a {@link StandbyException} * to indicate that client can retry/failover the same operation because of * temporary issue on the server side. * * @param identifier the identifier to validate * @return the password to use * @throws InvalidToken the token was invalid * @throws StandbyException the server is in standby state, the client can * try other servers * @throws RetriableException the token was invalid, and the server thinks * this may be a temporary issue and suggests the client to retry * @throws IOException to allow future exceptions to be added without breaking * compatibility */ public byte[] retriableRetrievePassword(T identifier) throws InvalidToken, StandbyException, RetriableException, IOException { return retrievePassword(identifier); }
/** * Generate the password from the provided {@link SecretManager} and {@link TokenIdentifier}. * * @param secretManager * 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)); }
private char[] getPassword(TokenIdentifier tokenid) throws InvalidToken { return SaslUtil.encodePassword(secretManager.retrievePassword(tokenid)); }