Credential#
Added in version 2.2.
- class Credential(**kwargs)#
Groups information used for user authentication.
Constructors#
- class Credential
- classmethod new(username: str, password: str, persistence: CredentialPersistence) Credential #
Create a new credential from the provided username, password and persistence mode.
Added in version 2.2.
- Parameters:
username – The username for the new credential
password – The password for the new credential
persistence – The
CredentialPersistence
of the new credential
- classmethod new_for_certificate(certificate: TlsCertificate | None, persistence: CredentialPersistence) Credential #
Create a new credential from the
certificate
and persistence mode.Note that
PERMANENT
is not supported for certificate credentials.Added in version 2.34.
- Parameters:
certificate – The
TlsCertificate
, orNone
persistence – The
CredentialPersistence
of the new credential
- classmethod new_for_certificate_pin(pin: str, persistence: CredentialPersistence) Credential #
Create a new credential from the provided PIN and persistence mode.
Note that
PERMANENT
is not supported for certificate pin credentials.Added in version 2.34.
- Parameters:
pin – The PIN for the new credential
persistence – The
CredentialPersistence
of the new credential
Methods#
- class Credential
- free() None #
Free the
Credential
.Added in version 2.2.
- get_certificate() TlsCertificate #
Get the certificate currently held by this
Credential
.Added in version 2.34.
- get_password() str #
Get the password currently held by this
Credential
.Added in version 2.2.
- get_persistence() CredentialPersistence #
Get the persistence mode currently held by this
Credential
.Added in version 2.2.
- get_username() str #
Get the username currently held by this
Credential
.Added in version 2.2.