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

AuthContextProvider defines how the current request for login is handled. By default the local repository configuration takes precedence over JAAS configuration. If no local configuration is present a JAAS configuration must be provided otherwise getAuthContext(javax.jcr.Credentials, javax.security.auth.Subject, javax.jcr.Session, org.apache.jackrabbit.core.security.principal.PrincipalProviderRegistry, java.lang.String, java.lang.String) fails with RepositoryException.


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-2010 The Apache Software Foundation. All Rights Reserved.