org.springframework.security.oauth.provider.nonce
Interface OAuthNonceServices
- All Known Implementing Classes:
- ExpiringTimestampNonceServices, InMemoryNonceServices, NullNonceServices
public interface OAuthNonceServices
- Author:
- Ryan Heaton
|
Method Summary |
boolean |
validateNonce(ConsumerDetails consumerDetails,
long timestamp,
java.lang.String nonce)
Validate a nonce for a specific consumer timestamp. |
validateNonce
boolean validateNonce(ConsumerDetails consumerDetails,
long timestamp,
java.lang.String nonce)
throws org.springframework.security.AuthenticationException
- 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.
- Parameters:
consumerDetails - The consumer details.timestamp - The timestamp.nonce - The nonce.
- Returns:
- Whether the timestamp is a new timestamp. This gives the authentication processor the chance to enforce that all peer requests have the same timestamp, per the OAuth spec.
- Throws:
org.springframework.security.AuthenticationException - If the nonce failed to validate.
Copyright © 2008. All Rights Reserved.