Class HttpHeaderProvider
java.lang.Object
io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
io.goobi.viewer.model.security.authentication.HttpHeaderProvider
- All Implemented Interfaces:
- IAuthenticationProvider
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringConstantTYPE_OPENID="openId"Fields inherited from class io.goobi.viewer.model.security.authentication.HttpAuthenticationProvideraddUserToGroups, connectionManager, DEFAULT_EMAIL, image, label, name, redirectUrl, timeoutMillis, type, TYPE_USER_PASSWORD, url
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanallowsEmailChange.booleanallowsNicknameChange.booleanCheck whether this authentication service allows user to edit their password or to reset itcompleteLogin(String ssoId, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) getAddUserToGroups.Returns a future containing the login result upon completion.voidlogout()Logs the user outvoidsetAddUserToGroups(List<String> addUserToGroups) setAddUserToGroups.voidsetLoginResult(LoginResult loginResult) Methods inherited from class io.goobi.viewer.model.security.authentication.HttpAuthenticationProviderget, getImage, getImageUrl, getLabel, getName, getRedirectUrl, getTimeoutMillis, getType, getUrl, post, setRedirectUrl
- 
Field Details- 
TYPE_HTTP_HEADERConstantTYPE_OPENID="openId"- See Also:
 
- 
PARAMETER_TYPE_HEADER- See Also:
 
 
- 
- 
Constructor Details
- 
Method Details- 
loginpublic CompletableFuture<LoginResult> login(String ssoId, String password) throws AuthenticationProviderException Returns a future containing the login result upon completion. The result optionally contains the logged inUseras well as theHttpServletRequestandHttpServletResponseto be used to complete the login and possible request forwarding If an error occurs and the request can not be processed, anAuthenticationExceptionmust be thrown. If a login has been refused, the exact reasons can be determined using the methodsUser.isActive(),User.isSuspended()andLoginResult.isRefused()- Parameters:
- ssoId- a- Stringobject.
- 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 CompletableFuturewhich is resolved once login is completed and contains aLoginResult
- Throws:
- AuthenticationProviderException- if any.
 
- 
loadUser- Parameters:
- parameterValue-
- Returns:
- Userif found; otherwise null
 
- 
completeLoginpublic Future<Boolean> completeLogin(String ssoId, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) - Parameters:
- ssoId- User identifier
- request- a- HttpServletRequestobject.
- response- a- HttpServletResponseobject.
- Returns:
- a Futureobject.
 
- 
logoutLogs the user out- Throws:
- AuthenticationProviderException- if any.
 
- 
allowsPasswordChangepublic boolean allowsPasswordChange()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
 
- 
allowsNicknameChangepublic boolean allowsNicknameChange()allowsNicknameChange. - Returns:
- true if the nickname may be changed and is not essential for user identification
 
- 
allowsEmailChangepublic boolean allowsEmailChange()allowsEmailChange. - Returns:
- true if the email may be changed and is not essential for user identification
 
- 
getAddUserToGroupsgetAddUserToGroups. - Specified by:
- getAddUserToGroupsin interface- IAuthenticationProvider
- Overrides:
- getAddUserToGroupsin class- HttpAuthenticationProvider
- Returns:
- a Listobject.
 
- 
setAddUserToGroupssetAddUserToGroups. - Specified by:
- setAddUserToGroupsin interface- IAuthenticationProvider
- Overrides:
- setAddUserToGroupsin class- HttpAuthenticationProvider
- Parameters:
- addUserToGroups- a- Listobject.
 
- 
getParameterType- Returns:
- the parameterType
 
- 
getParameterName- Returns:
- the parameterName
 
- 
setLoginResult
 
-