Package omero.gateway

Class UserCredentials


  • public class UserCredentials
    extends java.lang.Object
    Holds username and password of a user
    Since:
    5.1
    • Constructor Summary

      Constructors 
      Constructor Description
      UserCredentials()
      Creates an empty instance
      UserCredentials​(java.lang.String username, java.lang.String password)
      Creates a new instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPassword()
      Returns the password.
      java.lang.String getUsername()
      Returns the user name (or session ID, if it was set before instead of an username)
      void setPassword​(java.lang.String password)
      Sets the password
      void setUsername​(java.lang.String username)
      Sets the username (or session ID)
      java.lang.String toString()
      Formats user name and password.
      • Methods inherited from class java.lang.Object

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

      • UserCredentials

        public UserCredentials()
        Creates an empty instance
      • UserCredentials

        public UserCredentials​(java.lang.String username,
                               java.lang.String password)
        Creates a new instance
        Parameters:
        username - The username or alternatively a session ID (in which case the password will be ignored)
        password - The password
    • Method Detail

      • getUsername

        public java.lang.String getUsername()
        Returns the user name (or session ID, if it was set before instead of an username)
        Returns:
        The username (or session ID)
      • setUsername

        public void setUsername​(java.lang.String username)
        Sets the username (or session ID)
        Parameters:
        username - The username or alternatively a session ID (in which case the password will be ignored)
      • getPassword

        public java.lang.String getPassword()
        Returns the password.
        Returns:
        The password
      • setPassword

        public void setPassword​(java.lang.String password)
        Sets the password
        Parameters:
        password - See above
      • toString

        public java.lang.String toString()
        Formats user name and password. Each character of the password is replaced by a star.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()