@Path(value="/realms") public class TokenManagement extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TokenManagement.AccessCode |
Modifier and Type | Field and Description |
---|---|
protected Map<String,TokenManagement.AccessCode> |
accessCodeMap |
protected javax.ws.rs.core.HttpHeaders |
headers |
protected IdentityManager |
identityManager |
protected Logger |
logger |
protected javax.ws.rs.ext.Providers |
providers |
protected javax.ws.rs.core.SecurityContext |
securityContext |
protected javax.ws.rs.core.UriInfo |
uriInfo |
Constructor and Description |
---|
TokenManagement(IdentityManager identityManager) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
accessRequest(String realmId,
javax.ws.rs.core.MultivaluedMap<String,String> formData) |
javax.ws.rs.core.Response |
accessTokenGrant(String realmId,
javax.ws.rs.core.MultivaluedMap<String,String> formParams)
OAuth Section 4.4 Client Credentials Grant
|
protected AccessTokenResponse |
accessTokenResponse(PrivateKey privateKey,
SkeletonKeyToken token) |
protected boolean |
authenticate(Realm realm,
User user,
javax.ws.rs.core.MultivaluedMap<String,String> formData) |
protected SkeletonKeyToken |
createAccessToken(User user,
Realm realm) |
protected SkeletonKeyToken |
createToken(String scopeParam,
Realm realm,
User client,
User user) |
javax.ws.rs.core.Response |
login(String realmName,
javax.ws.rs.core.MultivaluedMap<String,String> formData) |
javax.ws.rs.core.Response |
requestAccessCode(String realmName,
String responseType,
String redirect,
String clientId,
String scopeParam,
String state) |
protected IdentityManager identityManager
protected Logger logger
protected Map<String,TokenManagement.AccessCode> accessCodeMap
@Context protected javax.ws.rs.core.UriInfo uriInfo
@Context protected javax.ws.rs.ext.Providers providers
@Context protected javax.ws.rs.core.SecurityContext securityContext
@Context protected javax.ws.rs.core.HttpHeaders headers
public TokenManagement(IdentityManager identityManager)
protected SkeletonKeyToken createAccessToken(User user, Realm realm)
@Path(value="{realm}/auth/request/login") @POST @Consumes(value="application/x-www-form-urlencoded") public javax.ws.rs.core.Response login(@PathParam(value="realm") String realmName, javax.ws.rs.core.MultivaluedMap<String,String> formData)
protected SkeletonKeyToken createToken(String scopeParam, Realm realm, User client, User user)
@Path(value="{realm}/access/codes") @POST @Produces(value="application/json") public javax.ws.rs.core.Response accessRequest(@PathParam(value="realm") String realmId, javax.ws.rs.core.MultivaluedMap<String,String> formData)
protected AccessTokenResponse accessTokenResponse(PrivateKey privateKey, SkeletonKeyToken token)
@Path(value="{realm}/auth/request") @GET public javax.ws.rs.core.Response requestAccessCode(@PathParam(value="realm") String realmName, @QueryParam(value="response_type") String responseType, @QueryParam(value="redirect_uri") String redirect, @QueryParam(value="client_id") String clientId, @QueryParam(value="scope") String scopeParam, @QueryParam(value="state") String state)
@Path(value="{realm}/grants") @POST @Consumes(value="application/x-www-form-urlencoded") @Produces(value="application/json") public javax.ws.rs.core.Response accessTokenGrant(@PathParam(value="realm") String realmId, javax.ws.rs.core.MultivaluedMap<String,String> formParams)
Copyright © 2018 JBoss by Red Hat. All rights reserved.