org.apache.jackrabbit.core.security.authentication
Class AuthContextProvider

java.lang.Object
  extended by org.apache.jackrabbit.core.security.authentication.AuthContextProvider

public class AuthContextProvider
extends Object

A AuthContextProvider selects how the current request for login is handled. It selects the mechanism and set-up according configuration.
The handler selects if the JAAS-configuration Configuration is taken or the fall-back as configured via RepositoryConfig.

This implementaion selects JAAS under the following condition:

If the conditions are not met AND a LoginModule is configured in RepositoryConfig, that one is taken.


Constructor Summary
AuthContextProvider(String appName, LoginModuleConfig config)
           
 
Method Summary
 AuthContext getAuthContext(Credentials credentials, Subject subject, Session session, PrincipalProviderRegistry principalProviderRegistry, String adminId, String anonymousId)
           
 Properties[] getModuleConfig()
           
 boolean isJAAS()
           
 boolean isLocal()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthContextProvider

public AuthContextProvider(String appName,
                           LoginModuleConfig config)
Parameters:
appName - LoginConfig application name used for this instance
config - optional LoginModule-configuration to use without JAAS
Method Detail

getAuthContext

public AuthContext getAuthContext(Credentials credentials,
                                  Subject subject,
                                  Session session,
                                  PrincipalProviderRegistry principalProviderRegistry,
                                  String adminId,
                                  String anonymousId)
                           throws RepositoryException
Parameters:
credentials -
subject -
session -
principalProviderRegistry -
adminId -
anonymousId -
Returns:
context of for authentication and log-out
Throws:
RepositoryException - in case neither an JAASContext nor a LocalContext can be successfully created.

isJAAS

public boolean isJAAS()
Returns:
true if a application entry is available in a JAAS- Configuration

isLocal

public boolean isLocal()
Returns:
true if a login-module is configured.

getModuleConfig

public Properties[] getModuleConfig()
Returns:
options configured for the LoginModules to use.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.