Class AbstractUsernameFormAuthenticator
- java.lang.Object
-
- org.keycloak.authentication.AbstractFormAuthenticator
-
- org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator
-
- All Implemented Interfaces:
org.keycloak.authentication.Authenticator
,org.keycloak.provider.Provider
- Direct Known Subclasses:
BasicAuthAuthenticator
,CliUsernamePasswordAuthenticator
,ConsoleUsernamePasswordAuthenticator
,OTPFormAuthenticator
,SpnegoAuthenticator
,UsernamePasswordForm
public abstract class AbstractUsernameFormAuthenticator extends AbstractFormAuthenticator
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTEMPTED_USERNAME
static String
REGISTRATION_FORM_ACTION
protected static String
USER_SET_BEFORE_USERNAME_PASSWORD_AUTH
-
Constructor Summary
Constructors Constructor Description AbstractUsernameFormAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
action(org.keycloak.authentication.AuthenticationFlowContext context)
protected javax.ws.rs.core.Response
challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error)
protected javax.ws.rs.core.Response
challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error, String field)
protected javax.ws.rs.core.Response
createLoginForm(org.keycloak.forms.login.LoginFormsProvider form)
protected String
disabledByBruteForceError()
protected String
disabledByBruteForceFieldError()
protected void
dummyHash(org.keycloak.authentication.AuthenticationFlowContext context)
boolean
enabledUser(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
protected String
getDefaultChallengeMessage(org.keycloak.authentication.AuthenticationFlowContext context)
protected boolean
isDisabledByBruteForce(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
protected boolean
isUserAlreadySetBeforeUsernamePasswordAuth(org.keycloak.authentication.AuthenticationFlowContext context)
protected void
runDefaultDummyHash(org.keycloak.authentication.AuthenticationFlowContext context)
protected javax.ws.rs.core.Response
setDuplicateUserChallenge(org.keycloak.authentication.AuthenticationFlowContext context, String eventError, String loginFormError, org.keycloak.authentication.AuthenticationFlowError authenticatorError)
void
testInvalidUser(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
boolean
validatePassword(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user, javax.ws.rs.core.MultivaluedMap<String,String> inputData, boolean clearUser)
boolean
validateUser(org.keycloak.authentication.AuthenticationFlowContext context, javax.ws.rs.core.MultivaluedMap<String,String> inputData)
boolean
validateUserAndPassword(org.keycloak.authentication.AuthenticationFlowContext context, javax.ws.rs.core.MultivaluedMap<String,String> inputData)
-
Methods inherited from class org.keycloak.authentication.AbstractFormAuthenticator
close
-
-
-
-
Field Detail
-
REGISTRATION_FORM_ACTION
public static final String REGISTRATION_FORM_ACTION
- See Also:
- Constant Field Values
-
ATTEMPTED_USERNAME
public static final String ATTEMPTED_USERNAME
- See Also:
- Constant Field Values
-
USER_SET_BEFORE_USERNAME_PASSWORD_AUTH
protected static final String USER_SET_BEFORE_USERNAME_PASSWORD_AUTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
action
public void action(org.keycloak.authentication.AuthenticationFlowContext context)
-
challenge
protected javax.ws.rs.core.Response challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error)
-
challenge
protected javax.ws.rs.core.Response challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error, String field)
-
createLoginForm
protected javax.ws.rs.core.Response createLoginForm(org.keycloak.forms.login.LoginFormsProvider form)
-
disabledByBruteForceError
protected String disabledByBruteForceError()
-
disabledByBruteForceFieldError
protected String disabledByBruteForceFieldError()
-
setDuplicateUserChallenge
protected javax.ws.rs.core.Response setDuplicateUserChallenge(org.keycloak.authentication.AuthenticationFlowContext context, String eventError, String loginFormError, org.keycloak.authentication.AuthenticationFlowError authenticatorError)
-
runDefaultDummyHash
protected void runDefaultDummyHash(org.keycloak.authentication.AuthenticationFlowContext context)
-
dummyHash
protected void dummyHash(org.keycloak.authentication.AuthenticationFlowContext context)
-
testInvalidUser
public void testInvalidUser(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
-
enabledUser
public boolean enabledUser(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
-
validateUserAndPassword
public boolean validateUserAndPassword(org.keycloak.authentication.AuthenticationFlowContext context, javax.ws.rs.core.MultivaluedMap<String,String> inputData)
-
validateUser
public boolean validateUser(org.keycloak.authentication.AuthenticationFlowContext context, javax.ws.rs.core.MultivaluedMap<String,String> inputData)
-
validatePassword
public boolean validatePassword(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user, javax.ws.rs.core.MultivaluedMap<String,String> inputData, boolean clearUser)
-
isDisabledByBruteForce
protected boolean isDisabledByBruteForce(org.keycloak.authentication.AuthenticationFlowContext context, org.keycloak.models.UserModel user)
-
getDefaultChallengeMessage
protected String getDefaultChallengeMessage(org.keycloak.authentication.AuthenticationFlowContext context)
-
isUserAlreadySetBeforeUsernamePasswordAuth
protected boolean isUserAlreadySetBeforeUsernamePasswordAuth(org.keycloak.authentication.AuthenticationFlowContext context)
-
-