Package org.wildfly.security.authz
Interface AuthorizationIdentity
-
- All Known Implementing Classes:
JaasSecurityRealm.JaasAuthorizationIdentity
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
Fields Modifier and Type Field Description static AuthorizationIdentity
EMPTY
The empty authorization identity.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static AuthorizationIdentity
basicIdentity(Supplier<Attributes> attributes, String string)
Create a basic authorization identity implementation.static AuthorizationIdentity
basicIdentity(Supplier<Attributes> attributes, Supplier<Attributes> runtimeAttributes, String string)
Create a basic authorization identity implementation using the given attributes and runtime attributes.static AuthorizationIdentity
basicIdentity(Attributes attributes)
Create a basic authorization identity implementation.static AuthorizationIdentity
basicIdentity(AuthorizationIdentity authorizationIdentity, Attributes runtimeAttributes)
Create a basic authorization identity implementation using the given authorization identity and runtime attributes.default Attributes
getAttributes()
Get the attributes which pertain to this identity.default Attributes
getRuntimeAttributes()
Get the runtime attributes which pertain to this identity.
-
-
-
Field Detail
-
EMPTY
static final AuthorizationIdentity EMPTY
The empty authorization identity.
-
-
Method Detail
-
getAttributes
default Attributes 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
default Attributes 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
static AuthorizationIdentity basicIdentity(Attributes attributes)
Create a basic authorization identity implementation.- Parameters:
attributes
- the identity attributes- Returns:
- the authorization identity
-
basicIdentity
static AuthorizationIdentity basicIdentity(Supplier<Attributes> attributes, String string)
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
-
-