SIP Service Engine© Documentations
 
  Top >   SIP Servlet Programming >   SPI (Service Provider Interface) >   User Management Interface
 
 

User Management Interface

The user management interface is used to retrieve and manage information about SIP Servlet Engine subscribers.

The structure of the user management interface is as follows:

SubscriberInfo Interface

This interface defines the minimum user information managed by SIP Servlet Engine.

getHA1()
Gets the value of HA1 for digest authentication (see RFC2617).
getRealm()
Gets the realm for digest authentication (see RFC2617).
getSipURI()
Gets the SipURI of the registered user (see RFC2617).
getUsername()
Gets the user name for digest authentication (see RFC2617).
setHA1(String ha1)
Sets the value of HA1 for digest authentication (see RFC2617).
setRealm(String realm)
Sets the realm for digest authentication (see RFC2617).
setSipURI(SipURI uri)
Sets the SipURI of the registered user (see RFC2617).
setUsername(String username)
Sets the user name for digest authentication (see RFC2617).

Authenticator Interface

This interface is an API required to implement for your application to work with the SIP authentication function of SIP Servlet Engine. It defines methods for the minimum user search.

getSubscriberInfo(String username)
Specifies the user name used for digest authentication (see RFC2617) to get SubscriberInfo. If the user does not exist, InvalidSubscriberException must be thrown.
getSubscriberInfo(SipURI subscriber)
Specifies the SipURI of the registered user to get SubscriberInfo. If the user does not exist, InvalidSubscriberException must be thrown.

SubscriberReader Interface

This interface is used to provide a user retrieval function. This interface extends the Authenticator interface.

isUserExists(String username)
Specifies the user name used for digest authentication (see RFC2617). If the user is registered, it returns true, otherwise it returns false.
isUserExists(SipURI subscriber)
Specifies the SipURI of the registered user. If the user is registered, it returns true, otherwise it returns false.
listUsers(String username, String subscriber, String host, int max)
Specifies the user name, the user and host parts of the SipURI, and maximum search results to retrieve the user. It returns a list of SubscriberInfo. If no matching user is found, an empty list must be returned.

SubscriberPasswordEditor Interface

This interface is used to change authentication information about registered users.

changePassword(SipURI subscriber, String username, String oldPass, String newPass, String realm)
This method is used to change the password of the registered user. subscriber specifies the SipURI of the target user. It checks whether the name of the user that matches subscriber and the username argument is identical. If username and subscriber do not match, InvalidSubscriberException must be thrown. oldPass represents the old password. If the old password is not correct, IllegalPasswordException must be thrown. newPass represents a new password. realm represents the authentication realm used for digest authentication. Argument check depends on your implementation.
resetPassword(SipURI subscriber, String username, String newPass, String realm)
This method is used to change the password of the registered user. resetPassword() and changePassword() are identical except that resetPassword() changes the password without checking the old password.

SubscriberEditor Interface

This interface is used to add, delete, or update the registered user. This interface extends the SubscriberReader and SubscriberPasswordEditor interfaces.

You must define a class that implements the SubscriberEditor interface to run a demo application properly.

createSubscriber(SubscriberInfo sinfo)
Creates a new user with the specified user information. If the information is already registered or invalid, InvalidSubscriberException must be thrown.
removeSubscriber(String username)
Deletes the registered user with the specified user name. If the user is not registered, InvalidSubscriberException must be thrown.
removeSubscriber(SipURI subscriber)
Deletes the registered user with the specified SipURI. If the SipURI is not registered, InvalidSubscriberException must be thrown.
updateSubscriber(SubscriberInfo sinfo)
Updates the user information with the specified user information. The information to be updated must be other than authentication information. Authentication information (password) must be changed using the method defined in SubscriberPasswordEditor. The behavior of this method depends on your implementation.
createSubscriberInfo(SipURI uri, String username, String password, String realm)
Creates SubscriberInfo from the minimum user information. The behavior of this method depends on your implementation.

Last Modified:Wed Dec 22 06:46:15 PM JST 2004