org.eclipse.lyo.server.oauth.webapp.services
Class ConsumersService
java.lang.Object
org.eclipse.lyo.server.oauth.webapp.services.ConsumersService
public class ConsumersService
- extends Object
Manages OAuth consumers for this provider.
- Author:
- Samuel Padgett
Field Summary |
protected javax.servlet.http.HttpServletRequest |
httpRequest
|
protected javax.servlet.http.HttpServletResponse |
httpResponse
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
httpRequest
@Context
protected javax.servlet.http.HttpServletRequest httpRequest
httpResponse
@Context
protected javax.servlet.http.HttpServletResponse httpResponse
ConsumersService
public ConsumersService()
getAllConsumers
public javax.ws.rs.core.Response getAllConsumers()
throws org.apache.wink.json4j.JSONException
- Throws:
org.apache.wink.json4j.JSONException
updateConsumer
public javax.ws.rs.core.Response updateConsumer(String key,
String name,
String trusted,
String provisional)
- Updates an OAuth consumer.
- Parameters:
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.
- Returns:
- the HTTP response
removeConsumer
public javax.ws.rs.core.Response removeConsumer(String key)
- Deletes an OAuth consumer.
- Parameters:
key
- the consumer key
- Returns:
- the HTTP response
handleConsumerStoreException
protected javax.ws.rs.core.Response handleConsumerStoreException(ConsumerStoreException e)
asJson
protected org.apache.wink.json4j.JSONObject asJson(LyoOAuthConsumer consumer)
throws org.apache.wink.json4j.JSONException
- Throws:
org.apache.wink.json4j.JSONException
Copyright © 2013. All Rights Reserved.