org.apache.jackrabbit.core.security.authentication
Class AuthContextProvider
java.lang.Object
org.apache.jackrabbit.core.security.authentication.AuthContextProvider
public class AuthContextProvider
- extends java.lang.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:
- a JAAS Login-
Configuration is available
- the configuration contains the configured application name
If the conditions are not met AND a LoginModule is configured in
RepositoryConfig, that one is taken.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthContextProvider
public AuthContextProvider(java.lang.String appName,
LoginModuleConfig config)
- Parameters:
appName - LoginConfig application name used for this instanceconfig - optional LoginModule-configuration to use without JAAS
getAuthContext
public AuthContext getAuthContext(javax.jcr.Credentials credentials,
javax.security.auth.Subject subject,
javax.jcr.Session session,
PrincipalProviderRegistry principalProviderRegistry,
java.lang.String adminId,
java.lang.String anonymousId)
throws javax.jcr.RepositoryException
- Parameters:
credentials - subject - session - principalProviderRegistry -
- Returns:
- context of for authentication and log-out
- Throws:
javax.jcr.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
isJAAS() is false and a login-module is configured
getModuleConfig
public java.util.Properties[] getModuleConfig()
- Returns:
- options configured for the LoginModules to use
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.