com.bt.sdk.capabilities.whitelabelauthentication
Class WhiteLabelAuthenticationService

java.lang.Object
  extended by com.bt.sdk.capabilities.whitelabelauthentication.WhiteLabelAuthenticationService

public class WhiteLabelAuthenticationService
extends java.lang.Object

A service that provides basic user and group management for an application.


Constructor Summary
WhiteLabelAuthenticationService()
           
 
Method Summary
 void addGroup(java.lang.String groupName)
          Creates a new group with the given name.
 void addUser(java.lang.String userName)
          Creates a new user.
 void addUserAttributes(java.lang.String userName, com.bt.sdk.capabilities.whitelabelauthentication.UserAttributes userAttributes)
          Creates a new user attribute for the given user.
 void addUsersToGroup(java.lang.String groupName, com.bt.sdk.capabilities.whitelabelauthentication.UserNames userNames)
          Adds users to the given group.
 void changeUserPassword(java.lang.String userName, java.lang.String oldPassword, java.lang.String newPassword)
          Changes the password for the given user.
 com.bt.sdk.capabilities.whitelabelauthentication.UserNames getAllUsers()
          Returns a list of all users.
 com.bt.sdk.capabilities.whitelabelauthentication.GroupNames getGroups()
          Returns a list of all groups.
 com.bt.sdk.capabilities.whitelabelauthentication.User getUser(java.lang.String userName)
          Returns the user with the given user name.
 com.bt.sdk.capabilities.whitelabelauthentication.UserNames getUsersInGroup(java.lang.String groupName)
          Returns a list of all users in the given group.
 java.lang.Object login(java.lang.String userName, java.lang.String password)
          Logs the user on to the WhiteLabelAuthentication service.
 void removeGroup(java.lang.String groupName)
          Removes the given group.
 void removeUser(java.lang.String userName)
          Removes the given user.
 void removeUserAttributes(java.lang.String userName, com.bt.sdk.capabilities.whitelabelauthentication.AttributeNames attributeNames)
          Removes an attribute for the given user.
 void removeUsersFromGroup(java.lang.String groupName, com.bt.sdk.capabilities.whitelabelauthentication.UserNames userNames)
          Removes a collection of users from a given group.
 void resetUserPassword(java.lang.String userName)
          Resets the password for the given user.
 void updateGroup(java.lang.String oldGroupName, java.lang.String newGroupName)
          Updates the name of the group.
 void updateUserAttribute(java.lang.String userName, java.lang.String attributeName, java.lang.String attributeValue)
          Updates an attribute for the given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhiteLabelAuthenticationService

public WhiteLabelAuthenticationService()
                                throws java.io.IOException,
                                       org.apache.ws.security.components.crypto.CredentialException
Throws:
java.io.IOException
org.apache.ws.security.components.crypto.CredentialException
Method Detail

login

public java.lang.Object login(java.lang.String userName,
                              java.lang.String password)
Logs the user on to the WhiteLabelAuthentication service.


addUser

public void addUser(java.lang.String userName)
Creates a new user. An email containing the user's password will be sent to the user.


getUser

public com.bt.sdk.capabilities.whitelabelauthentication.User getUser(java.lang.String userName)
Returns the user with the given user name.


getAllUsers

public com.bt.sdk.capabilities.whitelabelauthentication.UserNames getAllUsers()
Returns a list of all users.


changeUserPassword

public void changeUserPassword(java.lang.String userName,
                               java.lang.String oldPassword,
                               java.lang.String newPassword)
Changes the password for the given user.


removeUser

public void removeUser(java.lang.String userName)
Removes the given user.


addUserAttributes

public void addUserAttributes(java.lang.String userName,
                              com.bt.sdk.capabilities.whitelabelauthentication.UserAttributes userAttributes)
Creates a new user attribute for the given user.


removeUserAttributes

public void removeUserAttributes(java.lang.String userName,
                                 com.bt.sdk.capabilities.whitelabelauthentication.AttributeNames attributeNames)
Removes an attribute for the given user.


updateUserAttribute

public void updateUserAttribute(java.lang.String userName,
                                java.lang.String attributeName,
                                java.lang.String attributeValue)
Updates an attribute for the given user.


getGroups

public com.bt.sdk.capabilities.whitelabelauthentication.GroupNames getGroups()
Returns a list of all groups.


addGroup

public void addGroup(java.lang.String groupName)
Creates a new group with the given name.


updateGroup

public void updateGroup(java.lang.String oldGroupName,
                        java.lang.String newGroupName)
Updates the name of the group.


removeGroup

public void removeGroup(java.lang.String groupName)
Removes the given group.


addUsersToGroup

public void addUsersToGroup(java.lang.String groupName,
                            com.bt.sdk.capabilities.whitelabelauthentication.UserNames userNames)
Adds users to the given group.


removeUsersFromGroup

public void removeUsersFromGroup(java.lang.String groupName,
                                 com.bt.sdk.capabilities.whitelabelauthentication.UserNames userNames)
Removes a collection of users from a given group.


getUsersInGroup

public com.bt.sdk.capabilities.whitelabelauthentication.UserNames getUsersInGroup(java.lang.String groupName)
Returns a list of all users in the given group.


resetUserPassword

public void resetUserPassword(java.lang.String userName)
Resets the password for the given user. An email containing the user's password will be sent to the user.