Class GrantedAuthoritiesService

java.lang.Object
edu.ucsb.cs156.example.services.GrantedAuthoritiesService

@Service("grantedAuthorities") public class GrantedAuthoritiesService extends Object
The is a service that retrieves and logs the granted authorities for the current user's authentication.
  • Constructor Details

    • GrantedAuthoritiesService

      public GrantedAuthoritiesService()
  • Method Details

    • getGrantedAuthorities

      public Collection<? extends org.springframework.security.core.GrantedAuthority> getGrantedAuthorities()
      The function retrieves and logs the granted authorities from the current security context in a Java application.
      Returns:
      collection of authorities granted to the currently authenticated user.