org.openid4java.consumer
Interface NonceVerifier

All Known Implementing Classes:
AbstractNonceVerifier, EhcacheNonceVerifier, InMemoryNonceVerifier, JdbcNonceVerifier

public interface NonceVerifier

Author:
Marius Scurtescu, Johnny Bufu

Field Summary
static int INVALID_TIMESTAMP
          The timestamp of the nonce is invalid, it cannot be parsed.
static int OK
          This noce is valid and it was not seen before.
static int SEEN
          The nonce was seen before.
static int TOO_OLD
          The timestamp of the nonce is too old and it is not tracked anymore.
 
Method Summary
 int getMaxAge()
          Returns the expiration timeout for nonces, in seconds.
 int seen(java.lang.String opUrl, java.lang.String nonce)
          Checks if a nonce was seen before.
 void setMaxAge(int ageSeconds)
          Sets the expiration timeout for nonces, in seconds.
 

Field Detail

OK

static final int OK
This noce is valid and it was not seen before. Nonce should be accepted.

See Also:
Constant Field Values

SEEN

static final int SEEN
The nonce was seen before. Nonce should be rejected.

See Also:
Constant Field Values

INVALID_TIMESTAMP

static final int INVALID_TIMESTAMP
The timestamp of the nonce is invalid, it cannot be parsed. Nonce should be rejected.

See Also:
Constant Field Values

TOO_OLD

static final int TOO_OLD
The timestamp of the nonce is too old and it is not tracked anymore. Nonce should be rejected.

See Also:
Constant Field Values
Method Detail

seen

int seen(java.lang.String opUrl,
         java.lang.String nonce)
Checks if a nonce was seen before. It also checks if the time stamp at the beginning of the noce is valid. Also, if old nonces are discarded the it should check if the time stamp for this noce is still valid.

Returns:
OK only if this nonce has a valid time stamp, the time stamp did not age and the nonce was not seen before.

getMaxAge

int getMaxAge()
Returns the expiration timeout for nonces, in seconds.


setMaxAge

void setMaxAge(int ageSeconds)
Sets the expiration timeout for nonces, in seconds.



Copyright © 2012 Sxip. All Rights Reserved.