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 String
SCOPE_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 boolean
commit()
protected AbstractKeycloakLoginModule.Auth
directGrantAuth(String username, String password)
protected AbstractKeycloakLoginModule.Auth
doAuth(String username, String password)
protected org.jboss.logging.Logger
getLogger()
void
initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
boolean
logout()
-
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:
initialize
in interfaceLoginModule
- Overrides:
initialize
in classAbstractKeycloakLoginModule
-
doAuth
protected AbstractKeycloakLoginModule.Auth doAuth(String username, String password) throws IOException, org.keycloak.common.VerificationException
- Specified by:
doAuth
in classAbstractKeycloakLoginModule
- Throws:
IOException
org.keycloak.common.VerificationException
-
getLogger
protected org.jboss.logging.Logger getLogger()
- Specified by:
getLogger
in classAbstractKeycloakLoginModule
-
directGrantAuth
protected AbstractKeycloakLoginModule.Auth directGrantAuth(String username, String password) throws IOException, org.keycloak.common.VerificationException
- Throws:
IOException
org.keycloak.common.VerificationException
-
commit
public boolean commit() throws LoginException
- Specified by:
commit
in interfaceLoginModule
- Overrides:
commit
in classAbstractKeycloakLoginModule
- Throws:
LoginException
-
logout
public boolean logout() throws LoginException
- Specified by:
logout
in interfaceLoginModule
- Overrides:
logout
in classAbstractKeycloakLoginModule
- Throws:
LoginException
-
-