Interface AuthenticationService
-
- All Known Implementing Classes:
DefaultAuthenticationService
@Path("/auth") @Consumes("application/json") public interface AuthenticationService
Authentication service- Since:
- 3.0
- Author:
- Martin Stockhammer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserInfo
getAuthenticatedUser()
Check, if the current request is authenticated and if so return the current user dataTokenResponse
logIn(TokenRequest loginRequest)
Check username/password and return a bearer token.PingResult
ping()
Just a ping request / response for checking availability of the serverPingResult
pingWithAutz()
This ping request is only successful, if the provided Bearer token is valid and authenticates a existing userTokenResponse
token(TokenRefreshRequest tokenRequest)
Request a new token.
-
-
-
Method Detail
-
ping
@Path("ping") @GET @Produces("application/json") PingResult ping() throws RedbackServiceException
Just a ping request / response for checking availability of the server- Returns:
- the ping result
- Throws:
RedbackServiceException
-
pingWithAutz
@Path("ping/authenticated") @GET @Produces("application/json") PingResult pingWithAutz() throws RedbackServiceException
This ping request is only successful, if the provided Bearer token is valid and authenticates a existing user- Returns:
- the ping result or a failure message
- Throws:
RedbackServiceException
-
logIn
@Path("authenticate") @POST @Produces("application/json") TokenResponse logIn(TokenRequest loginRequest) throws RedbackServiceException
Check username/password and return a bearer token. The bearer token can be added to the HTTP header on further requests to authenticate.- Throws:
RedbackServiceException
-
token
@Path("token") @POST @Produces("application/json") TokenResponse token(TokenRefreshRequest tokenRequest) throws RedbackServiceException
Request a new token.- Throws:
RedbackServiceException
-
getAuthenticatedUser
@Path("authenticated") @GET @Produces("application/json") UserInfo getAuthenticatedUser() throws RedbackServiceException
Check, if the current request is authenticated and if so return the current user data- Throws:
RedbackServiceException
-
-