Package org.wildfly.security.authz
Interface RoleDecoder
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RoleDecoder
A decoder to extract role information from an identity's attributes.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static RoleDecoder
DEFAULT
A role decoder which always decodes roles from the attribute called "Roles".static RoleDecoder
EMPTY
A role decoder which decodes no roles.static String
KEY_ROLES
A key whose value is the string "Roles", to provide a standard/default location at which roles may be found.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Roles
decodeRoles(AuthorizationIdentity authorizationIdentity)
Decode the role set from the given authorization identity.static RoleDecoder
simple(String attribute)
Create a simple role decoder which returns the values of the given attribute.
-
-
-
Field Detail
-
KEY_ROLES
static final String KEY_ROLES
A key whose value is the string "Roles", to provide a standard/default location at which roles may be found.- See Also:
- Constant Field Values
-
EMPTY
static final RoleDecoder EMPTY
A role decoder which decodes no roles.
-
DEFAULT
static final RoleDecoder DEFAULT
A role decoder which always decodes roles from the attribute called "Roles".
-
-
Method Detail
-
decodeRoles
Roles decodeRoles(AuthorizationIdentity authorizationIdentity)
Decode the role set from the given authorization identity.- Parameters:
authorizationIdentity
- the authorization identity (notnull
)- Returns:
- the role set (must not be
null
)
-
simple
static RoleDecoder simple(String attribute)
Create a simple role decoder which returns the values of the given attribute.- Parameters:
attribute
- the attribute- Returns:
- the roles
-
-