1   package com.atlassian.seraph.config;
2   
3   import com.atlassian.seraph.SecurityService;
4   import com.atlassian.seraph.elevatedsecurity.ElevatedSecurityGuard;
5   import com.atlassian.seraph.auth.AuthenticationContext;
6   import com.atlassian.seraph.auth.Authenticator;
7   import com.atlassian.seraph.auth.RoleMapper;
8   import com.atlassian.seraph.controller.SecurityController;
9   import com.atlassian.seraph.interceptor.Interceptor;
10  
11  import java.util.List;
12  
13  public interface SecurityConfig
14  {
15      String STORAGE_KEY = "seraph_config";
16      String BASIC_AUTH = "basic";
17  
18      List<SecurityService> getServices();
19  
20      String getLoginURL();
21  
22      String getLinkLoginURL();
23  
24      String getLogoutURL();
25  
26      String getOriginalURLKey();
27  
28      /**
29       * @return the {@link com.atlassian.seraph.auth.Authenticator} in play
30       */
31      Authenticator getAuthenticator();
32  
33      /**
34       * @return the {@link com.atlassian.seraph.auth.AuthenticationContext} in play
35       */
36      AuthenticationContext getAuthenticationContext();
37  
38      /**
39       * @return the {@link com.atlassian.seraph.controller.SecurityController} in play
40       */
41      SecurityController getController();
42  
43      /**
44       * @return the {@link com.atlassian.seraph.auth.RoleMapper} in play
45       */
46      RoleMapper getRoleMapper();
47  
48      /**
49       * @return the {@link com.atlassian.seraph.elevatedsecurity.ElevatedSecurityGuard} in play
50       */
51      ElevatedSecurityGuard getElevatedSecurityGuard();
52      
53      /**
54       * Returns the configured RedirectPolicy, or the default if none is configured.
55       * Will never return null.
56       * @return The configured RedirectPolicy, or the default if none is configured.
57       */
58      RedirectPolicy getRedirectPolicy();
59  
60      <T extends Interceptor> List<T> getInterceptors(Class<T> desiredInterceptorClass);
61  
62      String getCookieEncoding();
63  
64      /**
65       * @return The path to use for the autologin cookie
66       */
67      String getLoginCookiePath();
68  
69      String getLoginCookieKey();
70  
71      void destroy();
72  
73      String getAuthType();
74  
75      boolean isInsecureCookie();
76  
77      /**
78       * Autologin cookie age in seconds.
79       * @return Autologin cookie age in seconds.
80       */
81      int getAutoLoginCookieAge();
82  }