Package org.keycloak.adapters.jaas
Class AbstractKeycloakLoginModule
java.lang.Object
org.keycloak.adapters.jaas.AbstractKeycloakLoginModule
- All Implemented Interfaces:
LoginModule
- Direct Known Subclasses:
BearerTokenLoginModule
,DirectAccessGrantsLoginModule
- Author:
- Marek Posolda
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected AbstractKeycloakLoginModule.Auth
protected CallbackHandler
protected KeycloakDeployment
static final String
static final String
static final String
protected String
protected Subject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
abort()
protected AbstractKeycloakLoginModule.Auth
bearerAuth
(String tokenString) boolean
commit()
protected Principal
createRolePrincipal
(String roleName) protected abstract AbstractKeycloakLoginModule.Auth
protected abstract org.jboss.logging.Logger
void
initialize
(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) boolean
login()
boolean
logout()
protected AbstractKeycloakLoginModule.Auth
postTokenVerification
(String tokenString, AccessToken token) Called after accessToken was verified (including signature, expiration etc)protected KeycloakDeployment
resolveDeployment
(String keycloakConfigFile)
-
Field Details
-
KEYCLOAK_CONFIG_FILE_OPTION
- See Also:
-
ROLE_PRINCIPAL_CLASS_OPTION
- See Also:
-
PROFILE_RESOURCE
- See Also:
-
subject
-
callbackHandler
-
auth
-
deployment
-
rolePrincipalClass
-
-
Constructor Details
-
AbstractKeycloakLoginModule
public AbstractKeycloakLoginModule()
-
-
Method Details
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) - Specified by:
initialize
in interfaceLoginModule
-
resolveDeployment
-
login
- Specified by:
login
in interfaceLoginModule
- Throws:
LoginException
-
commit
- Specified by:
commit
in interfaceLoginModule
- Throws:
LoginException
-
createRolePrincipal
-
abort
- Specified by:
abort
in interfaceLoginModule
- Throws:
LoginException
-
logout
- Specified by:
logout
in interfaceLoginModule
- Throws:
LoginException
-
bearerAuth
protected AbstractKeycloakLoginModule.Auth bearerAuth(String tokenString) throws org.keycloak.common.VerificationException - Throws:
org.keycloak.common.VerificationException
-
postTokenVerification
protected AbstractKeycloakLoginModule.Auth postTokenVerification(String tokenString, AccessToken token) Called after accessToken was verified (including signature, expiration etc) -
doAuth
protected abstract AbstractKeycloakLoginModule.Auth doAuth(String username, String password) throws Exception - Throws:
Exception
-
getLogger
protected abstract org.jboss.logging.Logger getLogger()
-