Class RequireRoleAnnotationAspect

java.lang.Object
org.pac4j.springframework.annotation.RequireRoleAnnotationAspect

public class RequireRoleAnnotationAspect extends Object
The aspect to define the annotations.
Since:
3.2.0
Author:
Jerome Leleu
  • Constructor Details

    • RequireRoleAnnotationAspect

      public RequireRoleAnnotationAspect()
  • Method Details

    • isAuthenticated

      protected List<org.pac4j.core.profile.UserProfile> isAuthenticated()
      Check if the user is authenticated and return its profiles if so.
      Returns:
      the user profiles
    • beforeRequireAnyRole

      public void beforeRequireAnyRole(RequireAnyRole requireAnyRole)
      Check whether the user has one of the roles.
      Parameters:
      requireAnyRole - the roles config
    • beforeRequireAllRoles

      public void beforeRequireAllRoles(RequireAllRoles requireAllRoles)
      Check whether the user has all the roles.
      Parameters:
      requireAllRoles - the roles config