org.springframework.boot.actuate.endpoint

Interface SecurityContext



  • public interface SecurityContext
    Security context in which an endpoint is being invoked.
    Since:
    2.0.0
    Author:
    Andy Wilkinson
    • Method Detail

      • getPrincipal

        Principal getPrincipal()
        Return the currently authenticated Principal or null.
        Returns:
        the principal or null
      • isUserInRole

        boolean isUserInRole(String role)
        Returns true if the currently authenticated user is in the given role, or false otherwise.
        Parameters:
        role - name of the role
        Returns:
        true if the user is in the given role