Record Class GitCredentials
java.lang.Object
java.lang.Record
io.skipcheck.tm1.client.service.git.GitCredentials
- Record Components:
username- the user name, for HTTPSpassword- the password or access token, for HTTPSpublicKey- the SSH public keyprivateKey- the SSH private keypassphrase- the private key's passphrase
public record GitCredentials(@Nullable String username, @Nullable String password, @Nullable String publicKey, @Nullable String privateKey, @Nullable String passphrase)
extends Record
How TM1 signs in to the Git remote: nothing (a public or
git:// remote), a user
name and password or token (HTTPS), or an SSH key pair. TM1 doesn't keep them, so every
call that reaches the remote takes them again. toString() leaves the secrets
out.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static GitCredentialsnone()No credentials.@Nullable StringReturns the value of thepassphraserecord component.@Nullable Stringpassword()Returns the value of thepasswordrecord component.static GitCredentialsA user name and password, or access token, for an HTTPS remote.@Nullable StringReturns the value of theprivateKeyrecord component.@Nullable StringReturns the value of thepublicKeyrecord component.static GitCredentialsAn SSH key pair, for an SSH remote.toString()Which credentials these are, without the secrets.@Nullable Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
GitCredentials
public GitCredentials(@Nullable String username, @Nullable String password, @Nullable String publicKey, @Nullable String privateKey, @Nullable String passphrase) Creates an instance of aGitCredentialsrecord class.- Parameters:
username- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentpublicKey- the value for thepublicKeyrecord componentprivateKey- the value for theprivateKeyrecord componentpassphrase- the value for thepassphraserecord component
-
-
Method Details
-
none
-
password
A user name and password, or access token, for an HTTPS remote.- Parameters:
username- the user namepassword- the password or token- Returns:
- them
-
sshKey
public static GitCredentials sshKey(String publicKey, String privateKey, @Nullable String passphrase) An SSH key pair, for an SSH remote.- Parameters:
publicKey- the public keyprivateKey- the private keypassphrase- its passphrase, ornullfor none- Returns:
- them
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
username
-
password
-
publicKey
-
privateKey
Returns the value of theprivateKeyrecord component.- Returns:
- the value of the
privateKeyrecord component
-
passphrase
Returns the value of thepassphraserecord component.- Returns:
- the value of the
passphraserecord component
-