Class XServiceProvider
java.lang.Object
io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
io.goobi.viewer.model.security.authentication.VuFindProvider
io.goobi.viewer.model.security.authentication.XServiceProvider
- All Implemented Interfaces:
IAuthenticationProvider
XServiceProvider class.
-
Field Summary
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
ConstructorDescriptionXServiceProvider
(String name, String label, String url, String image, long timeoutMillis) Constructor for XServiceProvider. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether this authentication service allows user to edit their password or to reset itReturns a future containing the login result upon completion.void
logout()
Logs the user outMethods inherited from class io.goobi.viewer.model.security.authentication.VuFindProvider
allowsEmailChange, allowsNicknameChange
Methods inherited from class io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
get, getAddUserToGroups, getImage, getImageUrl, getLabel, getName, getRedirectUrl, getTimeoutMillis, getType, getUrl, post, setAddUserToGroups, setRedirectUrl
-
Constructor Details
-
Method Details
-
login
public CompletableFuture<LoginResult> login(String borID, String password) throws AuthenticationProviderException 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()
- Specified by:
login
in interfaceIAuthenticationProvider
- Overrides:
login
in classVuFindProvider
- Parameters:
borID
- 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.
-
logout
Logs the user out- Specified by:
logout
in interfaceIAuthenticationProvider
- Overrides:
logout
in classVuFindProvider
- Throws:
AuthenticationProviderException
- if any.
-
allowsPasswordChange
public boolean allowsPasswordChange()Check whether this authentication service allows user to edit their password or to reset it- Specified by:
allowsPasswordChange
in interfaceIAuthenticationProvider
- Overrides:
allowsPasswordChange
in classVuFindProvider
- Returns:
- true if the authentication service provides means to change or reset the user password
-