Package org.keycloak.adapters.jaas
Class DirectAccessGrantsLoginModule
- java.lang.Object
-
- org.keycloak.adapters.jaas.AbstractKeycloakLoginModule
-
- org.keycloak.adapters.jaas.DirectAccessGrantsLoginModule
-
- All Implemented Interfaces:
LoginModule
public class DirectAccessGrantsLoginModule extends AbstractKeycloakLoginModule
Login module based on Resource Owner password credentials grant from OAuth2 specs. It's supposed to be used in environments. which can't rely on HTTP (like SSH authentication for instance). It needs that Direct Grant is enabled on particular realm in Keycloak.- Author:
- Marek Posolda
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.keycloak.adapters.jaas.AbstractKeycloakLoginModule
AbstractKeycloakLoginModule.Auth
-
-
Field Summary
Fields Modifier and Type Field Description static StringSCOPE_OPTION-
Fields inherited from class org.keycloak.adapters.jaas.AbstractKeycloakLoginModule
auth, callbackHandler, deployment, KEYCLOAK_CONFIG_FILE_OPTION, PROFILE_RESOURCE, ROLE_PRINCIPAL_CLASS_OPTION, rolePrincipalClass, subject
-
-
Constructor Summary
Constructors Constructor Description DirectAccessGrantsLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancommit()protected AbstractKeycloakLoginModule.AuthdirectGrantAuth(String username, String password)protected AbstractKeycloakLoginModule.AuthdoAuth(String username, String password)protected org.jboss.logging.LoggergetLogger()voidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)booleanlogout()-
Methods inherited from class org.keycloak.adapters.jaas.AbstractKeycloakLoginModule
abort, bearerAuth, createRolePrincipal, login, postTokenVerification, resolveDeployment
-
-
-
-
Field Detail
-
SCOPE_OPTION
public static final String SCOPE_OPTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initializein interfaceLoginModule- Overrides:
initializein classAbstractKeycloakLoginModule
-
doAuth
protected AbstractKeycloakLoginModule.Auth doAuth(String username, String password) throws IOException, org.keycloak.common.VerificationException
- Specified by:
doAuthin classAbstractKeycloakLoginModule- Throws:
IOExceptionorg.keycloak.common.VerificationException
-
getLogger
protected org.jboss.logging.Logger getLogger()
- Specified by:
getLoggerin classAbstractKeycloakLoginModule
-
directGrantAuth
protected AbstractKeycloakLoginModule.Auth directGrantAuth(String username, String password) throws IOException, org.keycloak.common.VerificationException
- Throws:
IOExceptionorg.keycloak.common.VerificationException
-
commit
public boolean commit() throws LoginException- Specified by:
commitin interfaceLoginModule- Overrides:
commitin classAbstractKeycloakLoginModule- Throws:
LoginException
-
logout
public boolean logout() throws LoginException- Specified by:
logoutin interfaceLoginModule- Overrides:
logoutin classAbstractKeycloakLoginModule- Throws:
LoginException
-
-