Class RequireRoleAnnotationAspect
java.lang.Object
org.pac4j.springframework.annotation.RequireRoleAnnotationAspect
The aspect to define the annotations.
- Since:
- 3.2.0
- Author:
- Jerome Leleu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeRequireAllRoles(RequireAllRoles requireAllRoles) Check whether the user has all the roles.voidbeforeRequireAnyRole(RequireAnyRole requireAnyRole) Check whether the user has one of the roles.protected List<org.pac4j.core.profile.UserProfile>Check if the user is authenticated and return its profiles if so.
-
Constructor Details
-
RequireRoleAnnotationAspect
public RequireRoleAnnotationAspect()
-
-
Method Details
-
isAuthenticated
Check if the user is authenticated and return its profiles if so.- Returns:
- the user profiles
-
beforeRequireAnyRole
Check whether the user has one of the roles.- Parameters:
requireAnyRole- the roles config
-
beforeRequireAllRoles
Check whether the user has all the roles.- Parameters:
requireAllRoles- the roles config
-