public class SecurityConfig extends Object
Constructor and Description |
---|
SecurityConfig(boolean validating)
Constructor that takes the validating flag and debug level to be used while parsing.
|
Modifier and Type | Method and Description |
---|---|
void |
addRealm(Object realm)
Adds a realm to use for authentication.
|
void |
addSecurityConstraint(SecurityConstraint constraint)
Adds a SecurityConstraint.
|
String |
getAuthMethod()
Get the authentication method being used to challenge the user.
|
int |
getCookieExpire()
Return the amount of seconds the authentication token cookie should remain
valid after logging in (in seconds).
|
String |
getCookiePaths()
Return the paths for which authentication token cookies should be set.
|
String |
getDefaultPage()
Return the default page URL.
|
String |
getErrorPage()
Return the error page URL.
|
String |
getExtraHashString()
Return the extra hash string for adding salt to the validation hash
|
String |
getLoginPage()
Return the login page URL.
|
String |
getLogoutPage()
Return the logout page URL.
|
PersistentLoginManagerInterface |
getPersistentLoginManager()
Return the StickyLoginManager used for this implementation
|
SecurityRealmInterface |
getRealm()
Return the realm to use for authentication.
|
String |
getRealmName()
Get the authentication realm name.
|
String |
getSecretKey()
Return the secret key for encrypting the authentication token cookie.
|
List |
getSecurityConstraints()
Return the configured SecurityConstraints.
|
boolean |
isAcceptCookie() |
boolean |
isSetCookies() |
void |
loadConfig(URL configURL)
Loads configuration from the specifued configURL.
|
protected void |
registerLocalDTDs(org.apache.commons.digester.Digester digester)
Register local copies of the SecurityFilter DTD files.
|
void |
setAcceptCookie(String acceptCookie) |
void |
setAuthMethod(String authMethod)
Set the authentication method being used to challenge the user.
|
void |
setCookieExpire(String cookieExpire)
Set cookie validity duration in seconds.
|
void |
setCookiePaths(String cookiePaths)
Set cookie paths.
|
void |
setDefaultPage(String defaultPage)
Set the default page URL.
|
void |
setErrorPage(String errorPage)
Set the error page URL.
|
void |
setExtraHashString(String extraHashString)
Set extra hash string
|
void |
setLoginPage(String loginPage)
Set the login page URL.
|
void |
setLogoutPage(String logoutPage)
Set the logout page URL.
|
void |
setPersistentLoginManager(PersistentLoginManagerInterface persistentLoginManager)
Set the PersistentLoginManager to be used for persisting logins.
|
void |
setRealmName(String realmName)
Set the authentication realm name.
|
void |
setSecretKey(String secretKey)
Set secret key.
|
void |
setSetCookies(String setCookies) |
public SecurityConfig(boolean validating)
validating
- validate the input file, true = validate, false = don't validatepublic String getLoginPage()
public void setLoginPage(String loginPage)
loginPage
- The login page url (relative to site root)public String getErrorPage()
public void setErrorPage(String errorPage)
errorPage
- The login page URL (relative to site root)public String getLogoutPage()
public void setLogoutPage(String logoutPage)
logoutPage
- The logout page url (relative to site root)public String getDefaultPage()
public void setDefaultPage(String defaultPage)
defaultPage
- The default page URL (relative to site root)public String getAuthMethod()
public void setAuthMethod(String authMethod)
authMethod
- The authentication method to be used by the filterpublic String getRealmName()
public void setRealmName(String realmName)
realmName
- the realm name to be used for BASIC authenticationpublic SecurityRealmInterface getRealm()
public void addRealm(Object realm) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
realm
- The realm to use, or nest in deeper realmNoSuchMethodException
IllegalAccessException
InvocationTargetException
public boolean isSetCookies()
public void setSetCookies(String setCookies)
public boolean isAcceptCookie()
public void setAcceptCookie(String acceptCookie)
public String getSecretKey()
public void setSecretKey(String secretKey)
public String getExtraHashString()
public void setExtraHashString(String extraHashString)
public String getCookiePaths()
public void setCookiePaths(String cookiePaths)
public int getCookieExpire()
public void setCookieExpire(String cookieExpire)
public List getSecurityConstraints()
public void addSecurityConstraint(SecurityConstraint constraint)
constraint
- The SecurityConstraint to addpublic void setPersistentLoginManager(PersistentLoginManagerInterface persistentLoginManager)
persistentLoginManager
- StickyLoginManager to use for this implementationpublic PersistentLoginManagerInterface getPersistentLoginManager()
public void loadConfig(URL configURL) throws IOException, SAXException
configURL
- The url to load.IOException
- if an input/output error occursSAXException
- if the file has invalid xml syntaxprotected void registerLocalDTDs(org.apache.commons.digester.Digester digester)
digester
- Copyright © 2020 B3Partners B.V.. All rights reserved.