Interface AuthenticationService
-
- All Known Implementing Classes:
DefaultAuthenticationService
@Path("/auth") @Consumes("application/json") public interface AuthenticationServiceAuthentication service- Since:
- 3.0
- Author:
- Martin Stockhammer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserInfogetAuthenticatedUser()Check, if the current request is authenticated and if so return the current user dataTokenResponselogIn(TokenRequest loginRequest)Check username/password and return a bearer token.PingResultping()Just a ping request / response for checking availability of the serverPingResultpingWithAutz()This ping request is only successful, if the provided Bearer token is valid and authenticates a existing userTokenResponsetoken(TokenRefreshRequest tokenRequest)Request a new token.
-
-
-
Method Detail
-
ping
@Path("ping") @GET @Produces("application/json") PingResult ping() throws RedbackServiceExceptionJust 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 RedbackServiceExceptionThis 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 RedbackServiceExceptionCheck 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 RedbackServiceExceptionRequest a new token.- Throws:
RedbackServiceException
-
getAuthenticatedUser
@Path("authenticated") @GET @Produces("application/json") UserInfo getAuthenticatedUser() throws RedbackServiceExceptionCheck, if the current request is authenticated and if so return the current user data- Throws:
RedbackServiceException
-
-