Class AuthContextProvider
- java.lang.Object
-
- org.apache.jackrabbit.core.security.authentication.AuthContextProvider
-
public class AuthContextProvider extends Object
AuthContextProvider
defines how the current request for login is handled. By default thelocal repository configuration
takes precedence over JAAS configuration. If no local configuration is present a JAAS configuration must be provided otherwisegetAuthContext(javax.jcr.Credentials, javax.security.auth.Subject, javax.jcr.Session, org.apache.jackrabbit.core.security.principal.PrincipalProviderRegistry, java.lang.String, java.lang.String)
fails withRepositoryException
.
-
-
Constructor Summary
Constructors Constructor Description AuthContextProvider(String appName, LoginModuleConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthContext
getAuthContext(Credentials credentials, Subject subject, Session session, PrincipalProviderRegistry principalProviderRegistry, String adminId, String anonymousId)
Properties[]
getModuleConfig()
boolean
isJAAS()
boolean
isLocal()
-
-
-
Constructor Detail
-
AuthContextProvider
public AuthContextProvider(String appName, LoginModuleConfig config)
- Parameters:
appName
- LoginConfig application name used for this instanceconfig
- 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 anJAASContext
nor aLocalContext
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.
-
-