Class Credential

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Credential extends ProxyInstance
Groups information used for user authentication.
Since:
2.2
  • Constructor Details

    • Credential

      public Credential(MemorySegment address)
      Create a Credential proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Credential

      public Credential(String username, String password, CredentialPersistence persistence)
      Create a new credential from the provided username, password and persistence mode.
      Parameters:
      username - The username for the new credential
      password - The password for the new credential
      persistence - The WebKitCredentialPersistence of the new credential
      Since:
      2.2
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Credential class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout 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 the certificate and persistence mode.

      Note that CredentialPersistence.PERMANENT is not supported for certificate credentials.

      Parameters:
      certificate - The GTlsCertificate, or null
      persistence - The WebKitCredentialPersistence of the new credential
      Returns:
      A WebKitCredential.
      Since:
      2.34
    • forCertificatePin

      public static Credential forCertificatePin(String pin, CredentialPersistence persistence)

      Create a new credential from the provided PIN and persistence mode.

      Note that CredentialPersistence.PERMANENT is not supported for certificate pin credentials.

      Parameters:
      pin - The PIN for the new credential
      persistence - The WebKitCredentialPersistence of the new credential
      Returns:
      A WebKitCredential.
      Since:
      2.34
    • copy

      public Credential copy()
      Make a copy of the WebKitCredential.
      Returns:
      A copy of passed in WebKitCredential
      Since:
      2.2
    • free

      public void free()
      Free the WebKitCredential.
      Since:
      2.2
    • getCertificate

      public TlsCertificate getCertificate()
      Get the certificate currently held by this WebKitCredential.
      Returns:
      a GTlsCertificate, or null
      Since:
      2.34
    • getPassword

      public String getPassword()
      Get the password currently held by this WebKitCredential.
      Returns:
      The password stored in the WebKitCredential.
      Since:
      2.2
    • getPersistence

      public CredentialPersistence getPersistence()
      Get the persistence mode currently held by this WebKitCredential.
      Returns:
      The WebKitCredentialPersistence stored in the WebKitCredential.
      Since:
      2.2
    • getUsername

      public String getUsername()
      Get the username currently held by this WebKitCredential.
      Returns:
      The username stored in the WebKitCredential.
      Since:
      2.2
    • hasPassword

      public boolean hasPassword()
      Determine whether this credential has a password stored.
      Returns:
      true if the credential has a password or false otherwise.
      Since:
      2.2