com.noelios.restlet.ext.oauth
Class OAuthGuard

java.lang.Object
  extended by org.restlet.Uniform
      extended by org.restlet.Restlet
          extended by org.restlet.Filter
              extended by org.restlet.Guard
                  extended by com.noelios.restlet.ext.oauth.OAuthGuard

public class OAuthGuard
extends Guard

Handles authentication using Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.

Author:
Adam Rosien
See Also:
OAuth

Field Summary
 
Fields inherited from class org.restlet.Guard
AUTHENTICATION_INVALID, AUTHENTICATION_MISSING, AUTHENTICATION_STALE, AUTHENTICATION_VALID, DEFAULT_NONCE_LIFESPAN_MILLIS
 
Fields inherited from class org.restlet.Filter
CONTINUE, SKIP, STOP
 
Constructor Summary
OAuthGuard(Context context, java.lang.String realm, OAuthProvider provider)
          Constructor.
 
Method Summary
 int authenticate(Request request)
           
 
Methods inherited from class org.restlet.Guard
accept, authorize, challenge, challenge, checkSecret, checkSecret, doHandle, findSecret, forbid, getDomainUris, getNonceLifespan, getRealm, getScheme, getSecretResolver, getSecrets, getServerKey, isRechallengeEnabled, setDomainUris, setNonceLifespan, setRealm, setRechallengeEnabled, setScheme, setSecretResolver, setServerKey
 
Methods inherited from class org.restlet.Filter
afterHandle, beforeHandle, getNext, handle, hasNext, setNext, setNext
 
Methods inherited from class org.restlet.Restlet
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext, start, stop
 
Methods inherited from class org.restlet.Uniform
delete, delete, get, get, handle, head, head, options, options, post, post, put, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthGuard

public OAuthGuard(Context context,
                  java.lang.String realm,
                  OAuthProvider provider)
Constructor.

Parameters:
context - The context.
realm - The authentication realm.
provider - The OAuth provider.
Throws:
java.lang.IllegalArgumentException - if the scheme is null
Method Detail

authenticate

public int authenticate(Request request)
Overrides:
authenticate in class Guard


Copyright © 2005-2008 Noelios Technologies.