Class HttpHeaderProvider
java.lang.Object
io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
io.goobi.viewer.model.security.authentication.HttpHeaderProvider
- All Implemented Interfaces:
IAuthenticationProvider
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
ConstantTYPE_OPENID="openId"
Fields inherited from class io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
addUserToGroups, connectionManager, DEFAULT_EMAIL, image, label, name, redirectUrl, timeoutMillis, type, TYPE_USER_PASSWORD, url
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allowsEmailChange.boolean
allowsNicknameChange.boolean
Check whether this authentication service allows user to edit their password or to reset itcompleteLogin
(String ssoId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) getAddUserToGroups.Returns a future containing the login result upon completion.void
logout()
Logs the user outvoid
setAddUserToGroups
(List<String> addUserToGroups) setAddUserToGroups.void
setLoginResult
(LoginResult loginResult) Methods inherited from class io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
get, getImage, getImageUrl, getLabel, getName, getRedirectUrl, getTimeoutMillis, getType, getUrl, post, setRedirectUrl
-
Field Details
-
TYPE_HTTP_HEADER
ConstantTYPE_OPENID="openId"
- See Also:
-
PARAMETER_TYPE_HEADER
- See Also:
-
-
Constructor Details
-
Method Details
-
login
public CompletableFuture<LoginResult> login(String ssoId, String password) throws AuthenticationProviderException Description copied from interface:IAuthenticationProvider
Returns a future containing the login result upon completion. The result optionally contains the logged inUser
as well as theHttpServletRequest
andHttpServletResponse
to be used to complete the login and possible request forwarding If an error occurs and the request can not be processed, anAuthenticationException
must be thrown. If a login has been refused, the exact reasons can be determined using the methodsUser.isActive()
,User.isSuspended()
andLoginResult.isRefused()
- Parameters:
ssoId
- aString
object.password
- A string to be used as a password or similar for login. If the provider does not require such a string, this can be left empty or null- Returns:
- A
CompletableFuture
which is resolved once login is completed and contains aLoginResult
- Throws:
AuthenticationProviderException
- if any.
-
loadUser
- Parameters:
parameterValue
-- Returns:
User
if found; otherwise null
-
completeLogin
public Future<Boolean> completeLogin(String ssoId, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) - Parameters:
ssoId
- User identifierrequest
- aHttpServletRequest
object.response
- aHttpServletResponse
object.- Returns:
- a
Future
object.
-
logout
Description copied from interface:IAuthenticationProvider
Logs the user out- Throws:
AuthenticationProviderException
- if any.
-
allowsPasswordChange
public boolean allowsPasswordChange()Description copied from interface:IAuthenticationProvider
Check whether this authentication service allows user to edit their password or to reset it- Returns:
- true if the authentication service provides means to change or reset the user password
-
allowsNicknameChange
public boolean allowsNicknameChange()Description copied from interface:IAuthenticationProvider
allowsNicknameChange.
- Returns:
- true if the nickname may be changed and is not essential for user identification
-
allowsEmailChange
public boolean allowsEmailChange()Description copied from interface:IAuthenticationProvider
allowsEmailChange.
- Returns:
- true if the email may be changed and is not essential for user identification
-
getAddUserToGroups
Description copied from class:HttpAuthenticationProvider
getAddUserToGroups.
- Specified by:
getAddUserToGroups
in interfaceIAuthenticationProvider
- Overrides:
getAddUserToGroups
in classHttpAuthenticationProvider
- Returns:
- a
List
object.
-
setAddUserToGroups
Description copied from class:HttpAuthenticationProvider
setAddUserToGroups.
- Specified by:
setAddUserToGroups
in interfaceIAuthenticationProvider
- Overrides:
setAddUserToGroups
in classHttpAuthenticationProvider
- Parameters:
addUserToGroups
- aList
object.
-
getParameterType
- Returns:
- the parameterType
-
getParameterName
- Returns:
- the parameterName
-
setLoginResult
-