Package org.webkitgtk
Class Credential
java.lang.Object
org.javagi.base.ProxyInstance
org.webkitgtk.Credential
-
Constructor Summary
ConstructorsConstructorDescriptionCredential(MemorySegment address) Create a Credential proxy instance for the provided memory address.Credential(String username, String password, CredentialPersistence persistence) Create a new credential from the provided username, password and persistence mode. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Make a copy of theWebKitCredential.static CredentialforCertificate(@Nullable TlsCertificate certificate, CredentialPersistence persistence) Create a new credential from thecertificateand persistence mode.static CredentialforCertificatePin(String pin, CredentialPersistence persistence) Create a new credential from the provided PIN and persistence mode.voidfree()Free theWebKitCredential.Get the certificate currently held by thisWebKitCredential.static MemoryLayoutThe memory layout of the native struct.Get the password currently held by thisWebKitCredential.Get the persistence mode currently held by thisWebKitCredential.static @Nullable TypegetType()Get the GType of the Credential classGet the username currently held by thisWebKitCredential.booleanDetermine whether this credential has a password stored.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Credential
Create a Credential proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
Credential
Create a new credential from the provided username, password and persistence mode.- Parameters:
username- The username for the new credentialpassword- The password for the new credentialpersistence- TheWebKitCredentialPersistenceof the new credential- Since:
- 2.2
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
forCertificate
public static Credential forCertificate(@Nullable TlsCertificate certificate, CredentialPersistence persistence) Create a new credential from thecertificateand persistence mode.Note that
CredentialPersistence.PERMANENTis not supported for certificate credentials.- Parameters:
certificate- TheGTlsCertificate, ornullpersistence- TheWebKitCredentialPersistenceof the new credential- Returns:
- A
WebKitCredential. - Since:
- 2.34
-
forCertificatePin
Create a new credential from the provided PIN and persistence mode.Note that
CredentialPersistence.PERMANENTis not supported for certificate pin credentials.- Parameters:
pin- The PIN for the new credentialpersistence- TheWebKitCredentialPersistenceof the new credential- Returns:
- A
WebKitCredential. - Since:
- 2.34
-
copy
Make a copy of theWebKitCredential.- Returns:
- A copy of passed in
WebKitCredential - Since:
- 2.2
-
free
public void free()Free theWebKitCredential.- Since:
- 2.2
-
getCertificate
Get the certificate currently held by thisWebKitCredential.- Returns:
- a
GTlsCertificate, ornull - Since:
- 2.34
-
getPassword
Get the password currently held by thisWebKitCredential.- Returns:
- The password stored in the
WebKitCredential. - Since:
- 2.2
-
getPersistence
Get the persistence mode currently held by thisWebKitCredential.- Returns:
- The
WebKitCredentialPersistencestored in theWebKitCredential. - Since:
- 2.2
-
getUsername
Get the username currently held by thisWebKitCredential.- Returns:
- The username stored in the
WebKitCredential. - Since:
- 2.2
-
hasPassword
public boolean hasPassword()Determine whether this credential has a password stored.- Returns:
trueif the credential has a password orfalseotherwise.- Since:
- 2.2
-