Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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`

Constructor Summary
`ConsumersService()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### httpRequest

    @Context
    protected javax.servlet.http.HttpServletRequest httpRequest

### httpResponse

    @Context
    protected javax.servlet.http.HttpServletResponse httpResponse

Constructor Detail

### ConsumersService

    public ConsumersService()

Method Detail

### 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 key
    `name` - the new name or null
    `trusted` - "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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All Rights Reserved.