Class SpringSecurityHelper


  • public final class SpringSecurityHelper
    extends Object
    Helper for Spring Security.
    Since:
    2.0.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • SpringSecurityHelper

        public SpringSecurityHelper()
    • Method Detail

      • buildAuthorities

        public static List<org.springframework.security.core.GrantedAuthority> buildAuthorities​(List<org.pac4j.core.profile.UserProfile> profiles)
        Build a list of authorities from a list of profiles.
        Parameters:
        profiles - a map of profiles
        Returns:
        a list of authorities
      • populateAuthentication

        public static void populateAuthentication​(LinkedHashMap<String,​org.pac4j.core.profile.UserProfile> profiles)
        Populate the authenticated user profiles in the Spring Security context.
        Parameters:
        profiles - the linked hashmap of profiles