Class BasicAuthAuthenticator
- java.lang.Object
-
- org.keycloak.authentication.AbstractFormAuthenticator
-
- org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator
-
- org.keycloak.authentication.authenticators.challenge.BasicAuthAuthenticator
-
- All Implemented Interfaces:
org.keycloak.authentication.Authenticator,org.keycloak.provider.Provider
- Direct Known Subclasses:
BasicAuthOTPAuthenticator
public class BasicAuthAuthenticator extends AbstractUsernameFormAuthenticator implements org.keycloak.authentication.Authenticator
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
-
Fields inherited from class org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator
ATTEMPTED_USERNAME, REGISTRATION_FORM_ACTION, USER_SET_BEFORE_USERNAME_PASSWORD_AUTH
-
-
Constructor Summary
Constructors Constructor Description BasicAuthAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaction(org.keycloak.authentication.AuthenticationFlowContext context)voidauthenticate(org.keycloak.authentication.AuthenticationFlowContext context)protected javax.ws.rs.core.Responsechallenge(org.keycloak.authentication.AuthenticationFlowContext context, String error)protected javax.ws.rs.core.Responsechallenge(org.keycloak.authentication.AuthenticationFlowContext context, String error, String field)protected booleancheckUsernameAndPassword(org.keycloak.authentication.AuthenticationFlowContext context, String username, String password)voidclose()booleanconfiguredFor(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.models.UserModel user)protected StringgetAuthorizationHeader(org.keycloak.authentication.AuthenticationFlowContext context)protected String[]getChallenge(String authorizationHeader)protected booleanonAuthenticate(org.keycloak.authentication.AuthenticationFlowContext context, String[] challenge)booleanrequiresUser()protected javax.ws.rs.core.ResponsesetDuplicateUserChallenge(org.keycloak.authentication.AuthenticationFlowContext context, String eventError, String loginFormError, org.keycloak.authentication.AuthenticationFlowError authenticatorError)voidsetRequiredActions(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.models.UserModel user)-
Methods inherited from class org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator
createLoginForm, disabledByBruteForceError, disabledByBruteForceFieldError, dummyHash, enabledUser, getDefaultChallengeMessage, isDisabledByBruteForce, isUserAlreadySetBeforeUsernamePasswordAuth, runDefaultDummyHash, testInvalidUser, validatePassword, validateUser, validateUserAndPassword
-
-
-
-
Method Detail
-
requiresUser
public boolean requiresUser()
- Specified by:
requiresUserin interfaceorg.keycloak.authentication.Authenticator
-
authenticate
public void authenticate(org.keycloak.authentication.AuthenticationFlowContext context)
- Specified by:
authenticatein interfaceorg.keycloak.authentication.Authenticator
-
onAuthenticate
protected boolean onAuthenticate(org.keycloak.authentication.AuthenticationFlowContext context, String[] challenge)
-
getAuthorizationHeader
protected String getAuthorizationHeader(org.keycloak.authentication.AuthenticationFlowContext context)
-
checkUsernameAndPassword
protected boolean checkUsernameAndPassword(org.keycloak.authentication.AuthenticationFlowContext context, String username, String password)
-
setDuplicateUserChallenge
protected javax.ws.rs.core.Response setDuplicateUserChallenge(org.keycloak.authentication.AuthenticationFlowContext context, String eventError, String loginFormError, org.keycloak.authentication.AuthenticationFlowError authenticatorError)- Overrides:
setDuplicateUserChallengein classAbstractUsernameFormAuthenticator
-
challenge
protected javax.ws.rs.core.Response challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error)- Overrides:
challengein classAbstractUsernameFormAuthenticator
-
challenge
protected javax.ws.rs.core.Response challenge(org.keycloak.authentication.AuthenticationFlowContext context, String error, String field)- Overrides:
challengein classAbstractUsernameFormAuthenticator
-
action
public void action(org.keycloak.authentication.AuthenticationFlowContext context)
- Specified by:
actionin interfaceorg.keycloak.authentication.Authenticator- Overrides:
actionin classAbstractUsernameFormAuthenticator
-
configuredFor
public boolean configuredFor(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.models.UserModel user)- Specified by:
configuredForin interfaceorg.keycloak.authentication.Authenticator
-
setRequiredActions
public void setRequiredActions(org.keycloak.models.KeycloakSession session, org.keycloak.models.RealmModel realm, org.keycloak.models.UserModel user)- Specified by:
setRequiredActionsin interfaceorg.keycloak.authentication.Authenticator
-
close
public void close()
- Specified by:
closein interfaceorg.keycloak.provider.Provider- Overrides:
closein classAbstractFormAuthenticator
-
-