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

## Class PluggableDefaultLoginModule

- java.lang.Object
- - org.apache.jackrabbit.core.security.authentication.AbstractLoginModule
  - - org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
    - - 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

Constructors
Constructor and Description
`PluggableDefaultLoginModule()`

### Method Summary

Methods
`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)`
`protected boolean` `supportsCredentials(javax.jcr.Credentials creds)`

### Methods inherited from class org.apache.jackrabbit.core.security.authentication.DefaultLoginModule

`commit, getTokenExpiration, getUserID, isDisableTokenAuth, setDisableTokenAuth, setTokenExpiration`

### Methods inherited from class org.apache.jackrabbit.core.security.authentication.AbstractLoginModule

`abort, authenticate, getAdminId, getAnonymousId, getImpersonatorSubject, getPreAuthAttributeName, getPrincipalProvider, isAnonymous, isImpersonation, isInitialized, isPreAuthenticated, 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

#### 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`

#### supportsCredentials

    protected boolean supportsCredentials(javax.jcr.Credentials creds)

Overrides:
  `supportsCredentials` in class `org.apache.jackrabbit.core.security.authentication.DefaultLoginModule`