|
Restlet Framework 2.2.1 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.resource.Resource
org.restlet.resource.ServerResource
org.restlet.ext.oauth.OAuthServerResource
public abstract class OAuthServerResource
Base class for common resources used by the OAuth server side. Implements OAuth 2.0 (RFC6749)
Field Summary | |
---|---|
protected org.restlet.ext.oauth.internal.ClientManager |
clients
|
static String |
PARAMETER_DEFAULT_SCOPE
|
protected org.restlet.ext.oauth.internal.TokenManager |
tokens
|
Fields inherited from interface org.restlet.ext.oauth.OAuthResourceDefs |
---|
ACCESS_TOKEN, CLIENT_ID, CLIENT_SECRET, CODE, ERROR, ERROR_DESC, ERROR_URI, EXPIRES_IN, GRANT_TYPE, PASSWORD, REDIR_URI, REFRESH_TOKEN, RESPONSE_TYPE, SCOPE, STATE, TOKEN_TYPE, TOKEN_TYPE_BEARER, TOKEN_TYPE_MAC, USERNAME |
Constructor Summary | |
---|---|
OAuthServerResource()
Default constructor. |
Method Summary | |
---|---|
static void |
addCacheDirective(Response response,
CacheDirective cacheDirective)
|
protected void |
doInit()
|
protected org.restlet.ext.oauth.internal.Client |
getClient(Form params)
Get request parameter "client_id". |
protected String[] |
getScope(Form params)
Get request parameter "scope". |
protected String |
getState(Form params)
Get request parameter "state". |
static Representation |
responseErrorRepresentation(OAuthException ex)
Returns the representation of the given error. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PARAMETER_DEFAULT_SCOPE
protected volatile org.restlet.ext.oauth.internal.ClientManager clients
protected volatile org.restlet.ext.oauth.internal.TokenManager tokens
Constructor Detail |
---|
public OAuthServerResource()
Method Detail |
---|
protected void doInit() throws ResourceException
doInit
in class Resource
ResourceException
protected org.restlet.ext.oauth.internal.Client getClient(Form params) throws OAuthException
params
-
OAuthException
protected String[] getScope(Form params) throws OAuthException
params
-
OAuthException
protected String getState(Form params)
params
-
OAuthException
public static Representation responseErrorRepresentation(OAuthException ex)
ex
- Any OAuthException with error
public static void addCacheDirective(Response response, CacheDirective cacheDirective)
|
Restlet Framework 2.2.1 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |