Class LoginResult
java.lang.Object
io.goobi.viewer.model.security.authentication.LoginResult
LoginResult class.
- Author:
- Florian Alpers
-
Constructor Summary
ConstructorDescriptionLoginResult
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationProviderException exception) Constructor for LoginResult.LoginResult
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationProviderException exception, long delay) Constructor for LoginResult.LoginResult
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Optional<User> user, boolean loginRefused) Constructor for LoginResult.LoginResult
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Optional<User> user, boolean loginRefused, long delay) Constructor for LoginResult. -
Method Summary
Modifier and TypeMethodDescriptionlong
getDelay()
javax.servlet.http.HttpServletRequest
Getter for the fieldrequest
.javax.servlet.http.HttpServletResponse
Getter for the fieldresponse
.getUser()
Getter for the fielduser
.isRedirected
(long timeout) isRedirected.boolean
isRefused.void
setRedirected.
-
Constructor Details
-
LoginResult
public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Optional<User> user, boolean loginRefused) Constructor for LoginResult.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.user
- aOptional
object.loginRefused
- true if the login has been refused even if the user may exist and be valid. Typically true for wrong password
-
LoginResult
public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Optional<User> user, boolean loginRefused, long delay) Constructor for LoginResult.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.user
- aOptional
object.loginRefused
- true if the login has been refused even if the user may exist and be valid. Typically true for wrong passworddelay
- a configured delay time
-
LoginResult
public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationProviderException exception) Constructor for LoginResult.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.exception
- aAuthenticationProviderException
object.
-
LoginResult
public LoginResult(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AuthenticationProviderException exception, long delay) Constructor for LoginResult.
- Parameters:
request
- aHttpServletRequest
object.response
- aHttpServletResponse
object.exception
- aAuthenticationProviderException
object.delay
- a configured delay time
-
-
Method Details
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest()Getter for the field
request
.- Returns:
- the request
-
getResponse
public javax.servlet.http.HttpServletResponse getResponse()Getter for the field
response
.- Returns:
- the response
-
getUser
Getter for the field
user
.- Returns:
- the user Optional containing the user if login was successful. Otherwise an empty optional
- Throws:
AuthenticationProviderException
- if any.
-
isRedirected
isRedirected.
- Parameters:
timeout
- a long.- Returns:
- a
Future
object.
-
setRedirected
public void setRedirected()setRedirected.
-
isRefused
public boolean isRefused()isRefused.
- Returns:
- the refused
-
getDelay
public long getDelay()- Returns:
- the delay
-