@Path(value="/tokens") public class TokenService extends Object
Constructor and Description |
---|
TokenService(org.infinispan.Cache cache,
long expiration,
TimeUnit expirationUnit,
ProjectsService projects,
UsersService users) |
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) |
public TokenService(org.infinispan.Cache cache, long expiration, TimeUnit expirationUnit, ProjectsService projects, UsersService users)
public X509Certificate getCertificate()
public void setPrivateKey(PrivateKey privateKey)
public void setCertificate(X509Certificate certificate)
@Path(value="signed") @Produces(value="text/plain") @Consumes(value="application/json") @POST public SignedOutput createSigned(Authentication auth) throws Exception
Exception
@POST @Consumes(value="application/json") @Produces(value="application/json") public Access create(Authentication auth) throws Exception
Exception
@POST @Path(value="url") @Consumes(value="application/json") @Produces(value="application/json") public UrlToken createTiny(Authentication auth) throws Exception
Exception
@GET @Produces(value="application/json") @Path(value="{token}") @RolesAllowed(value={"token-verifier","admin"}) public Access get(@PathParam(value="token") String tokenId) throws javax.ws.rs.NotFoundException
javax.ws.rs.NotFoundException
Copyright © 2015 JBoss by Red Hat. All rights reserved.