Class Credential

    • Constructor Detail

      • Credential

        public Credential()
    • Method Detail

      • getUsername

        public String getUsername()
        Gets the username of the credential.
        Returns:
        the username
        Since:
        100.0.0
      • toJson

        public String toJson()
        Writes this Credential object to a json String representation. This allows for persisting the credential to disk. It is imperative that this String is encrypted before being persisted to disk, or else it may pose a security vulnerability.
        Returns:
        a json String representation of this Credential
        Since:
        100.0.0
      • fromJson

        public static Credential fromJson​(String json)
        Parses the specified json String into a Credential object. This allows for restoring a previously persisted Credential.
        Parameters:
        json - a json String representation of a Credential
        Returns:
        the Credential object parsed from the string or null if the string does not contain Credential json
        Throws:
        IllegalArgumentException - if json string is null or empty
        Since:
        100.0.0
      • copy

        public abstract Credential copy()
        Creates a deep copy of this Credential instance.
        Returns:
        a deep copy of this Credential instance
        Since:
        100.1.0