Interface IUserDetails
- All Known Implementing Classes:
UserDetailsCore
public interface IUserDetails
Interface defining authentification user details.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanhasAuthorization(Set<UserApiAuthorizationsResponse.TokenAuthorizationsEnum> authorizations, UserApiAuthorizationsResponse.TokenAuthorizationsEnum auth) Checks if the user token has a specific authorization from its set of granted permissions.default booleanhasRole(Set<UserApiAuthorizationsResponse.UserRolesEnum> roles, UserApiAuthorizationsResponse.UserRolesEnum ro) Checks if the user has a specific role from their set of assigned roles.
-
Method Details
-
hasRole
default boolean hasRole(Set<UserApiAuthorizationsResponse.UserRolesEnum> roles, UserApiAuthorizationsResponse.UserRolesEnum ro) Checks if the user has a specific role from their set of assigned roles.- Parameters:
roles- The complete set of roles assigned to the userro- The specific role to check for presence as aUserApiAuthorizationsResponse.UserRolesEnumobject- Returns:
trueif the user has the specified role,falseotherwise
-
hasAuthorization
default boolean hasAuthorization(Set<UserApiAuthorizationsResponse.TokenAuthorizationsEnum> authorizations, UserApiAuthorizationsResponse.TokenAuthorizationsEnum auth) Checks if the user token has a specific authorization from its set of granted permissions.- Parameters:
authorizations- The complete set of authorizations granted to the tokenauth- The specific authorization to check for presence as aUserApiAuthorizationsResponse.TokenAuthorizationsEnumobject- Returns:
trueif the token has the specified authorization,falseotherwise
-