Class SpringSecurityHelper

java.lang.Object
org.pac4j.springframework.security.util.SpringSecurityHelper

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

    • SpringSecurityHelper

      public SpringSecurityHelper()
  • Method Details

    • 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
    • computeAuthentication

      public static Optional<org.springframework.security.core.Authentication> computeAuthentication(LinkedHashMap<String,org.pac4j.core.profile.UserProfile> profiles)
      Compute the Spring Security authentication from the pac4j profiles.
      Parameters:
      profiles - the linked hashmap of profiles
      Returns:
      the optional Spring Security authentication