Class SpringSecurityContextService

    • Method Summary

      All Methods Instance Methods Concrete 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringSecurityContextService

        public SpringSecurityContextService()
    • Method Detail

      • getUsername

        public java.lang.String getUsername()
        Description copied from interface: SecurityContextService
        Get the user name about the currently logged in user
        Specified by:
        getUsername in interface SecurityContextService
        Returns:
        user name from security context otherwise null
      • getPassword

        public java.lang.String getPassword()
        Description copied from interface: SecurityContextService
        Get the user password about the currently logged in user
        Specified by:
        getPassword in interface SecurityContextService
        Returns:
        user password from security context otherwise null
      • hasRole

        public boolean hasRole​(java.lang.String role)
        Description copied from interface: SecurityContextService
        Check if the currently logged in user has the required role.
        Specified by:
        hasRole in interface SecurityContextService
        Parameters:
        role - - required role
        Returns:
        true if role is assigned, otherwise false