Package org.opencms.main
Class CmsHttpAuthenticationSettings
java.lang.Object
org.opencms.main.CmsHttpAuthenticationSettings
Contains the settings to handle HTTP basic authentication.
These settings control whether a browser-based pop-up dialog should be used for authentication, or of the user should be redirected to an OpenCms URI for a form-based authentication.
Since the URI for the form-based authentication is a system wide setting, users are able to specify different authentication forms in a property "login-form" on resources that require authentication.
- Since:
- 6.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the browser based authentication mechanism ornullif unused.Returns the browser based authentication text for the configuration.Returns the URI of the system wide login form if browser-based HTTP basic authentication is disabled.voidSets the URI of the system wide login form if browser-based HTTP basic authentication is disabled.voidsetUseBrowserBasedHttpAuthentication(boolean value) Sets if browser-based HTTP basic authentication is enabled or disabled.voidSets if browser-based HTTP basic authentication is enabled or disabled.booleanTests if browser-based HTTP basic authentication is enabled or disabled.
-
Field Details
-
AUTHENTICATION_BASIC
The mechanism name for basic HTTP authentication.- See Also:
-
AUTHENTICATION_FORM
The mechanism name for form based authentication.- See Also:
-
DEFAULT_AUTHENTICATION_URI
The URI of the default authentication form.- See Also:
-
-
Constructor Details
-
CmsHttpAuthenticationSettings
public CmsHttpAuthenticationSettings()Default constructor.
-
-
Method Details
-
getBrowserBasedAuthenticationMechanism
Returns the browser based authentication mechanism ornullif unused.- Returns:
- "BASIC" in case of browser based basic authentication, "FORM" in case of form based authentication or the alternative mechanism or
nullif unused.
-
getConfigBrowserBasedAuthentication
Returns the browser based authentication text for the configuration.- Returns:
- the browser based authentication text for the configuration
-
getFormBasedHttpAuthenticationUri
Returns the URI of the system wide login form if browser-based HTTP basic authentication is disabled.- Returns:
- the URI of the system wide login form if browser-based HTTP basic authentication is disabled
-
setFormBasedHttpAuthenticationUri
Sets the URI of the system wide login form if browser-based HTTP basic authentication is disabled.- Parameters:
uri- the URI of the system wide login form if browser-based HTTP basic authentication is disabled to set
-
setUseBrowserBasedHttpAuthentication
Sets if browser-based HTTP basic authentication is enabled or disabled.- Parameters:
value- a boolean value to specifiy if browser-based HTTP basic authentication should be enabled
-
setUseBrowserBasedHttpAuthentication
Sets if browser-based HTTP basic authentication is enabled or disabled.- Parameters:
value- a string {"true"|"false"} to specify if browser-based HTTP basic authentication should be enabled; if another string is provided, the flag for browser based basic authentication is disabled and the value is stored as authentication mechanism.
-
useBrowserBasedHttpAuthentication
Tests if browser-based HTTP basic authentication is enabled or disabled.- Returns:
- true if browser-based HTTP basic authentication is enabled
-