Interface AuthenticationProcessor
-
public interface AuthenticationProcessor
Utility methods processing results of authenticators.- Author:
- K. Benedyczak
-
-
Method Summary
-
-
-
Method Detail
-
getValidAuthenticatorForEntity
AuthenticatorInstance getValidAuthenticatorForEntity(Collection<AuthenticatorInstance> pool, long entityId)
- Returns:
- authenticator which is valid for the given entity from the given pool
-
checkIfUserHasCredential
boolean checkIfUserHasCredential(AuthenticatorInstanceMetadata authn, long entityId)
- Returns:
- true only if user can use the given authenticator. Works well (currently) only for local authenticators
-
processPrimaryAuthnResult
PartialAuthnState processPrimaryAuthnResult(AuthenticationResult result, AuthenticationFlow authenticationFlow, AuthenticationOptionKey authnOptionId) throws AuthenticationException
Starting point: the result of the primary authenticator is verified. If the authentication failed then an exception is thrown. Otherwise it is checked whether, according to theAuthenticationFlow
selected, second authentication should be performed, what is returned.- Throws:
AuthenticationException
-
finalizeAfterPrimaryAuthentication
AuthenticatedEntity finalizeAfterPrimaryAuthentication(PartialAuthnState state, boolean skipSecondFactor)
Should be used if the second step authentication is not required: retrieve a finalAuthenticatedEntity
.
-
finalizeAfterSecondaryAuthentication
AuthenticatedEntity finalizeAfterSecondaryAuthentication(PartialAuthnState state, AuthenticationResult result2) throws AuthenticationException
Should be used if the second step authentication is required to process second authenticator results and retrieve a finalAuthenticatedEntity
.- Parameters:
primaryResult
-- Returns:
- Throws:
AuthenticationException
-
extractParticipants
static List<SessionParticipant> extractParticipants(AuthenticationResult... results)
Extracts and returns all remoteSessionParticipant
s from theAuthenticationResult
s.
-
-