org.eclipse.webdav.internal.authentication
Class AuthenticateChallenge

java.lang.Object
  extended by org.eclipse.webdav.internal.authentication.AuthenticateChallenge

public class AuthenticateChallenge
extends Object

Parses the HTTP "WWW-Authenticate" and "Proxy-Authenticate" header fields. These header fields have the following form: challenge = auth-scheme 1*SP 1#auth-param auth-scheme = token auth-param = token "=" ( token | quoted-string ) The authentication parameter realm is defined for all authentication schemes: realm = "realm" "=" realm-value realm-value = quoted-string A challenge may look like this: WWW-Authenticate: Digest realm="testrealm@host.com", qop="auth,auth-int", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", opaque="5ccc069c403ebaf9f0171e9517f40e41"


Constructor Summary
AuthenticateChallenge(String challenge)
          Parses the given authenticate challenge.
 
Method Summary
 String get(String param)
          Returns the value of the given authentication parameter, or null if the param does not exist.
 String getAuthScheme()
          Returns the authentication scheme.
 String getChallenge()
          Returns the authenticate challenge, unparsed.
 String getRealm()
          Returns the realm authentication parameter, which must exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticateChallenge

public AuthenticateChallenge(String challenge)
                      throws ParserException
Parses the given authenticate challenge.

Parameters:
challenge -
Throws:
ParserException - if the challenge is malformed
Method Detail

get

public String get(String param)
Returns the value of the given authentication parameter, or null if the param does not exist.


getAuthScheme

public String getAuthScheme()
Returns the authentication scheme. For example, "Basic" or "Digest".


getChallenge

public String getChallenge()
Returns the authenticate challenge, unparsed.


getRealm

public String getRealm()
Returns the realm authentication parameter, which must exist.



Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.