org.jboss.resteasy.auth.oauth
Class OAuthValidator

java.lang.Object
  extended by net.oauth.SimpleOAuthValidator
      extended by org.jboss.resteasy.auth.oauth.OAuthValidator
All Implemented Interfaces:
net.oauth.OAuthValidator

public class OAuthValidator
extends net.oauth.SimpleOAuthValidator

OAuth Validator implementation to check OAuth Messages

Author:
Stéphane Épardaud

Field Summary
 
Fields inherited from class net.oauth.SimpleOAuthValidator
DEFAULT_MAX_TIMESTAMP_AGE, DEFAULT_TIMESTAMP_WINDOW, maxTimestampAgeMsec, maxVersion, minVersion, SINGLE_PARAMETERS
 
Constructor Summary
OAuthValidator(OAuthProvider provider)
           
 
Method Summary
 void validateMessage(net.oauth.OAuthMessage message, net.oauth.OAuthAccessor accessor)
          Deprecated. 
 void validateMessage(net.oauth.OAuthMessage message, net.oauth.OAuthAccessor accessor, OAuthToken requestToken)
          Overridden to validate the timestamp and nonces last since they have side-effects of storing data about the message, so we have to make sure the message is valid before we do that.
protected  void validateTimestamp(net.oauth.OAuthMessage message, long timestamp, OAuthToken token)
          Overridden to delegate timestamp validation to the provider
protected  void validateTimestampAndNonce(net.oauth.OAuthMessage message, OAuthToken token)
          Throw an exception if the timestamp is out of range or the nonce has been validated previously.
 
Methods inherited from class net.oauth.SimpleOAuthValidator
checkSingleParameters, currentTimeMsec, releaseGarbage, validateNonce, validateSignature, validateTimestamp, validateTimestampAndNonce, validateVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthValidator

public OAuthValidator(OAuthProvider provider)
Method Detail

validateMessage

@Deprecated
public void validateMessage(net.oauth.OAuthMessage message,
                                       net.oauth.OAuthAccessor accessor)
                     throws net.oauth.OAuthException,
                            java.io.IOException,
                            java.net.URISyntaxException
Deprecated. 

Overridden to deprecate it since we cannot hide it. at least make sure we won't use it

Specified by:
validateMessage in interface net.oauth.OAuthValidator
Overrides:
validateMessage in class net.oauth.SimpleOAuthValidator
Throws:
net.oauth.OAuthException
java.io.IOException
java.net.URISyntaxException

validateMessage

public void validateMessage(net.oauth.OAuthMessage message,
                            net.oauth.OAuthAccessor accessor,
                            OAuthToken requestToken)
                     throws net.oauth.OAuthException,
                            java.io.IOException,
                            java.net.URISyntaxException
Overridden to validate the timestamp and nonces last since they have side-effects of storing data about the message, so we have to make sure the message is valid before we do that.

Throws:
net.oauth.OAuthException
java.io.IOException
java.net.URISyntaxException

validateTimestampAndNonce

protected void validateTimestampAndNonce(net.oauth.OAuthMessage message,
                                         OAuthToken token)
                                  throws java.io.IOException,
                                         net.oauth.OAuthProblemException
Throw an exception if the timestamp is out of range or the nonce has been validated previously.

Throws:
java.io.IOException
net.oauth.OAuthProblemException

validateTimestamp

protected void validateTimestamp(net.oauth.OAuthMessage message,
                                 long timestamp,
                                 OAuthToken token)
                          throws java.io.IOException,
                                 net.oauth.OAuthProblemException
Overridden to delegate timestamp validation to the provider

Throws:
java.io.IOException
net.oauth.OAuthProblemException


Copyright © 2010. All Rights Reserved.