gov.nist.javax.sip.clientauthutils
Class DigestServerAuthenticationHelper

java.lang.Object
  extended by gov.nist.javax.sip.clientauthutils.DigestServerAuthenticationHelper

public class DigestServerAuthenticationHelper
extends Object

Implements the HTTP digest authentication method server side functionality.

Author:
M. Ranganathan, Marc Bednarek

Field Summary
static String DEFAULT_ALGORITHM
           
static String DEFAULT_SCHEME
           
 
Constructor Summary
DigestServerAuthenticationHelper()
          Default constructor.
 
Method Summary
 boolean doAuthenticateHashedPassword(Request request, String hashedPassword)
          Authenticate the inbound request.
 boolean doAuthenticatePlainTextPassword(Request request, String pass)
          Authenticate the inbound request given plain text password.
 void generateChallenge(HeaderFactory headerFactory, Response response, String realm)
           
static String toHexString(byte[] b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ALGORITHM

public static final String DEFAULT_ALGORITHM
See Also:
Constant Field Values

DEFAULT_SCHEME

public static final String DEFAULT_SCHEME
See Also:
Constant Field Values
Constructor Detail

DigestServerAuthenticationHelper

public DigestServerAuthenticationHelper()
                                 throws NoSuchAlgorithmException
Default constructor.

Throws:
NoSuchAlgorithmException
Method Detail

toHexString

public static String toHexString(byte[] b)

generateChallenge

public void generateChallenge(HeaderFactory headerFactory,
                              Response response,
                              String realm)

doAuthenticateHashedPassword

public boolean doAuthenticateHashedPassword(Request request,
                                            String hashedPassword)
Authenticate the inbound request.

Parameters:
request - - the request to authenticate.
hashedPassword - -- the MD5 hashed string of username:realm:plaintext password.
Returns:
true if authentication succeded and false otherwise.

doAuthenticatePlainTextPassword

public boolean doAuthenticatePlainTextPassword(Request request,
                                               String pass)
Authenticate the inbound request given plain text password.

Parameters:
request - - the request to authenticate.
pass - -- the plain text password.
Returns:
true if authentication succeded and false otherwise.


Copyright © 2012. All Rights Reserved.