org.jboss.resteasy.keystone.server

## Class TokenService

- java.lang.Object
- - org.jboss.resteasy.keystone.server.TokenService

-     @Path(value="/tokens")
      public class TokenService
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenService(org.infinispan.Cache cache, long expiration, TimeUnit expirationUnit, ProjectsService projects, UsersService users)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Access` | `create(Authentication auth)`
    `SignedOutput` | `createSigned(Authentication auth)`
    `UrlToken` | `createTiny(Authentication auth)`
    `Access` | `get(String tokenId)`
    `X509Certificate` | `getCertificate()`
    `void` | `setCertificate(X509Certificate certificate)`
    `void` | `setPrivateKey(PrivateKey privateKey)`

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

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

- - ### Constructor Detail

    - #### TokenService

          public TokenService(org.infinispan.Cache cache,
                      long expiration,
                      TimeUnit expirationUnit,
                      ProjectsService projects,
                      UsersService users)

  - ### Method Detail

    - #### getCertificate

          public X509Certificate getCertificate()

    - #### setPrivateKey

          public void setPrivateKey(PrivateKey privateKey)

    - #### setCertificate

          public void setCertificate(X509Certificate certificate)

    - #### createSigned

          @Path(value="signed")
          @Produces(value="text/plain")
          @Consumes(value="application/json")
          @POST
          public SignedOutput createSigned(Authentication auth)
                                    throws Exception

      Throws:
        `Exception`

    - #### create

          @POST
          @Consumes(value="application/json")
          @Produces(value="application/json")
          public Access create(Authentication auth)
                        throws Exception

      Throws:
        `Exception`

    - #### createTiny

          @POST
          @Path(value="url")
          @Consumes(value="application/json")
          @Produces(value="application/json")
          public UrlToken createTiny(Authentication auth)
                              throws Exception

      Throws:
        `Exception`

    - #### get

          @GET
          @Produces(value="application/json")
          @Path(value="{token}")
          @RolesAllowed(value={"token-verifier","admin"})
          public Access get(@PathParam(value="token")
                                                            String tokenId)
                     throws NotFoundException

      Throws:
        `NotFoundException`

Copyright © 2014. All Rights Reserved.