org.wso2.solutions.identity
Class UserStore

java.lang.Object
  extended by org.wso2.solutions.identity.UserStore

public class UserStore
extends java.lang.Object

Interface to the user store. This is a wrapper around the WSO2 Usermanager library. The UserStore will maintain a singleton instance of a org.wso2.usermanager.Realm implementation.


Method Summary
 boolean authenticate(java.lang.String username, java.lang.String password)
          Authenticate the given user credentials.
 void changeRalm(java.lang.String realmConfigName)
          Update the realm used to the given instance
 java.util.List<java.lang.String> getAllUserNames()
          Access the names of all users in the store.
 java.util.Map<java.lang.String,java.lang.String> getClaimValues(java.lang.String username, java.util.List<java.lang.String> propertyNames)
          Return the list of claim values of the given user.
 java.util.Map<java.lang.String,java.lang.String> getClaimValues(java.lang.String username, java.lang.String profileName, java.util.List<java.lang.String> propertyNames)
           
static UserStore getInstance()
           
 java.util.List<java.lang.String> getPropertyNames()
          Access the name of user properties in the store.
 org.wso2.usermanager.Realm getRealm()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UserStore getInstance()
                             throws IdentityProviderException
Throws:
IdentityProviderException

changeRalm

public void changeRalm(java.lang.String realmConfigName)
                throws IdentityProviderException
Update the realm used to the given instance

Parameters:
realmConfigName -
Throws:
IdentityProviderException

authenticate

public boolean authenticate(java.lang.String username,
                            java.lang.String password)
Authenticate the given user credentials.

Parameters:
username -
password -
Returns:
whether the user with the given credentials are authenticated or not.

getClaimValues

public java.util.Map<java.lang.String,java.lang.String> getClaimValues(java.lang.String username,
                                                                       java.util.List<java.lang.String> propertyNames)
                                                                throws IdentityProviderException
Return the list of claim values of the given user.

Parameters:
username - Name of the user
propertyNames - Names of the claims required.
Returns:
A map of claims with their values.
Throws:
IdentityProviderException

getPropertyNames

public java.util.List<java.lang.String> getPropertyNames()
                                                  throws IdentityProviderException
Access the name of user properties in the store.

Returns:
A java.util.List of all user property names.
Throws:
IdentityProviderException

getAllUserNames

public java.util.List<java.lang.String> getAllUserNames()
                                                 throws IdentityProviderException
Access the names of all users in the store.

Returns:
A java.util.List of all user names.
Throws:
IdentityProviderException

getRealm

public org.wso2.usermanager.Realm getRealm()

getClaimValues

public java.util.Map<java.lang.String,java.lang.String> getClaimValues(java.lang.String username,
                                                                       java.lang.String profileName,
                                                                       java.util.List<java.lang.String> propertyNames)
                                                                throws IdentityProviderException
Parameters:
username -
profileName -
propertyNames -
Returns:
Throws:
IdentityProviderException