public class AuthorizationServerResource extends AuthorizationBaseServerResource
{ @code public Restlet createInboundRoot(){ ... ChallengeAuthenticator au = new ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC, "OAuth Test Server"); au.setVerifier(new MyVerifier()); au.setNext(AuthorizationServerResource.class); root.attach("/authorize", au); ... }
Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_SUPPORT_POST |
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 |
---|
AuthorizationServerResource() |
Modifier and Type | Method and Description |
---|---|
protected Representation |
doPostAuthorization(org.restlet.ext.oauth.internal.AuthSession session,
org.restlet.ext.oauth.internal.Client client)
Handle the authorization request.
|
protected org.restlet.ext.oauth.internal.RedirectionURI |
getRedirectionURI(Form params,
org.restlet.ext.oauth.internal.Client client)
Get request parameter "redirect_uri".
|
protected ResponseType[] |
getResponseType(Form params)
Get request parameter "response_type".
|
Representation |
requestAuthorization() |
Representation |
requestAuthorization(Form params)
Checks that all incoming requests have a type parameter.
|
Representation |
requestAuthorization(Representation input) |
doCatch, getAuthSession, getErrorPage, sendError, setupAuthSession, ungetAuthSession
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
public static final String PARAMETER_SUPPORT_POST
protected Representation doPostAuthorization(org.restlet.ext.oauth.internal.AuthSession session, org.restlet.ext.oauth.internal.Client client)
session
- The OAuth session.Representation
.protected org.restlet.ext.oauth.internal.RedirectionURI getRedirectionURI(Form params, org.restlet.ext.oauth.internal.Client client) throws OAuthException
params
- client
- OAuthException
protected ResponseType[] getResponseType(Form params) throws OAuthException
params
- OAuthException
@Get(value="html") public Representation requestAuthorization() throws OAuthException
OAuthException
public Representation requestAuthorization(Form params) throws OAuthException
OAuthException
@Post(value="html") public Representation requestAuthorization(Representation input) throws OAuthException
OAuthException
Copyright © 2005-2014 Restlet.