SaltedAuthenticationInfo

Interface representing account information that may use a salt when hashing credentials. This interface exists primarily to support environments that hash user credentials (e.g. passwords). <p/> Salts should typically be generated from a secure pseudo-random number generator so they are effectively impossible to guess. The salt value should be safely stored along side the account information to ensure it is maintained along with the account's credentials. <p/> This interface exists as a way for Shiro to acquire that salt so it can correctly perform {@link hunt.shiro.authc.credential.CredentialsMatcher credentials matching} during login attempts. See the {@link hunt.shiro.authc.credential.HashedCredentialsMatcher HashedCredentialsMatcher} JavaDoc for more information on hashing credentials with salts.

@see hunt.shiro.authc.credential.HashedCredentialsMatcher

interface SaltedAuthenticationInfo : AuthenticationInfo {}

Members

Functions

getCredentialsSalt
ByteSource getCredentialsSalt()

Returns the salt used to salt the account's credentials or {@code null} if no salt was used.

Inherited Members

From AuthenticationInfo

getPrincipals
PrincipalCollection getPrincipals()

Returns all principals associated with the corresponding Subject. Each principal is an identifying piece of information useful to the application such as a username, or user id, a given name, etc - anything useful to the application to identify the current <code>Subject</code>. <p/> The returned PrincipalCollection should <em>not</em> contain any credentials used to verify principals, such as passwords, private keys, etc. Those should be instead returned by {@link #getCredentials() getCredentials()}.

getCredentials
Object getCredentials()

Returns the credentials associated with the corresponding Subject. A credential verifies one or more of the {@link #getPrincipals() principals} associated with the Subject, such as a password or private key. Credentials are used by Shiro particularly during the authentication process to ensure that submitted credentials during a login attempt match exactly the credentials here in the <code>AuthenticationInfo</code> instance.

Meta