Interface AuthenticationResource
@Path("/auth")
public interface AuthenticationResource
Authentication Resource. This can be used to authenticate an existing SID.
-
Method Summary
Modifier and TypeMethodDescriptionPerform a login to the system with SSO systemsReturns the global prefixhashPassword(jakarta.servlet.http.HttpServletRequest httpServletRequest, HashPasswordRequest hashPasswordRequest) Create a hash of the given password and userID The hashing algorithm can change at any time.login(LoginRequest request) Perform a login to the system based on user credentials.logout()Do a logout for the current sessionmatchPassword(jakarta.servlet.http.HttpServletRequest httpServletRequest, MatchPasswordRequest matchPasswordRequest) Checks if the given password matches the given hash As this method is possibly expensive (depends on the implemented hash algorithm), we don't allow anonymous access to it.ssoLogin()Perform a login to the system with SSO systemsvalidate()Validate the session
-
Method Details
-
validate
Validate the session- Returns:
- response containing validation result and (possibly) a user
- Throws:
Exception
-
alternateSsoLogin
Perform a login to the system with SSO systems- Returns:
- SID or "NOTFOUND" or "FAILURE"
-
ssoLogin
Perform a login to the system with SSO systems- Returns:
- SID or "NOTFOUND" or "FAILURE"
-
login
Perform a login to the system based on user credentials. If the user is successfully authenticated, create a new session and send back the sid. If a new sessionSecret is created, set it as a cookie- Parameters:
request- login request (contains the login credentials)- Returns:
- login response
- Throws:
Exception
-
logout
Do a logout for the current session- Returns:
- generic response
- Throws:
Exception
-
hashPassword
@POST @Path("/hashpassword") HashPasswordResponse hashPassword(@Context jakarta.servlet.http.HttpServletRequest httpServletRequest, HashPasswordRequest hashPasswordRequest) Create a hash of the given password and userID The hashing algorithm can change at any time. As this method is possibly expensive (depends on the implemented hash algorithm), we don't allow anonymous access to it.- Parameters:
hashPasswordRequest- Password request object- Returns:
- HashPasswordResponse
-
matchPassword
@POST @Path("/matchpassword") GenericResponse matchPassword(@Context jakarta.servlet.http.HttpServletRequest httpServletRequest, MatchPasswordRequest matchPasswordRequest) Checks if the given password matches the given hash As this method is possibly expensive (depends on the implemented hash algorithm), we don't allow anonymous access to it.- Parameters:
matchPasswordRequest- Password match request object- Returns:
- GenericResponse
-
globalPrefix
Returns the global prefix- Returns:
- GenericResponse
-