Interface SecurityContextService

    • Method Detail

      • getUsername

        String getUsername()
        Get the user name about the currently logged in user
        Returns:
        user name from security context otherwise null
      • getPassword

        String getPassword()
        Get the user password about the currently logged in user
        Returns:
        user password from security context otherwise null
      • hasRole

        boolean hasRole​(String role)
        Check if the currently logged in user has the required role.
        Parameters:
        role - - required role
        Returns:
        true if role is assigned, otherwise false
      • isAuthenticated

        boolean isAuthenticated()
        Check if the currently logged in user is authenticated.
        Returns:
        true is authenticated, otherwise false