Class NullNonceServices

  extended by
All Implemented Interfaces:

public class NullNonceServices
extends Object
implements OAuthNonceServices

No-op nonce services. Assumes all nonces are valid. This leaves the provider exposed to the dangers of an unlimited timestamp validity window and OAuth request replay attacks.

Ryan Heaton

Constructor Summary
Method Summary
 void validateNonce(ConsumerDetails consumerDetails, long timestamp, String nonce)
          Validate a nonce for a specific consumer timestamp.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NullNonceServices()
Method Detail


public void validateNonce(ConsumerDetails consumerDetails,
                          long timestamp,
                          String nonce)
Description copied from interface: OAuthNonceServices
Validate a nonce for a specific consumer timestamp. This is an opportunity to prevent replay attacks. Every nonce should be unique for each consumer timestamp. In other words, this method should throw a BadCredentialsException if the specified nonce was used by the consumer more than once with the specified timestamp.

Specified by:
validateNonce in interface OAuthNonceServices
consumerDetails - The consumer details.
timestamp - The timestamp.
nonce - The nonce.
Throws: - If the nonce failed to validate.

Copyright © 2012. All Rights Reserved.