public class SimpleLoginModule extends AbstractLoginModule
SimpleLoginModule...adminId, anonymousId, callbackHandler, credentials, principal, principalProvider, sharedState, subject| Constructor and Description |
|---|
SimpleLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit(CallbackHandler callbackHandler,
Session session,
Map options)
Implementations may set-up their own state.
|
protected Authentication |
getAuthentication(Principal principal,
Credentials creds)
Retrieve the
Authentication. |
protected Principal |
getPrincipal(Credentials credentials)
Uses the configured
PrincipalProvider to retrieve the principal. |
protected boolean |
impersonate(Principal principal,
Credentials credentials)
Handles the impersonation of given Credentials.
|
abort, authenticate, commit, getAdminId, getAnonymousId, getCredentials, getImpersonatorSubject, getPreAuthAttributeName, getPrincipalProvider, getPrincipals, getUserID, initialize, isAnonymous, isImpersonation, isInitialized, isPreAuthenticated, login, logout, setAdminId, setAnonymousId, setPrincipalProvider, supportsCredentialsprotected void doInit(CallbackHandler callbackHandler, Session session, Map options) throws LoginException
AbstractLoginModuledoInit in class AbstractLoginModulecallbackHandler - as passed by LoginContextsession - to security-workspace of Jackrabbitoptions - options from LoginModule configLoginException - in case initialization fails.AbstractLoginModule.doInit(javax.security.auth.callback.CallbackHandler, javax.jcr.Session, java.util.Map)protected boolean impersonate(Principal principal, Credentials credentials) throws RepositoryException, LoginException
AbstractLoginModuleimpersonate in class AbstractLoginModuleprincipal - Principal to impersonate.credentials - Credentials used to create the impersonation subject.RepositoryException - If another error occurs.LoginException - If credentials don't allow to impersonate to principal.AbstractLoginModule.impersonate(java.security.Principal, javax.jcr.Credentials)protected Authentication getAuthentication(Principal principal, Credentials creds) throws RepositoryException
AbstractLoginModuleAuthentication.getAuthentication in class AbstractLoginModuleprincipal - A principal.creds - The Credentials used for the login.RepositoryException - If an error occurs.AbstractLoginModule.getAuthentication(java.security.Principal, javax.jcr.Credentials)protected Principal getPrincipal(Credentials credentials)
PrincipalProvider to retrieve the principal.
It takes the PrincipalProvider.getPrincipal(String) for the User-ID
resolved by AbstractLoginModule.getUserID(Credentials), assuming that
User-ID and the corresponding principal name are always identical.getPrincipal in class AbstractLoginModulecredentials - Credentials for which the principal should be resolved.null if the principal provider does
not contain a user-principal with the given userID/principal name.AbstractLoginModule.getPrincipal(Credentials)Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.