@Path(value="/oauth/consumers") public class ConsumersService extends Object
| Modifier and Type | Field and Description |
|---|---|
protected javax.servlet.http.HttpServletRequest |
httpRequest |
protected javax.servlet.http.HttpServletResponse |
httpResponse |
| Constructor and Description |
|---|
ConsumersService() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.wink.json4j.JSONObject |
asJson(LyoOAuthConsumer consumer) |
javax.ws.rs.core.Response |
getAllConsumers() |
protected javax.ws.rs.core.Response |
handleConsumerStoreException(ConsumerStoreException e) |
javax.ws.rs.core.Response |
removeConsumer(String key)
Deletes an OAuth consumer.
|
javax.ws.rs.core.Response |
updateConsumer(String key,
String name,
String trusted,
String provisional)
Updates an OAuth consumer.
|
@Context protected javax.servlet.http.HttpServletRequest httpRequest
@Context protected javax.servlet.http.HttpServletResponse httpResponse
@GET
@Produces(value="application/json")
public javax.ws.rs.core.Response getAllConsumers()
throws org.apache.wink.json4j.JSONException
org.apache.wink.json4j.JSONException@POST
@Path(value="/{key}")
@Consumes(value="application/x-www-form-urlencoded")
public javax.ws.rs.core.Response updateConsumer(@PathParam(value="key")
String key,
@FormParam(value="name")
String name,
@FormParam(value="trusted")
String trusted,
@FormParam(value="provisional")
String provisional)
key - the consumer keyname - the new name or nulltrusted - "true" the consumer is trusted. Can be null.provisional - "true" if the consumer is provisional or "false" if the
consumer is authorized. Can be null.@DELETE
@Path(value="/{key}")
public javax.ws.rs.core.Response removeConsumer(@PathParam(value="key")
String key)
key - the consumer keyprotected javax.ws.rs.core.Response handleConsumerStoreException(ConsumerStoreException e)
protected org.apache.wink.json4j.JSONObject asJson(LyoOAuthConsumer consumer) throws org.apache.wink.json4j.JSONException
org.apache.wink.json4j.JSONExceptionCopyright © 2021. All rights reserved.