org.jboss.resteasy.skeleton.key.idm.service

## Class TokenManagement

- java.lang.Object
- - org.jboss.resteasy.skeleton.key.idm.service.TokenManagement

-     @Path(value="/realms")
      public class TokenManagement
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TokenManagement.AccessCode`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,TokenManagement.AccessCode>` | `accessCodeMap`
    `protected HttpHeaders` | `headers`
    `protected IdentityManager` | `identityManager`
    `protected Logger` | `logger`
    `protected Providers` | `providers`
    `protected SecurityContext` | `securityContext`
    `protected UriInfo` | `uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenManagement(IdentityManager identityManager)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Response` | `accessRequest(String realmId, MultivaluedMap<String,String> formData)`
    `Response` | `accessTokenGrant(String realmId, 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, MultivaluedMap<String,String> formData)`
    `protected SkeletonKeyToken` | `createAccessToken(User user, Realm realm)`
    `protected SkeletonKeyToken` | `createToken(String scopeParam, Realm realm, User client, User user)`
    `Response` | `login(String realmName, MultivaluedMap<String,String> formData)`
    `Response` | `requestAccessCode(String realmName, String responseType, String redirect, String clientId, String scopeParam, String state)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### identityManager

          protected IdentityManager identityManager

    - #### logger

          protected Logger logger

    - #### accessCodeMap

          protected Map<String,TokenManagement.AccessCode> accessCodeMap

    - #### uriInfo

          @Context
          protected UriInfo uriInfo

    - #### providers

          @Context
          protected Providers providers

    - #### securityContext

          @Context
          protected SecurityContext securityContext

    - #### headers

          @Context
          protected HttpHeaders headers

  - ### Constructor Detail

    - #### TokenManagement

          public TokenManagement(IdentityManager identityManager)

  - ### Method Detail

    - #### createAccessToken

          protected SkeletonKeyToken createAccessToken(User user,
                                           Realm realm)

    - #### login

          @Path(value="{realm}/auth/request/login")
          @POST
          @Consumes(value="application/x-www-form-urlencoded")
          public Response login(@PathParam(value="realm")
                                                    String realmName,
                                                    MultivaluedMap<String,String> formData)

    - #### createToken

          protected SkeletonKeyToken createToken(String scopeParam,
                                     Realm realm,
                                     User client,
                                     User user)

    - #### accessRequest

          @Path(value="{realm}/access/codes")
          @POST
          @Produces(value="application/json")
          public Response accessRequest(@PathParam(value="realm")
                                                            String realmId,
                                                            MultivaluedMap<String,String> formData)

    - #### accessTokenResponse

          protected AccessTokenResponse accessTokenResponse(PrivateKey privateKey,
                                                SkeletonKeyToken token)

    - #### requestAccessCode

          @Path(value="{realm}/auth/request")
          @GET
          public 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)

    - #### accessTokenGrant

          @Path(value="{realm}/grants")
          @POST
          @Consumes(value="application/x-www-form-urlencoded")
          @Produces(value="application/json")
          public Response accessTokenGrant(@PathParam(value="realm")
                                                                             String realmId,
                                                                             MultivaluedMap<String,String> formParams)

      OAuth Section 4.4 Client Credentials Grant

    - #### authenticate

          protected boolean authenticate(Realm realm,
                             User user,
                             MultivaluedMap<String,String> formData)

Copyright © 2014. All Rights Reserved.