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 | Field and Description |
---|---|
static TypeArg<User> |
__TYPE_ARG |
Constructor and Description |
---|
User(Object delegate) |
User(User delegate) |
Modifier and Type | Method and Description |
---|---|
JsonObject |
attributes()
Gets extra attributes of the user.
|
Authorizations |
authorizations()
Returns user's authorizations that have been previously loaded by the providers.
|
User |
clearCache()
Deprecated.
|
static User |
create(JsonObject principal) |
static User |
create(JsonObject principal,
JsonObject attributes) |
boolean |
equals(Object o) |
boolean |
expired()
Flags this user object to be expired.
|
boolean |
expired(int leeway)
Flags this user object to be expired.
|
User |
getDelegate() |
int |
hashCode() |
User |
isAuthorized(Authorization authority)
Deprecated.
|
User |
isAuthorized(Authorization authority,
Handler<AsyncResult<Boolean>> resultHandler)
Deprecated.
|
User |
isAuthorized(String authority)
Deprecated.
|
User |
isAuthorized(String authority,
Handler<AsyncResult<Boolean>> resultHandler)
Deprecated.
|
static User |
newInstance(User arg) |
JsonObject |
principal()
Get the underlying principal for the User.
|
rx.Single<Boolean> |
rxIsAuthorized(Authorization authority)
Deprecated.
|
rx.Single<Boolean> |
rxIsAuthorized(String authority)
Deprecated.
|
void |
setAuthProvider(AuthProvider authProvider)
Deprecated.
|
String |
toString() |
public User getDelegate()
public static User create(JsonObject principal)
public static User create(JsonObject principal, JsonObject attributes)
public JsonObject attributes()
public boolean expired()
true
if expiredpublic boolean expired(int leeway)
exp
"expiration" timestamp in seconds.iat
"issued at" in seconds.nbf
"not before" in seconds.principal()
do not contain a key
then attributes()
are checked.
If all of the properties are not available the user will not expire.
Implementations of this interface might relax this rule to account for a leeway to safeguard against clock drifting.
leeway
- a greater than zero leeway value.true
if expiredpublic Authorizations authorizations()
@Deprecated public User isAuthorized(Authorization authority, Handler<AsyncResult<Boolean>> resultHandler)
authority
- the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.resultHandler
- handler that will be called with an AsyncResult
containing the value `true` if the they has the authority or `false` otherwise.@Deprecated public User isAuthorized(Authorization authority)
authority
- the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.@Deprecated public rx.Single<Boolean> rxIsAuthorized(Authorization authority)
authority
- the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.@Deprecated public User isAuthorized(String authority, Handler<AsyncResult<Boolean>> resultHandler)
authority
- the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.resultHandler
- handler that will be called with an AsyncResult
containing the value `true` if the they has the authority or `false` otherwise.@Deprecated public User isAuthorized(String authority)
authority
- the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.@Deprecated public rx.Single<Boolean> rxIsAuthorized(String authority)
authority
- the authority - what this really means is determined by the specific implementation. It might represent a permission to access a resource e.g. `printers:printer34` or it might represent authority to a role in a roles based model, e.g. `role:admin`.@Deprecated public User clearCache()
public JsonObject principal()
{ "username", "tim" }
@Deprecated public void setAuthProvider(AuthProvider authProvider)
authProvider
- the AuthProvider - this must be the same type of AuthProvider that originally created the UserCopyright © 2020 Eclipse. All rights reserved.