public abstract class AbstractKeycloakLoginModule extends Object implements LoginModule
Modifier and Type | Class and Description |
---|---|
static class |
AbstractKeycloakLoginModule.Auth |
Modifier and Type | Field and Description |
---|---|
protected AbstractKeycloakLoginModule.Auth |
auth |
protected CallbackHandler |
callbackHandler |
protected KeycloakDeployment |
deployment |
static String |
KEYCLOAK_CONFIG_FILE_OPTION |
static String |
PROFILE_RESOURCE |
static String |
ROLE_PRINCIPAL_CLASS_OPTION |
protected String |
rolePrincipalClass |
protected Subject |
subject |
Constructor and Description |
---|
AbstractKeycloakLoginModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort() |
protected AbstractKeycloakLoginModule.Auth |
bearerAuth(String tokenString) |
boolean |
commit() |
protected Principal |
createRolePrincipal(String roleName) |
protected abstract AbstractKeycloakLoginModule.Auth |
doAuth(String username,
String password) |
protected abstract org.jboss.logging.Logger |
getLogger() |
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) |
public static final String KEYCLOAK_CONFIG_FILE_OPTION
public static final String ROLE_PRINCIPAL_CLASS_OPTION
public static final String PROFILE_RESOURCE
protected Subject subject
protected CallbackHandler callbackHandler
protected AbstractKeycloakLoginModule.Auth auth
protected KeycloakDeployment deployment
protected String rolePrincipalClass
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize
in interface LoginModule
protected KeycloakDeployment resolveDeployment(String keycloakConfigFile)
public boolean login() throws LoginException
login
in interface LoginModule
LoginException
public boolean commit() throws LoginException
commit
in interface LoginModule
LoginException
public boolean abort() throws LoginException
abort
in interface LoginModule
LoginException
public boolean logout() throws LoginException
logout
in interface LoginModule
LoginException
protected AbstractKeycloakLoginModule.Auth bearerAuth(String tokenString) throws VerificationException
VerificationException
protected AbstractKeycloakLoginModule.Auth postTokenVerification(String tokenString, AccessToken token)
protected abstract AbstractKeycloakLoginModule.Auth doAuth(String username, String password) throws Exception
Exception
protected abstract org.jboss.logging.Logger getLogger()
Copyright © 2019 JBoss by Red Hat. All rights reserved.