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, supportsCredentials
protected void doInit(CallbackHandler callbackHandler, Session session, Map options) throws LoginException
AbstractLoginModule
doInit
in class AbstractLoginModule
callbackHandler
- as passed by LoginContext
session
- 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
AbstractLoginModule
impersonate
in class AbstractLoginModule
principal
- 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
AbstractLoginModule
Authentication
.getAuthentication
in class AbstractLoginModule
principal
- 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 AbstractLoginModule
credentials
- 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–2021 The Apache Software Foundation. All rights reserved.