public class AuthorizationBaseServerResource extends OAuthServerResource
clients, PARAMETER_DEFAULT_SCOPE, 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 |
---|
AuthorizationBaseServerResource() |
Modifier and Type | Method and Description |
---|---|
protected void |
doCatch(Throwable t) |
protected org.restlet.ext.oauth.internal.AuthSession |
getAuthSession()
Returns the current authorization session.
|
protected Representation |
getErrorPage(String errPage,
OAuthException ex)
Helper method to format error responses according to OAuth2 spec.
|
protected void |
sendError(String redirectURI,
OAuthException ex,
String state,
boolean fragment)
Helper method to format error responses according to OAuth2 spec.
|
protected org.restlet.ext.oauth.internal.AuthSession |
setupAuthSession(org.restlet.ext.oauth.internal.RedirectionURI redirectUri)
Sets up a new authorization session.
|
protected void |
ungetAuthSession()
Unget current authorization session.
|
addCacheDirective, doInit, getClient, getScope, getState, responseErrorRepresentation
abort, commit, delete, delete, describeVariants, 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
protected void doCatch(Throwable t)
doCatch
in class ServerResource
protected org.restlet.ext.oauth.internal.AuthSession getAuthSession() throws OAuthException
AuthSession
instance.OAuthException
protected Representation getErrorPage(String errPage, OAuthException ex)
errPage
- errorPage template nameex
- Any OAuthException with errorprotected void sendError(String redirectURI, OAuthException ex, String state, boolean fragment)
redirectURI
- redirection URI to send errorex
- Any OAuthException with errorstate
- state parameter as presented in the initial authorize requestfragment
- true if use URL Fragment.protected org.restlet.ext.oauth.internal.AuthSession setupAuthSession(org.restlet.ext.oauth.internal.RedirectionURI redirectUri)
redirectUri
- The redirection URI.protected void ungetAuthSession()
Copyright © 2005-2014 Restlet.