Package org.keycloak.adapters.jaas
Class DirectAccessGrantsLoginModule
java.lang.Object
org.keycloak.adapters.jaas.AbstractKeycloakLoginModule
org.keycloak.adapters.jaas.DirectAccessGrantsLoginModule
- All Implemented Interfaces:
LoginModule
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
FieldsFields 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 -
Method Summary
Modifier and TypeMethodDescriptionbooleancommit()protected AbstractKeycloakLoginModule.AuthdirectGrantAuth(String username, String password) protected AbstractKeycloakLoginModule.Authprotected org.jboss.logging.Loggervoidinitialize(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 Details
-
SCOPE_OPTION
- See Also:
-
-
Constructor Details
-
DirectAccessGrantsLoginModule
public DirectAccessGrantsLoginModule()
-
-
Method Details
-
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
- Specified by:
commitin interfaceLoginModule- Overrides:
commitin classAbstractKeycloakLoginModule- Throws:
LoginException
-
logout
- Specified by:
logoutin interfaceLoginModule- Overrides:
logoutin classAbstractKeycloakLoginModule- Throws:
LoginException
-