Package org.wildfly.security.authz
Interface AuthorizationIdentity
public interface AuthorizationIdentity
A realm's authorization identity. Objects of this class represent an active identity which may be examined for
authorization decisions. Since there is no upper bound in the lifespan of instances of this class, they should
not retain references to scarce resources like database connections or file handles.
- Author:
- David M. Lloyd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AuthorizationIdentityThe empty authorization identity. -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthorizationIdentitybasicIdentity(Supplier<Attributes> attributes, String string) Create a basic authorization identity implementation.static AuthorizationIdentitybasicIdentity(Supplier<Attributes> attributes, Supplier<Attributes> runtimeAttributes, String string) Create a basic authorization identity implementation using the given attributes and runtime attributes.static AuthorizationIdentitybasicIdentity(Attributes attributes) Create a basic authorization identity implementation.static AuthorizationIdentitybasicIdentity(AuthorizationIdentity authorizationIdentity, Attributes runtimeAttributes) Create a basic authorization identity implementation using the given authorization identity and runtime attributes.default AttributesGet the attributes which pertain to this identity.default AttributesGet the runtime attributes which pertain to this identity.
-
Field Details
-
EMPTY
The empty authorization identity.
-
-
Method Details
-
getAttributes
Get the attributes which pertain to this identity. By default, an empty attribute collection is returned.- Returns:
- the attributes (must not be
null)
-
getRuntimeAttributes
Get the runtime attributes which pertain to this identity. By default, an empty attribute collection is returned.- Returns:
- the runtime attributes (must not be
null)
-
basicIdentity
Create a basic authorization identity implementation.- Parameters:
attributes- the identity attributes- Returns:
- the authorization identity
-
basicIdentity
Create a basic authorization identity implementation.- Parameters:
attributes- the identity attributes- Returns:
- the authorization identity
-
basicIdentity
static AuthorizationIdentity basicIdentity(Supplier<Attributes> attributes, Supplier<Attributes> runtimeAttributes, String string) Create a basic authorization identity implementation using the given attributes and runtime attributes.- Parameters:
attributes- the attributesruntimeAttributes- the runtime attributes- Returns:
- the authorization identity
-
basicIdentity
static AuthorizationIdentity basicIdentity(AuthorizationIdentity authorizationIdentity, Attributes runtimeAttributes) Create a basic authorization identity implementation using the given authorization identity and runtime attributes.- Parameters:
authorizationIdentity- the authorization identityruntimeAttributes- the identity runtime attributes- Returns:
- the authorization identity
-