@Path(value="/token") public final class TokenService extends Object
| Constructor and Description |
|---|
TokenService(javax.ws.rs.core.SecurityContext securityContext,
org.glassfish.jersey.internal.inject.InjectionManager injector)
Create a new token service.
|
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
tokenRequest(javax.ws.rs.core.UriInfo uriInfo,
BigInteger code,
URI redirect,
String state,
String scope,
String username,
String password,
BigInteger refreshToken,
GrantType grantType)
Attempt to issue a token based on the requested token type.
|
@Inject
public TokenService(javax.ws.rs.core.SecurityContext securityContext,
org.glassfish.jersey.internal.inject.InjectionManager injector)
securityContext - Injected, resolved security context.injector - injection manager, to find the appropriate request
handler.@POST
@Consumes(value="application/x-www-form-urlencoded")
@Produces(value="application/json")
public javax.ws.rs.core.Response tokenRequest(@Context
javax.ws.rs.core.UriInfo uriInfo,
@Optional @FormParam(value="code")
BigInteger code,
@Optional @FormParam(value="redirect_uri")
URI redirect,
@Optional @FormParam(value="state")
String state,
@Optional @FormParam(value="scope")
String scope,
@Optional @FormParam(value="username")
String username,
@Optional @FormParam(value="password")
String password,
@Optional @FormParam(value="refresh_token")
BigInteger refreshToken,
@FormParam(value="grant_type")
GrantType grantType)
uriInfo - The raw HTTP request.code - Authorization code (Auth code flow)redirect - Redirect URL (Various flows)state - Client state (all)scope - Requested scopes (all)username - Username (Owner Credentials)password - Password (Owner Credentials)refreshToken - The refresh token (Refresh token flow)grantType - The requested granttype.Copyright © 2018 krotscheck.net. All rights reserved.