com.sun.jersey.oauth.server
Class NonceManager
java.lang.Object
com.sun.jersey.oauth.server.NonceManager
public class NonceManager
- extends Object
Tracks the nonces for a given consumer key and/or token. Automagically
ensures timestamp is monotonically increasing and tracks all nonces
for a given timestamp.
- Author:
- Paul C. Bryan , Martin Matula
Constructor Summary |
NonceManager(long maxAge,
int gcPeriod)
TODO: Description. |
Method Summary |
boolean |
verify(String key,
String timestamp,
String nonce)
Evaluates the timestamp/nonce combination for validity, storing and/or
clearing nonces as required. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NonceManager
public NonceManager(long maxAge,
int gcPeriod)
- TODO: Description.
- Parameters:
maxAge
- the maximum valid age of a nonce timestamp, in milliseconds.gcPeriod
- verifications to perform on average before performing garbage collection.
verify
public boolean verify(String key,
String timestamp,
String nonce)
- Evaluates the timestamp/nonce combination for validity, storing and/or
clearing nonces as required.
- Parameters:
timestamp
- the oauth_timestamp value for a given consumer request.nonce
- the oauth_nonce value for a given consumer request.
- Returns:
- true if the timestamp/nonce are valid.
Copyright © 2013 Oracle Corporation. All Rights Reserved.