Restlet Framework 2.2.1
Java Standard Edition

org.restlet.ext.oauth
Class AccessTokenClientResource

java.lang.Object
  extended by org.restlet.resource.Resource
      extended by org.restlet.resource.ClientResource
          extended by org.restlet.ext.oauth.AccessTokenClientResource
All Implemented Interfaces:
OAuthResourceDefs
Direct Known Subclasses:
FacebookAccessTokenClientResource

public class AccessTokenClientResource
extends ClientResource
implements OAuthResourceDefs

Client resource used to acquire an OAuth token. Implements OAuth 2.0 (RFC6749)

Author:
Shotaro Uchida

Field Summary
 
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
AccessTokenClientResource(Reference tokenURI)
           
 
Method Summary
 void doError(Status errorStatus)
           
 Representation handleInbound(Response response)
           
 org.restlet.ext.oauth.internal.Token requestToken(OAuthParameters parameters)
           
 void setAuthenticationMethod(ChallengeScheme scheme)
           
 void setClientCredentials(String clientId, String clientSecret)
           
protected  void setupBodyClientCredentials(OAuthParameters parameters)
           
 
Methods inherited from class org.restlet.resource.ClientResource
accept, accept, addQueryParameter, addQueryParameter, addQueryParameters, addSegment, create, create, create, createNext, createRequest, createResponse, delete, delete, delete, doRelease, finalize, get, get, get, getAttribute, getChild, getChild, getChild, getChild, getMaxRedirects, getNext, getOnResponse, getOnSent, getParent, getParent, getRetryAttempts, getRetryDelay, handle, handle, handle, handle, handle, handle, handle, handle, handle, handleOutbound, hasNext, head, head, isFollowingRedirects, isRequestEntityBuffering, isResponseEntityBuffering, isRetryOnError, options, options, options, patch, patch, patch, patch, post, post, post, post, put, put, put, put, redirect, retry, setAttribute, setChallengeResponse, setChallengeResponse, setClientInfo, setConditions, setCookies, setEntityBuffering, setFollowingRedirects, setHostRef, setHostRef, setLoggable, setMaxRedirects, setMethod, setNext, setOnResponse, setOnSent, setOriginalRef, setProtocol, setProxyChallengeResponse, setProxyChallengeResponse, setRanges, setReference, setReference, setReferrerRef, setReferrerRef, setRequestEntityBuffering, setResponseEntityBuffering, setRetryAttempts, setRetryDelay, setRetryOnError, wrap
 
Methods inherited from class org.restlet.resource.Resource
doCatch, doError, doInit, 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, toObject, toRepresentation, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccessTokenClientResource

public AccessTokenClientResource(Reference tokenURI)
Method Detail

doError

public void doError(Status errorStatus)
Overrides:
doError in class ClientResource

handleInbound

public Representation handleInbound(Response response)
Overrides:
handleInbound in class ClientResource

setClientCredentials

public void setClientCredentials(String clientId,
                                 String clientSecret)

setAuthenticationMethod

public void setAuthenticationMethod(ChallengeScheme scheme)

setupBodyClientCredentials

protected void setupBodyClientCredentials(OAuthParameters parameters)

requestToken

public org.restlet.ext.oauth.internal.Token requestToken(OAuthParameters parameters)
                                                  throws OAuthException,
                                                         IOException,
                                                         JSONException
Throws:
OAuthException
IOException
JSONException

Restlet Framework 2.2.1
Java Standard Edition

Copyright © 2005-2014 Restlet.