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)
Adds a cache directive to the response.
|
protected void |
doInit() |
protected org.restlet.ext.oauth.internal.Client |
getClient(Form parameters)
Get request parameter "client_id".
|
protected String[] |
getScope(Form parameters)
Get request parameter "scope".
|
protected String |
getState(Form parameters)
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)
response
- The current response.cacheDirective
- The cache directive to add.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 parameters) throws OAuthException
parameters
- OAuthException
protected String[] getScope(Form parameters) throws OAuthException
parameters
- OAuthException
protected String getState(Form parameters)
parameters
- OAuthException
Copyright © 2005-2015 Restlet.