public class RemoteUMClient extends Object
Constructor and Description |
---|
RemoteUMClient()
Initialization of environment
|
Modifier and Type | Method and Description |
---|---|
void |
addRole(String roleName)
Add a role to the system
|
void |
addUser(String userName,
String password)
Add a user store to the system.
|
void |
addUserWithRole(String userName,
String password,
String roleName)
Add a new user by assigning him to a new role
|
void |
authorizeRole(String roleName,
String resourceId,
String action)
Authorize a role with given permission.
|
void |
createRemoteAuthorizationManager()
create web service client for RemoteAuthorizationManager service.
|
void |
createRemoteUserStoreManager()
create web service client for RemoteUserStoreManager service from the wrapper api provided
in carbon - remote-usermgt component
|
void |
deleteUser(String userName)
Delete an exisitng user from the system
|
void |
getUserClaims(String username,
String profile)
print the user claims of given user
|
boolean |
isUserAuthorized(String userName,
String resourceId,
String action)
Check whether a given user has a given permission.
|
String[] |
listUsers()
Retrieve all the users in the system
|
String |
login(String username,
String password)
Authenticate to carbon as admin user and obtain the authentication cookie
|
static void |
main(String[] args) |
void |
updateEmail(String username,
String value)
update the email address of given user
|
void |
updateLastName(String username,
String value)
update the Last name of given user
|
public String login(String username, String password) throws Exception
username
- password
- Exception
public void createRemoteUserStoreManager() throws org.wso2.carbon.user.core.UserStoreException
org.wso2.carbon.user.core.UserStoreException
public void createRemoteAuthorizationManager() throws org.wso2.carbon.user.core.UserStoreException
org.wso2.carbon.user.core.UserStoreException
public void addUser(String userName, String password) throws org.wso2.carbon.user.core.UserStoreException
org.wso2.carbon.user.core.UserStoreException
public void addRole(String roleName) throws org.wso2.carbon.user.core.UserStoreException
Exception
org.wso2.carbon.user.core.UserStoreException
public void addUserWithRole(String userName, String password, String roleName) throws org.wso2.carbon.user.core.UserStoreException
Exception
org.wso2.carbon.user.core.UserStoreException
public String[] listUsers() throws org.wso2.carbon.user.core.UserStoreException
Exception
org.wso2.carbon.user.core.UserStoreException
public void deleteUser(String userName) throws org.wso2.carbon.user.core.UserStoreException
Exception
org.wso2.carbon.user.core.UserStoreException
public void authorizeRole(String roleName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
roleName
- resourceId
- action
- org.wso2.carbon.user.core.UserStoreException
public boolean isUserAuthorized(String userName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
userName
- resourceId
- action
- org.wso2.carbon.user.core.UserStoreException
public void getUserClaims(String username, String profile) throws Exception
username
- profile
- Exception
public void updateLastName(String username, String value) throws Exception
username
- value
- Exception
Copyright © 2007–2017 WSO2. All rights reserved.