public abstract class OAuthServerResource extends ServerResource implements OAuthResourceDefs
Modifier and Type | Field and Description |
---|---|
protected org.restlet.ext.oauth.internal.ClientManager |
clients |
static String |
PARAMETER_DEFAULT_SCOPE |
protected org.restlet.ext.oauth.internal.TokenManager |
tokens |
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 and Description |
---|
OAuthServerResource()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getDescription, getInfo, getInfo, getName, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, patch, patch, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDescription, setDimensions, setExisting, setLocationRef, setLocationRef, setName, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString
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
public static void addCacheDirective(Response response, CacheDirective cacheDirective)
public static Representation responseErrorRepresentation(OAuthException ex)
ex
- Any OAuthException with errorprotected 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
Copyright © 2005-2014 Restlet.