Class AuthenticatorUtils
java.lang.Object
org.keycloak.authentication.authenticators.util.AuthenticatorUtils
- Author:
 - Vaclav Muzikar <vmuzikar@redhat.com>
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic voiddummyHash(AuthenticationFlowContext context) This method exists to simulate hashing of some "dummy" password.static StringgetDisabledByBruteForceEventError(AuthenticationFlowContext authnFlowContext, UserModel authenticatedUser) static StringgetDisabledByBruteForceEventError(BruteForceProtector protector, KeycloakSession session, RealmModel realm, UserModel user) Get all completed authenticator executions from the user session notes.static voidupdateCompletedExecutions(AuthenticationSessionModel authSession, UserSessionModel userSession, String executionId) Update the completed authenticators note on the new auth session 
- 
Constructor Details
- 
AuthenticatorUtils
public AuthenticatorUtils() 
 - 
 - 
Method Details
- 
getDisabledByBruteForceEventError
public static String getDisabledByBruteForceEventError(BruteForceProtector protector, KeycloakSession session, RealmModel realm, UserModel user)  - 
getDisabledByBruteForceEventError
public static String getDisabledByBruteForceEventError(AuthenticationFlowContext authnFlowContext, UserModel authenticatedUser)  - 
dummyHash
This method exists to simulate hashing of some "dummy" password. The purpose is to make the user enumeration harder, so the authentication request with non-existing username also need to simulate the password hashing overhead and takes same time like the request with existing username, but incorrect password.- Parameters:
 context-
 - 
parseCompletedExecutions
Get all completed authenticator executions from the user session notes.- Parameters:
 note- The serialized note value to parse- Returns:
 - A list of execution ids that were successfully completed to create this authentication session
 
 - 
updateCompletedExecutions
public static void updateCompletedExecutions(AuthenticationSessionModel authSession, UserSessionModel userSession, String executionId) Update the completed authenticators note on the new auth session- Parameters:
 authSession- The current authentication sessionuserSession- The previous user sessionexecutionId- The completed execution id
 
 -