Returns the key under which {@link AuthenticationInfo} instances are cached if authentication caching is enabled.
This implementation delegates to
{@link #getAvailablePrincipal(hunt.shiro.subject.PrincipalCollection)}, which returns the primary principal
associated with this particular Realm.
<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 that this method returns the same value as the
{@link #getAuthenticationCacheKey(hunt.shiro.authc.AuthenticationToken)} method!
@param principals the principals of the account for which to set or remove cached {@code AuthenticationInfo}.
@return the cache key to use when looking up cached {@link AuthenticationInfo} instances.
Returns the key under which {@link AuthenticationInfo} instances are cached if authentication caching is enabled. This implementation delegates to {@link #getAvailablePrincipal(hunt.shiro.subject.PrincipalCollection)}, which returns the primary principal associated with this particular Realm. <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 that this method returns the same value as the {@link #getAuthenticationCacheKey(hunt.shiro.authc.AuthenticationToken)} method!
@param principals the principals of the account for which to set or remove cached {@code AuthenticationInfo}. @return the cache key to use when looking up cached {@link AuthenticationInfo} instances.