| |
|
| java.lang.Object examples.authorization.DigestServerAuthenticationMethod
DigestServerAuthenticationMethod | public class DigestServerAuthenticationMethod implements AuthenticationMethod(Code) | | Implements the HTTP digest authentication method.
author: M. Ranganathan author: Marc Bednarek |
DEFAULT_ALGORITHM | final public static String DEFAULT_ALGORITHM(Code) | | |
DEFAULT_DOMAIN | final public static String DEFAULT_DOMAIN(Code) | | |
DEFAULT_SCHEME | final public static String DEFAULT_SCHEME(Code) | | |
DigestServerAuthenticationMethod | public DigestServerAuthenticationMethod()(Code) | | Default constructor.
|
doAuthenticate | public boolean doAuthenticate(String user, AuthorizationHeader authHeader, Request request)(Code) | | Check the response and answer true if authentication succeeds. We are
making simplifying assumptions here and assuming that the password is
available to us for computation of the MD5 hash. We also dont cache
authentications so that the user has to authenticate on each
registration.
Parameters: user - is the username Parameters: authHeader - is the Authroization header from the SIP request. Parameters: requestLine - is the SIP Request line from the SIP request. exception: SIPAuthenticationException - is thrown when authentication fails or message is bad |
generateNonce | public String generateNonce()(Code) | | Generate the challenge string.
a generated nonce. |
getAlgorithm | public String getAlgorithm()(Code) | | Get the authentication Algorithm
the alogirithm name (i.e. Digest). |
getDomain | public String getDomain()(Code) | | get the authentication domain.
the domain name |
getRealm | public String getRealm(String resource)(Code) | | get the authentication realm
the realm name |
getScheme | public String getScheme()(Code) | | Get the authentication scheme
the scheme name |
initialize | public void initialize()(Code) | | Initialize
|
|
|
|