接口 SecurityContext


  • public interface SecurityContext
    Security context in which an endpoint is being invoked.
    从以下版本开始:
    2.0.0
    • 方法详细资料

      • isUserInRole

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