javacardx.servlet.http
Interface HttpDigestAuthentication

All Superinterfaces:
Shareable

@TransactionType(value=NOT_SUPPORTED)
public interface HttpDigestAuthentication
extends Shareable

This interface must be implemented by PIN or password Authenticator that may be used for HTTP Digest Authentication as defined by RFC 2617: HTTP Authentication: Basic and Digest Authentication.

See Also:
Authenticator, PIN, Password

Method Summary
 boolean check(String username, String realm, String method, String uri, String nonce, String nc, String cnonce, String qop, String response)
          Compares the response digest provided by response against the digest computed from the other parameters and the password or PIN internally held by the Authenticator implementing this interface.
 

Method Detail

check

boolean check(String username,
              String realm,
              String method,
              String uri,
              String nonce,
              String nc,
              String cnonce,
              String qop,
              String response)
Compares the response digest provided by response against the digest computed from the other parameters and the password or PIN internally held by the Authenticator implementing this interface.

If the two digests match and the Authenticator is not blocked, it sets the validated flag and resets the try counter to its maximum. If it does not match, it decrements the try counter and, if the counter has reached zero, blocks the Authenticator. Even if a transaction is in progress, update of internal state - the try counter, the validated flag, and the blocking state, shall not participate in the transaction.

Parameters:
username - The user's name.
realm - The realm.
method - The HTTP request method.
uri - The request URI.
nonce - The server nounce.
nc - The nounce count.
cnonce - The client nounce.
qop - The quality of protection.
response - The digest response.
Returns:
true if the same digest as that provided by response can be computed from the parameters and the internal password or PIN; false otherwise.
Throws:
NullPointerException - if any of the parameters is null


Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.