Class Credential


  • public class Credential
    extends java.lang.Object
    Holds credentials (username and password).
    • Field Detail

      • OAUTH2_TOKEN_USER_NAME

        public static final java.lang.String OAUTH2_TOKEN_USER_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • from

        public static Credential from​(java.lang.String username,
                                      java.lang.String password)
        Gets a Credential configured with a username and password.
        Parameters:
        username - the username
        password - the password
        Returns:
        a new Credential
      • getUsername

        public java.lang.String getUsername()
        Gets the username.
        Returns:
        the username
      • getPassword

        public java.lang.String getPassword()
        Gets the password.
        Returns:
        the password
      • isOAuth2RefreshToken

        public boolean isOAuth2RefreshToken()
        Check whether this credential is an OAuth 2.0 refresh token.
        Returns:
        true if this credential is an OAuth 2.0 refresh token.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object