@Path(value="/authentication")
@Produces(value="application/json")
@Consumes(value="application/x-www-form-urlencoded")
public abstract class AuthenticationEndpoint
extends java.lang.Object
| Constructor and Description |
|---|
AuthenticationEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
authenticate(java.lang.String username,
java.lang.String password)
Authenticate against your user-management-system.
|
javax.ws.rs.core.Response |
authenticateUser(java.lang.String username,
java.lang.String password)
Authenticate user.
|
protected abstract java.lang.String |
newToken(java.lang.String username)
Create a new token that is associated with the given username.
|
protected abstract void authenticate(java.lang.String username,
java.lang.String password)
throws java.lang.Exception
username - the usernamepassword - the passwordjava.lang.Exception - is thrown if the credentials are not valid@POST
public javax.ws.rs.core.Response authenticateUser(@FormParam(value="username")
java.lang.String username,
@FormParam(value="password")
java.lang.String password)
username - the usernamepassword - the passwordprotected abstract java.lang.String newToken(java.lang.String username)
username - the username