|
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
org.restlet.ext.oauth.AuthorizationBaseServerResource
public class AuthorizationBaseServerResource
Base Restlet resource class for Authorization service resource. Handle errors according to OAuth2.0 specification, and manage AuthSession. Authorization Endndpoint, Authorization pages, and Login pages should extends this class.
Field Summary |
---|
Fields inherited from class org.restlet.ext.oauth.OAuthServerResource |
---|
clients, PARAMETER_DEFAULT_SCOPE, 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 | |
---|---|
AuthorizationBaseServerResource()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.restlet.ext.oauth.OAuthServerResource |
---|
addCacheDirective, doInit, getClient, getScope, getState, responseErrorRepresentation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AuthorizationBaseServerResource()
Method Detail |
---|
protected void doCatch(Throwable t)
doCatch
in class ServerResource
protected org.restlet.ext.oauth.internal.AuthSession setupAuthSession(org.restlet.ext.oauth.internal.RedirectionURI redirectUri)
redirectUri
- The redirection URI.protected org.restlet.ext.oauth.internal.AuthSession getAuthSession() throws OAuthException
AuthSession
instance.
OAuthException
protected void ungetAuthSession()
protected 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 Representation getErrorPage(String errPage, OAuthException ex)
errPage
- errorPage template nameex
- Any OAuthException with error
|
Restlet Framework 2.2.1 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |