Interface SecurityContextService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getPassword()
      Get the user password about the currently logged in user
      java.lang.String getUsername()
      Get the user name about the currently logged in user
      boolean hasRole​(java.lang.String role)
      Check if the currently logged in user has the required role.
      boolean isAuthenticated()
      Check if the currently logged in user is authenticated.
    • Method Detail

      • getUsername

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

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

        boolean hasRole​(java.lang.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