|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.security.authentication.AbstractLoginModule
org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
public class DefaultLoginModule
The DefaultLoginModule
authenticates Credentials related to
a User
of the Repository
In any other case it is marked to be ignored.
This Module can deal only with SimpleCredentials
since it
uses by default the SimpleCredentialsAuthentication
. Impersonation is
delegated to the User
's Impersonation
object
AbstractLoginModule
Field Summary |
---|
Fields inherited from class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule |
---|
adminId, anonymousId, credentials, principal, principalProvider, subject |
Constructor Summary | |
---|---|
DefaultLoginModule()
|
Method Summary | |
---|---|
protected void |
doInit(CallbackHandler callbackHandler,
Session session,
Map options)
Retrieves the user manager from the specified session. |
protected Authentication |
getAuthentication(Principal principal,
Credentials creds)
Retrieve the Authentication . |
protected Principal |
getPrincipal(Credentials credentials)
Resolves the userID from the given credentials and obtains the principal from the User object associated with the given userID. |
protected boolean |
impersonate(Principal principal,
Credentials credentials)
Handles the impersonation of given Credentials. |
Methods inherited from class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule |
---|
abort, authenticate, commit, getAdminId, getAnonymousId, getCredentials, getImpersonatorSubject, getPrincipalProvider, getPrincipals, getUserID, initialize, isAnonymous, isImpersonation, isInitialized, login, logout, setAdminId, setAnonymousId, setPrincipalProvider |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultLoginModule()
Method Detail |
---|
protected void doInit(CallbackHandler callbackHandler, Session session, Map options) throws LoginException
doInit
in class AbstractLoginModule
callbackHandler
- as passed by LoginContext
session
- to security-workspace of Jackrabbitoptions
- options from Logini config
LoginException
- in case initializeaiton failesAbstractLoginModule.doInit(CallbackHandler, Session, Map)
protected Principal getPrincipal(Credentials credentials)
null
is returned.
getPrincipal
in class AbstractLoginModule
credentials
- Credentions to retrieve the principal for.
null
.AbstractLoginModule.getPrincipal(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(Principal, Credentials)
protected boolean impersonate(Principal principal, Credentials credentials) throws RepositoryException, FailedLoginException
User
for the given Principal and
delegates the check to Impersonation.allows(javax.security.auth.Subject)
impersonate
in class AbstractLoginModule
principal
- Principal to impersonate.credentials
- Credentials used to create the impersonation subject.
RepositoryException
FailedLoginException
- if credentials don't allow to impersonate to principalAbstractLoginModule.impersonate(Principal, Credentials)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |