Class SecretQuestionAuthenticator
- java.lang.Object
-
- org.keycloak.examples.authenticator.SecretQuestionAuthenticator
-
- All Implemented Interfaces:
Authenticator,CredentialValidator<SecretQuestionCredentialProvider>,Provider
public class SecretQuestionAuthenticator extends Object implements Authenticator, CredentialValidator<SecretQuestionCredentialProvider>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Constructor Summary
Constructors Constructor Description SecretQuestionAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaction(AuthenticationFlowContext context)voidaddCookie(AuthenticationFlowContext context, String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly)voidauthenticate(AuthenticationFlowContext context)voidclose()booleanconfiguredFor(KeycloakSession session, RealmModel realm, UserModel user)SecretQuestionCredentialProvidergetCredentialProvider(KeycloakSession session)List<RequiredActionFactory>getRequiredActions(KeycloakSession session)protected booleanhasCookie(AuthenticationFlowContext context)booleanrequiresUser()protected voidsetCookie(AuthenticationFlowContext context)voidsetRequiredActions(KeycloakSession session, RealmModel realm, UserModel user)protected booleanvalidateAnswer(AuthenticationFlowContext context)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.authentication.Authenticator
areRequiredActionsEnabled
-
Methods inherited from interface org.keycloak.authentication.CredentialValidator
getCredentials, getType
-
-
-
-
Method Detail
-
hasCookie
protected boolean hasCookie(AuthenticationFlowContext context)
-
authenticate
public void authenticate(AuthenticationFlowContext context)
- Specified by:
authenticatein interfaceAuthenticator
-
action
public void action(AuthenticationFlowContext context)
- Specified by:
actionin interfaceAuthenticator
-
setCookie
protected void setCookie(AuthenticationFlowContext context)
-
addCookie
public void addCookie(AuthenticationFlowContext context, String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly)
-
validateAnswer
protected boolean validateAnswer(AuthenticationFlowContext context)
-
requiresUser
public boolean requiresUser()
- Specified by:
requiresUserin interfaceAuthenticator
-
configuredFor
public boolean configuredFor(KeycloakSession session, RealmModel realm, UserModel user)
- Specified by:
configuredForin interfaceAuthenticator
-
setRequiredActions
public void setRequiredActions(KeycloakSession session, RealmModel realm, UserModel user)
- Specified by:
setRequiredActionsin interfaceAuthenticator
-
getRequiredActions
public List<RequiredActionFactory> getRequiredActions(KeycloakSession session)
- Specified by:
getRequiredActionsin interfaceAuthenticator
-
getCredentialProvider
public SecretQuestionCredentialProvider getCredentialProvider(KeycloakSession session)
- Specified by:
getCredentialProviderin interfaceCredentialValidator<SecretQuestionCredentialProvider>
-
-