public class User extends Object
Please consult the documentation for a detailed explanation.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Method and Description |
---|---|
User |
clearCache()
The User object will cache any roles or permissions that it knows it has to avoid hitting the
underlying auth provider each time.
|
Object |
getDelegate() |
User |
hasPermission(String permission,
Handler<AsyncResult<Boolean>> resultHandler)
Does the user have the specified permission?
|
rx.Observable<Boolean> |
hasPermissionObservable(String permission)
Does the user have the specified permission?
|
User |
hasPermissions(Set<String> permissions,
Handler<AsyncResult<Boolean>> resultHandler)
Does the user have all the specified permissions?
|
rx.Observable<Boolean> |
hasPermissionsObservable(Set<String> permissions)
Does the user have all the specified permissions?
|
User |
hasRole(String role,
Handler<AsyncResult<Boolean>> resultHandler)
Does the user have the specified role?
|
rx.Observable<Boolean> |
hasRoleObservable(String role)
Does the user have the specified role?
|
User |
hasRoles(Set<String> roles,
Handler<AsyncResult<Boolean>> resultHandler)
Does the user have all the specified roles?
|
rx.Observable<Boolean> |
hasRolesObservable(Set<String> roles)
Does the user have all the specified roles?
|
static User |
newInstance(User arg) |
JsonObject |
principal()
Get the underlying principal for the User.
|
void |
setAuthProvider(AuthProvider authProvider)
Set the auth provider for the User.
|
public User(User delegate)
public Object getDelegate()
public User hasRole(String role, Handler<AsyncResult<Boolean>> resultHandler)
role
- the roleresultHandler
- handler that will be called with an AsyncResult
containing the value `true` if the they have the role or `false` otherwise.public rx.Observable<Boolean> hasRoleObservable(String role)
role
- the rolepublic User hasPermission(String permission, Handler<AsyncResult<Boolean>> resultHandler)
permission
- the permissionresultHandler
- handler that will be called with an AsyncResult
containing the value `true` if the they have the permission or `false` otherwise.public rx.Observable<Boolean> hasPermissionObservable(String permission)
permission
- the permissionpublic User hasRoles(Set<String> roles, Handler<AsyncResult<Boolean>> resultHandler)
roles
- the set of rolesresultHandler
- handler that will be called with an AsyncResult
containing the value `true` if the they have all the roles or `false` otherwise.public rx.Observable<Boolean> hasRolesObservable(Set<String> roles)
roles
- the set of rolespublic User hasPermissions(Set<String> permissions, Handler<AsyncResult<Boolean>> resultHandler)
permissions
- the set of permissionsresultHandler
- handler that will be called with an AsyncResult
containing the value `true` if the they have all the permissions or `false` otherwise.public rx.Observable<Boolean> hasPermissionsObservable(Set<String> permissions)
permissions
- the set of permissionspublic User clearCache()
public JsonObject principal()
{ "username", "tim" }
public void setAuthProvider(AuthProvider authProvider)
authProvider
- the AuthProvider - this must be the same type of AuthProvider that originally created the UserCopyright © 2015. All Rights Reserved.