@Path(value="/token") @ScopesAllowed(value={"kangaroo:token_admin","kangaroo:token"}) public final class OAuthTokenService extends AbstractService
| Constructor and Description |
|---|
OAuthTokenService() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
browse(int offset,
int limit,
String sort,
SortOrder order,
BigInteger ownerId,
BigInteger userIdentityId,
BigInteger clientId)
Browse the identities in the system.
|
javax.ws.rs.core.Response |
createResource(OAuthToken token)
Create a new token.
|
javax.ws.rs.core.Response |
deleteResource(BigInteger id)
Delete an scope.
|
protected String |
getAccessScope()
Return the scope required to access resources on this service.
|
protected String |
getAdminScope()
Return the scope required to access ALL resources on this services.
|
javax.ws.rs.core.Response |
getResource(BigInteger id)
Returns a specific entity.
|
javax.ws.rs.core.Response |
search(Integer offset,
Integer limit,
String queryString,
BigInteger ownerId,
BigInteger userId,
BigInteger userIdentityId,
BigInteger clientId,
OAuthTokenType type)
Search the tokens in the system.
|
javax.ws.rs.core.Response |
updateResource(BigInteger id,
OAuthToken token)
Update a token.
|
assertCanAccess, assertCanAccessSubresource, executeQuery, getAdminApplication, getConfig, getCurrentUser, getFullTextSession, getInjector, getSearchFactory, getSecurityContext, getSession, getUriInfo, requireEntityInput, resolveEntityInput, resolveEntityInput, resolveFilterEntity, resolveOwnershipFilter, setConfig, setFullTextSession, setInjector, setSearchFactory, setSecurityContext, setSession, setUriInfo@GET
@Path(value="/search")
@Produces(value="application/json")
public javax.ws.rs.core.Response search(@DefaultValue(value="0") @QueryParam(value="offset")
Integer offset,
@DefaultValue(value="10") @QueryParam(value="limit")
Integer limit,
@DefaultValue(value="") @QueryParam(value="q")
String queryString,
@Optional @QueryParam(value="owner")
BigInteger ownerId,
@Optional @QueryParam(value="user")
BigInteger userId,
@Optional @QueryParam(value="identity")
BigInteger userIdentityId,
@Optional @QueryParam(value="client")
BigInteger clientId,
@Optional @QueryParam(value="type")
OAuthTokenType type)
offset - The offset of the first entity to fetch.limit - The number of entities to fetch.queryString - The search term for the query.ownerId - An optional owner ID to filter by.userId - An optional user ID to filter by.userIdentityId - An optional identity ID to filter by.clientId - An optional client ID to filter by.type - An optional OAuth Token Type to filter by.@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response browse(@QueryParam(value="offset") @DefaultValue(value="0")
int offset,
@QueryParam(value="limit") @DefaultValue(value="10")
int limit,
@QueryParam(value="sort") @DefaultValue(value="createdDate")
String sort,
@QueryParam(value="order") @DefaultValue(value="ASC")
SortOrder order,
@Optional @QueryParam(value="owner")
BigInteger ownerId,
@Optional @QueryParam(value="identity")
BigInteger userIdentityId,
@Optional @QueryParam(value="client")
BigInteger clientId)
offset - The offset of the first entity to fetch.limit - The number of entities to fetch.sort - The field on which the entities should be sorted.order - The sort order, ASC or DESC.ownerId - An optional owner ID to filter by.userIdentityId - An optional identity ID to filter by.clientId - An optional client ID to filter by.@GET
@Path(value="/{id: [a-f0-9]{32}}")
@Produces(value="application/json")
public javax.ws.rs.core.Response getResource(@PathParam(value="id")
BigInteger id)
id - The Unique Identifier for the entity.@POST @Consumes(value="application/json") public javax.ws.rs.core.Response createResource(OAuthToken token)
token - The oauth token to create.@PUT
@Path(value="/{id: [a-f0-9]{32}}")
@Consumes(value="application/json")
@Produces(value="application/json")
public javax.ws.rs.core.Response updateResource(@PathParam(value="id")
BigInteger id,
OAuthToken token)
id - The Unique Identifier for the token.token - The token to update.@DELETE
@Path(value="/{id: [a-f0-9]{32}}")
public javax.ws.rs.core.Response deleteResource(@PathParam(value="id")
BigInteger id)
id - The Unique Identifier for the scope.protected String getAdminScope()
getAdminScope in class AbstractServiceprotected String getAccessScope()
getAccessScope in class AbstractServiceCopyright © 2018 krotscheck.net. All rights reserved.