Default no-argument constructor.
Constructor that takes in a single 'primary' principal of the account and its corresponding credentials, associated with the specified realm. <p/> This is a convenience constructor and will construct a {@link PrincipalCollection PrincipalCollection} based on the {@code principal} and {@code realmName} argument.
Constructor that takes in a single 'primary' principal of the account, its corresponding hashed credentials, the salt used to hash the credentials, and the name of the realm to associate with the principals. <p/> This is a convenience constructor and will construct a {@link PrincipalCollection PrincipalCollection} based on the <code>principal</code> and <code>realmName</code> argument.
Constructor that takes in an account's identifying principal(s) and its corresponding credentials that verify the principals.
Constructor that takes in an account's identifying principal(s), hashed credentials used to verify the principals, and the salt used when hashing the credentials.
Returns the salt used to hash the credentials, or {@code null} if no salt was used or credentials were not hashed at all. <p/> Note that this attribute is <em>NOT</em> handled in the {@link #merge(AuthenticationInfo) merge} method - a hash salt is only useful within a single realm (as each realm will perform it's own Credentials Matching logic), and once finished in that realm, Shiro has no further use for salts. Therefore it doesn't make sense to 'merge' salts in a multi-realm scenario.
Takes the specified <code>info</code> argument and adds its principals and credentials into this instance.
Returns <code>true</code> if the Object argument is an <code>instanceof SimpleAuthenticationInfo</code> and its {@link #getPrincipals() principals} are equal to this instance's principals, <code>false</code> otherwise.
Sets the credentials that verify the principals/identity of the associated Realm account.
Sets the salt used to hash the credentials, or {@code null} if no salt was used or credentials were not hashed at all. <p/> Note that this attribute is <em>NOT</em> handled in the {@link #merge(AuthenticationInfo) merge} method - a hash salt is only useful within a single realm (as each realm will perform it's own Credentials Matching logic), and once finished in that realm, Shiro has no further use for salts. Therefore it doesn't make sense to 'merge' salts in a multi-realm scenario.
Sets the identifying principal(s) represented by this instance.
Returns the hashcode of the internal {@link #getPrincipals() principals} instance.
Simple implementation that merely returns <code>{@link #getPrincipals() principals}.toString()</code>
The credentials verifying the account principals.
Any salt used in hashing the credentials.
The principals identifying the account associated with this AuthenticationInfo instance.
Merges the given {@link AuthenticationInfo} into this instance. The specific way that the merge occurs is up to the implementation, but typically it involves combining the principals and credentials together in this instance. The <code>info</code> argument should not be modified in any way.
Returns the salt used to salt the account's credentials or {@code null} if no salt was used.
Simple implementation of the {@link hunt.shiro.authc.MergableAuthenticationInfo} interface that holds the principals and credentials.
@see hunt.shiro.realm.AuthenticatingRealm