public interface SecurityApi extends KillbillApi
| Modifier and Type | Method and Description |
|---|---|
void |
addRoleDefinition(String role,
List<String> permissions,
CallContext context)
Add a role definition in the Shiro store (JDBCRealm)
|
void |
addUserRoles(String username,
String clearPassword,
List<String> roles,
CallContext context)
Add a user with roles in the Shiro store (JDBCRealm)
|
void |
checkCurrentUserPermissions(List<Permission> permissions,
Logical logical,
TenantContext context)
Check the current user has the set of permissions.
|
Set<Permission> |
getCurrentUserPermissions(TenantContext context)
Return the set of permissions for the currently logged-in user.
|
List<String> |
getRoleDefinition(String role,
TenantContext tenantContext)
Retrieves the list of permissions associated to that role in the Shiro store (JDBCRealm)
|
List<String> |
getUserRoles(String username,
TenantContext tenantContext)
Retrieves the roles associated to a user in the Shiro store (JDBCRealm)
|
void |
invalidateUser(String username,
CallContext context)
Invalidate a user
|
boolean |
isSubjectAuthenticated() |
void |
login(Object principal,
Object credentials)
Perform a login attempt.
|
void |
logout()
Log out the current user and invalidate and/or remove any associated entities (e.g.
|
void |
updateUserPassword(String username,
String clearPassword,
CallContext context)
Update password for the user
|
void |
updateUserRoles(String username,
List<String> roles,
CallContext context)
Update the roles associated with the user (only the specified roles will be in effect)
|
void login(Object principal, Object credentials)
principal - account identity (e.g. username)credentials - account credentials (e.g. password)void logout()
boolean isSubjectAuthenticated()
Set<Permission> getCurrentUserPermissions(TenantContext context)
context - tenant contextvoid checkCurrentUserPermissions(List<Permission> permissions, Logical logical, TenantContext context) throws SecurityApiException
permissions - set of permissions to checklogical - rule to use for multiple permissionscontext - tenant contextSecurityExceptionSecurityApiExceptionvoid addUserRoles(String username, String clearPassword, List<String> roles, CallContext context) throws SecurityApiException
username - the usernameclearPassword - the password (in clear)roles - the list of (existing) rolescontext - context (does not include tenant nor account info)SecurityApiExceptionvoid updateUserPassword(String username, String clearPassword, CallContext context) throws SecurityApiException
username - the usernameclearPassword - the password (in clear)context - context (does not include tenant nor account info)SecurityApiExceptionvoid updateUserRoles(String username, List<String> roles, CallContext context) throws SecurityApiException
username - the usernameroles - the new rolescontext - context (does not include tenant nor account info)SecurityApiExceptionvoid invalidateUser(String username, CallContext context) throws SecurityApiException
username - the usernamecontext - context (does not include tenant nor account info)SecurityApiExceptionList<String> getUserRoles(String username, TenantContext tenantContext)
username - the usernametenantContext - dummy contextvoid addRoleDefinition(String role, List<String> permissions, CallContext context) throws SecurityApiException
role - the role namepermissions - the list of permissionscontext - context (does not include tenant nor account info)SecurityApiExceptionPermissionList<String> getRoleDefinition(String role, TenantContext tenantContext)
role - the role nametenantContext - dummy contextCopyright © 2010-2016. All Rights Reserved.