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 |
deleteRole(String roleName)
Delete an exisitng user from the system
|
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 - Exceptionpublic void createRemoteUserStoreManager()
throws org.wso2.carbon.user.core.UserStoreException
org.wso2.carbon.user.core.UserStoreExceptionpublic void createRemoteAuthorizationManager()
throws org.wso2.carbon.user.core.UserStoreException
org.wso2.carbon.user.core.UserStoreExceptionpublic void addUser(String userName, String password) throws org.wso2.carbon.user.core.UserStoreException
org.wso2.carbon.user.core.UserStoreExceptionpublic void addRole(String roleName) throws org.wso2.carbon.user.core.UserStoreException
Exceptionorg.wso2.carbon.user.core.UserStoreExceptionpublic void addUserWithRole(String userName, String password, String roleName) throws org.wso2.carbon.user.core.UserStoreException
Exceptionorg.wso2.carbon.user.core.UserStoreExceptionpublic String[] listUsers() throws org.wso2.carbon.user.core.UserStoreException
Exceptionorg.wso2.carbon.user.core.UserStoreExceptionpublic void deleteUser(String userName) throws org.wso2.carbon.user.core.UserStoreException
Exceptionorg.wso2.carbon.user.core.UserStoreExceptionpublic void deleteRole(String roleName) throws org.wso2.carbon.user.core.UserStoreException
Exceptionorg.wso2.carbon.user.core.UserStoreExceptionpublic void authorizeRole(String roleName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
roleName - resourceId - action - org.wso2.carbon.user.core.UserStoreExceptionpublic boolean isUserAuthorized(String userName, String resourceId, String action) throws org.wso2.carbon.user.core.UserStoreException
userName - resourceId - action - org.wso2.carbon.user.core.UserStoreExceptionpublic void getUserClaims(String username, String profile) throws Exception
username - profile - Exceptionpublic void updateLastName(String username, String value) throws Exception
username - value - ExceptionCopyright © 2022 WSO2. All rights reserved.