org.restlet.ext.oauth
Class ValidationServerResource

java.lang.Object
  extended by org.restlet.resource.Resource
      extended by org.restlet.resource.UniformResource
          extended by org.restlet.resource.ServerResource
              extended by org.restlet.ext.oauth.OAuthServerResource
                  extended by org.restlet.ext.oauth.ValidationServerResource

public class ValidationServerResource
extends OAuthServerResource

The ValidationResource is intended to protect a Restlet and make sure that correct OAuth credentials are met. It is part of the Authorization server providing a REST endpoint for validation. In default mode it will accept requests over HTTP so that the protected resource does not have to reside in the same application or even be hosted on the same HTTP server. By setting the context attribute parameter "localOnly" to "true" it will only allow for in application invocations. As such the AuthServer needs to be part of the protected resource application. In this mode the Validator will check that a validation request is performed using the RIAP protocol. Example. Attach a ValidationTokenServerResource

 {
      @code
      public Restlet createInboundRoot(){
              ...
              root.attach("/validate", ValidationServerResource.class);
              ...
      }
 }
 

Author:
Kristoffer Gronowski
See Also:
ext.oauth.internal.org.restlet.ext.oauth.OAuthAuthorizer

Field Summary
static String LOCAL_ACCESS_ONLY
           
 
Fields inherited from class org.restlet.ext.oauth.OAuthServerResource
ACCESS_TOKEN, ASSERTION, ASSERTION_TYPE, AUTONOMOUS_USER, CLIENT_ID, CLIENT_SECRET, ClientCookieID, clients, CODE, ERROR, ERROR_DESC, ERROR_URI, EXPIRES_IN, generator, GRANT_TYPE, noCache, noStore, OAUTH_TOKEN, PASSWORD, REDIR_URI, REFRESH_TOKEN, RESPONSE_TYPE, SCOPE, STATE, TOKEN_SERVER_MAX_TIME_SEC, TOKEN_SERVER_TIME_SEC, tokenMaxTimeSec, tokenTimeSec, USERNAME
 
Constructor Summary
ValidationServerResource()
           
 
Method Summary
 Representation validate(Representation input)
           
 
Methods inherited from class org.restlet.ext.oauth.OAuthServerResource
doInit, generateAgentToken, generateCode, getParameter, parseScope
 
Methods inherited from class org.restlet.resource.ServerResource
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
 
Methods inherited from class org.restlet.resource.Resource
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, toObject, toRepresentation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCAL_ACCESS_ONLY

public static final String LOCAL_ACCESS_ONLY
See Also:
Constant Field Values
Constructor Detail

ValidationServerResource

public ValidationServerResource()
Method Detail

validate

@Post(value="json")
public Representation validate(Representation input)
                        throws ResourceException
Throws:
ResourceException


Copyright © 2005-2013 Restlet.