com.atlassian.seraph.config
Class SecurityConfigImpl

java.lang.Object
  extended bycom.atlassian.seraph.config.SecurityConfigImpl
All Implemented Interfaces:
SecurityConfig, java.io.Serializable

public class SecurityConfigImpl
extends java.lang.Object
implements java.io.Serializable, SecurityConfig

The main class of Seraph's configuration.

This class is a Singleton, access it using SecurityConfigFactory.getInstance().

See Also:
Serialized Form

Field Summary
protected  Authenticator authenticator
           
protected  SecurityController controller
           
static java.lang.String DEFAULT_CONFIG_LOCATION
           
protected  java.util.List interceptors
           
protected  RoleMapper roleMapper
           
protected  java.util.List services
           
 
Fields inherited from interface com.atlassian.seraph.config.SecurityConfig
BASIC_AUTH, STORAGE_KEY
 
Constructor Summary
SecurityConfigImpl(java.lang.String configFileLocation)
           
 
Method Summary
 void addInterceptor(Interceptor interceptor)
           
protected  void configureAuthenticator(org.w3c.dom.Element rootEl)
           
protected  void configureController(org.w3c.dom.Element rootEl)
           
protected  void configureInterceptors(org.w3c.dom.Element rootEl)
           
protected  void configureLoginUrlStrategy(org.w3c.dom.Element rootEl)
           
protected  void configureRoleMapper(org.w3c.dom.Element rootEl)
           
 void destroy()
           
 AuthenticationContext getAuthenticationContext()
           
 Authenticator getAuthenticator()
           
 java.lang.String getAuthType()
           
 int getAutoLoginCookieAge()
          Autologin cookie age in seconds
 SecurityController getController()
           
 java.lang.String getCookieEncoding()
           
protected  java.util.Map getInitParameters(org.w3c.dom.Element el)
           
static SecurityConfig getInstance()
          Instantiates a SecurityConfigImpl using the default config file.
static SecurityConfigImpl getInstance(java.lang.String configFileLocation)
          Instantiates a SecurityConfigImpl.
 java.util.List getInterceptors(java.lang.Class desiredInterceptorClass)
           
 java.lang.String getLinkLoginURL()
           
 java.lang.String getLoginCookieKey()
           
 java.lang.String getLoginCookiePath()
           
 java.lang.String getLoginURL()
           
 java.lang.String getLogoutURL()
           
 java.lang.String getOriginalURLKey()
           
 RoleMapper getRoleMapper()
           
 java.util.List getServices()
           
 boolean isInsecureCookie()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONFIG_LOCATION

public static final java.lang.String DEFAULT_CONFIG_LOCATION
See Also:
Constant Field Values

authenticator

protected Authenticator authenticator

roleMapper

protected RoleMapper roleMapper

controller

protected SecurityController controller

services

protected java.util.List services

interceptors

protected java.util.List interceptors
Constructor Detail

SecurityConfigImpl

public SecurityConfigImpl(java.lang.String configFileLocation)
                   throws ConfigurationException
Method Detail

configureLoginUrlStrategy

protected void configureLoginUrlStrategy(org.w3c.dom.Element rootEl)
                                  throws ConfigurationException
Throws:
ConfigurationException

configureAuthenticator

protected void configureAuthenticator(org.w3c.dom.Element rootEl)
                               throws ConfigurationException
Throws:
ConfigurationException

configureController

protected void configureController(org.w3c.dom.Element rootEl)
                            throws ConfigurationException
Throws:
ConfigurationException

configureRoleMapper

protected void configureRoleMapper(org.w3c.dom.Element rootEl)
                            throws ConfigurationException
Throws:
ConfigurationException

configureInterceptors

protected void configureInterceptors(org.w3c.dom.Element rootEl)
                              throws ConfigurationException
Throws:
ConfigurationException

getInitParameters

protected java.util.Map getInitParameters(org.w3c.dom.Element el)

destroy

public void destroy()
Specified by:
destroy in interface SecurityConfig

addInterceptor

public void addInterceptor(Interceptor interceptor)

getServices

public java.util.List getServices()
Specified by:
getServices in interface SecurityConfig

getLoginURL

public java.lang.String getLoginURL()
Specified by:
getLoginURL in interface SecurityConfig

getLinkLoginURL

public java.lang.String getLinkLoginURL()
Specified by:
getLinkLoginURL in interface SecurityConfig

getLogoutURL

public java.lang.String getLogoutURL()
Specified by:
getLogoutURL in interface SecurityConfig

getOriginalURLKey

public java.lang.String getOriginalURLKey()
Specified by:
getOriginalURLKey in interface SecurityConfig

getAuthenticator

public Authenticator getAuthenticator()
Specified by:
getAuthenticator in interface SecurityConfig

getAuthenticationContext

public AuthenticationContext getAuthenticationContext()
Specified by:
getAuthenticationContext in interface SecurityConfig

getController

public SecurityController getController()
Specified by:
getController in interface SecurityConfig

getInstance

public static SecurityConfigImpl getInstance(java.lang.String configFileLocation)
                                      throws ConfigurationException
Instantiates a SecurityConfigImpl. If you just want a SecurityConfig, use SecurityConfigFactory.getInstance(java.lang.String) instead.

Throws:
ConfigurationException

getInstance

public static SecurityConfig getInstance()
Instantiates a SecurityConfigImpl using the default config file. If you just want a SecurityConfig, use SecurityConfigFactory.getInstance() instead.


getRoleMapper

public RoleMapper getRoleMapper()
Specified by:
getRoleMapper in interface SecurityConfig

getInterceptors

public java.util.List getInterceptors(java.lang.Class desiredInterceptorClass)
Specified by:
getInterceptors in interface SecurityConfig

getCookieEncoding

public java.lang.String getCookieEncoding()
Specified by:
getCookieEncoding in interface SecurityConfig

getLoginCookiePath

public java.lang.String getLoginCookiePath()
Specified by:
getLoginCookiePath in interface SecurityConfig
Returns:
The path to use for the autologin cookie

getLoginCookieKey

public java.lang.String getLoginCookieKey()
Specified by:
getLoginCookieKey in interface SecurityConfig

getAuthType

public java.lang.String getAuthType()
Specified by:
getAuthType in interface SecurityConfig

isInsecureCookie

public boolean isInsecureCookie()
Specified by:
isInsecureCookie in interface SecurityConfig

getAutoLoginCookieAge

public int getAutoLoginCookieAge()
Description copied from interface: SecurityConfig
Autologin cookie age in seconds

Specified by:
getAutoLoginCookieAge in interface SecurityConfig


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.