Returns the key under which {@link AuthenticationInfo} instances are cached if authentication caching is enabled.
This implementation defaults to returning the token's
{@link hunt.shiro.authc.AuthenticationToken#getPrincipal() principal}, which is usually a username in
most applications.
<h3>Cache Invalidation on Logout</h3>
<b>NOTE:</b> If you want to be able to invalidate an account's cached {@code AuthenticationInfo} on logout, you
must ensure the {@link #getAuthenticationCacheKey(hunt.shiro.subject.PrincipalCollection)} method returns
the same value as this method.
@param token the authentication token for which any successful authentication will be cached.
@return the cache key to use to cache the associated {@link AuthenticationInfo} after a successful authentication.
Returns the key under which {@link AuthenticationInfo} instances are cached if authentication caching is enabled. This implementation defaults to returning the token's {@link hunt.shiro.authc.AuthenticationToken#getPrincipal() principal}, which is usually a username in most applications. <h3>Cache Invalidation on Logout</h3> <b>NOTE:</b> If you want to be able to invalidate an account's cached {@code AuthenticationInfo} on logout, you must ensure the {@link #getAuthenticationCacheKey(hunt.shiro.subject.PrincipalCollection)} method returns the same value as this method.
@param token the authentication token for which any successful authentication will be cached. @return the cache key to use to cache the associated {@link AuthenticationInfo} after a successful authentication.