local.server
Class AuthenticationServerImpl

java.lang.Object
  |
  +--local.server.AuthenticationServerImpl
All Implemented Interfaces:
AuthenticationServer

public class AuthenticationServerImpl
extends java.lang.Object
implements AuthenticationServer

Class AuthenticationServerImpl implements an AuthenticationServer for HTTP Digest authentication.


Field Summary
protected  java.lang.String authentication_scheme
          The authentication scheme.
protected  AuthenticationService authentication_service
          The repository of users's authentication data.
protected  org.zoolu.tools.Log log
          Event logger.
protected static int PROXY_AUTHENTICATION
          Proxy authentication.
protected  java.lang.String qop_options
          The authentication qop-options.
protected  byte[] rand
          The current random value.
protected  java.lang.String realm
          The authentication realm.
protected static int SERVER_AUTHENTICATION
          Server authentication.
 
Constructor Summary
AuthenticationServerImpl(java.lang.String realm, AuthenticationService authentication_service, org.zoolu.tools.Log log)
          Costructs a new AuthenticationServerImpl.
 
Method Summary
 org.zoolu.sip.message.Message authenticateProxyRequest(org.zoolu.sip.message.Message msg)
          Authenticates a SIP request.
 org.zoolu.sip.message.Message authenticateRequest(org.zoolu.sip.message.Message msg)
          Authenticates a SIP request.
protected  org.zoolu.sip.message.Message authenticateRequest(org.zoolu.sip.message.Message msg, int type)
          Authenticates a SIP request.
 org.zoolu.sip.header.AuthenticationInfoHeader getAuthenticationInfoHeader()
          Gets AuthenticationInfoHeader.
protected  void printLog(java.lang.String str, int level)
          Adds a new string to the default Log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_AUTHENTICATION

protected static final int SERVER_AUTHENTICATION
Server authentication.

PROXY_AUTHENTICATION

protected static final int PROXY_AUTHENTICATION
Proxy authentication.

log

protected org.zoolu.tools.Log log
Event logger.

authentication_service

protected AuthenticationService authentication_service
The repository of users's authentication data.

realm

protected java.lang.String realm
The authentication realm.

authentication_scheme

protected java.lang.String authentication_scheme
The authentication scheme.

qop_options

protected java.lang.String qop_options
The authentication qop-options.

rand

protected byte[] rand
The current random value.
Constructor Detail

AuthenticationServerImpl

public AuthenticationServerImpl(java.lang.String realm,
                                AuthenticationService authentication_service,
                                org.zoolu.tools.Log log)
Costructs a new AuthenticationServerImpl.
Method Detail

authenticateRequest

public org.zoolu.sip.message.Message authenticateRequest(org.zoolu.sip.message.Message msg)
Authenticates a SIP request.
Specified by:
authenticateRequest in interface AuthenticationServer
Parameters:
msg - is the SIP request to be authenticated
Returns:
it returns the error Message in case of authentication failure, or null in case of authentication success.

authenticateProxyRequest

public org.zoolu.sip.message.Message authenticateProxyRequest(org.zoolu.sip.message.Message msg)
Authenticates a SIP request.
Specified by:
authenticateProxyRequest in interface AuthenticationServer
Parameters:
msg - is the SIP request to be authenticated
Returns:
it returns the error Message in case of authentication failure, or null in case of authentication success.

authenticateRequest

protected org.zoolu.sip.message.Message authenticateRequest(org.zoolu.sip.message.Message msg,
                                                            int type)
Authenticates a SIP request.
Parameters:
msg - is the SIP request to be authenticated
proxy_authentication - whether performing Proxy-Authentication or simple Authentication
Returns:
it returns the error Message in case of authentication failure, or null in case of authentication success.

getAuthenticationInfoHeader

public org.zoolu.sip.header.AuthenticationInfoHeader getAuthenticationInfoHeader()
Gets AuthenticationInfoHeader.
Specified by:
getAuthenticationInfoHeader in interface AuthenticationServer

printLog

protected void printLog(java.lang.String str,
                        int level)
Adds a new string to the default Log