org.apache.sling.jcr.jackrabbit.server.impl.security
Class PluggableDefaultLoginModule

java.lang.Object
  extended by org.apache.jackrabbit.core.security.authentication.AbstractLoginModule
      extended by org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
          extended by org.apache.sling.jcr.jackrabbit.server.impl.security.PluggableDefaultLoginModule
All Implemented Interfaces:
LoginModule

public class PluggableDefaultLoginModule
extends org.apache.jackrabbit.core.security.authentication.DefaultLoginModule

Extends DefaultLoginModule to provide implementations registered with the OSGI framework implementing LoginModulePlugin. Like the DefaultLoginModule, this LoginModule inherits the core of its functionality from AbstractLoginModule


Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
user
 
Fields inherited from class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule
adminId, anonymousId, callbackHandler, credentials, principal, principalProvider, sharedState, subject
 
Constructor Summary
PluggableDefaultLoginModule()
           
 
Method Summary
protected  void doInit(CallbackHandler callbackHandler, javax.jcr.Session session, Map options)
           
protected  org.apache.jackrabbit.core.security.authentication.Authentication getAuthentication(Principal principal, javax.jcr.Credentials creds)
           
protected  javax.jcr.Credentials getCredentials()
          Since the AbstractLoginModule getCredentials does not know anything about TrustedCredentials we have to re-try here.
protected  Principal getPrincipal(javax.jcr.Credentials creds)
           
protected  Set getPrincipals()
           
protected  boolean impersonate(Principal principal, javax.jcr.Credentials creds)
           
 void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
          
 
Methods inherited from class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule
abort, authenticate, commit, getAdminId, getAnonymousId, getImpersonatorSubject, getPreAuthAttributeName, getPrincipalProvider, getUserID, isAnonymous, isImpersonation, isInitialized, isPreAuthenticated, login, logout, setAdminId, setAnonymousId, setPrincipalProvider, supportsCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluggableDefaultLoginModule

public PluggableDefaultLoginModule()
Method Detail

doInit

protected void doInit(CallbackHandler callbackHandler,
                      javax.jcr.Session session,
                      Map options)
               throws LoginException
Overrides:
doInit in class org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
Throws:
LoginException
See Also:
DefaultLoginModule.doInit(javax.security.auth.callback.CallbackHandler, javax.jcr.Session, java.util.Map)

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map<String,?> sharedState,
                       Map<String,?> options)

Specified by:
initialize in interface LoginModule
Overrides:
initialize in class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule
See Also:
AbstractLoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)

getPrincipal

protected Principal getPrincipal(javax.jcr.Credentials creds)
Overrides:
getPrincipal in class org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
See Also:
DefaultLoginModule.getPrincipal(javax.jcr.Credentials)

getPrincipals

protected Set getPrincipals()
Overrides:
getPrincipals in class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule
See Also:
AbstractLoginModule.getPrincipals()

getAuthentication

protected org.apache.jackrabbit.core.security.authentication.Authentication getAuthentication(Principal principal,
                                                                                              javax.jcr.Credentials creds)
                                                                                       throws javax.jcr.RepositoryException
Overrides:
getAuthentication in class org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
Throws:
javax.jcr.RepositoryException
See Also:
DefaultLoginModule.getAuthentication(java.security.Principal, javax.jcr.Credentials)

impersonate

protected boolean impersonate(Principal principal,
                              javax.jcr.Credentials creds)
                       throws javax.jcr.RepositoryException,
                              FailedLoginException
Overrides:
impersonate in class org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
Throws:
javax.jcr.RepositoryException
FailedLoginException
See Also:
DefaultLoginModule.impersonate(java.security.Principal, javax.jcr.Credentials)

getCredentials

protected javax.jcr.Credentials getCredentials()
Since the AbstractLoginModule getCredentials does not know anything about TrustedCredentials we have to re-try here.

Overrides:
getCredentials in class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.