INNER CODE UNIT · Java

isAuthenticated

pac4j/spring-webmvc-pac4j · src/main/java/org/pac4j/springframework/annotation/RequireRoleAnnotationAspect.java:44

    protected List<UserProfile> isAuthenticated() {
        val profiles = profileManager.getProfiles();

        if (!IS_AUTHENTICATED_AUTHORIZER.isAuthorized(webContext, sessionStore, profiles)) {
            throw new UnauthorizedAction();
        }
        return profiles;
    }

    /**
     * Check whether the user has one of the roles.
     *
     * @param requireAnyRole the roles config
     */
    @Before("@annotation(requireAnyRole)")
    public void beforeRequireAnyRole(final RequireAnyRole requireAnyRole) {
        val profiles = isAuthenticated();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…