1 package com.atlassian.seraph.spi.rememberme;
2
3 import javax.servlet.http.HttpServletRequest;
4
5 /**
6 * This interface provides the information to allow the {@link com.atlassian.seraph.service.rememberme.RememberMeService}
7 * to know what the name of the remember me cookie could be and how old it should be made and what path it should be
8 * placed on and so on.
9 */
10 public interface RememberMeConfiguration
11 {
12
13 /**
14 * @return the name of the cookie to look into for remember me information
15 */
16 String getCookieName();
17
18 /**
19 * @return the age in seconds for the remember me cookie
20 */
21 int getCookieMaxAgeInSeconds();
22
23 /**
24 * @param httpServletRequest the request in play
25 *
26 * @return the domain that should be used when writing the remember me cookie
27 */
28 String getCookieDomain(HttpServletRequest httpServletRequest);
29
30 /**
31 * @param httpServletRequest the request in play
32 *
33 * @return the path that should be used when writing the remember me cookie
34 */
35 String getCookiePath(HttpServletRequest httpServletRequest);
36
37 /**
38 * See JRA-10508
39 *
40 * @return true if the cookie should never be set to secure according to the request
41 */
42 boolean isInsecureCookieAlwaysUsed();
43
44 /**
45 * If this is true than Seraph will make the remember me a HttpOnly cookie. Not all applications,
46 * browsers and testing framework can handle HttpOnly cookies
47 *
48 * @return true for HttpOnly cookies
49 */
50 boolean isCookieHttpOnly();
51 }