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