ModularRealmAuthenticator.doAuthenticate

Attempts to authenticate the given token by iterating over the internal collection of {@link Realm}s. For each realm, first the {@link Realm#supports(hunt.shiro.authc.AuthenticationToken)} method will be called to determine if the realm supports the {@code authenticationToken} method argument. <p/> If a realm does support the token, its {@link Realm#getAuthenticationInfo(hunt.shiro.authc.AuthenticationToken)} method will be called. If the realm returns a non-null account, the token will be considered authenticated for that realm and the account data recorded. If the realm returns {@code null}, the next realm will be consulted. If no realms support the token or all supporting realms return null, an {@link AuthenticationException} will be thrown to indicate that the user could not be authenticated. <p/> After all realms have been consulted, the information from each realm is aggregated into a single {@link AuthenticationInfo} object and returned.

@param authenticationToken the token containing the authentication principal and credentials for the user being authenticated. @return account information attributed to the authenticated user. @throws IllegalStateException if no realms have been configured at the time this method is invoked @throws AuthenticationException if the user could not be authenticated or the user is denied authentication for the given principal and credentials.

class ModularRealmAuthenticator
protected override
doAuthenticate

Meta