Class AuthDomainBasic

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public final class AuthDomainBasic extends AuthDomain

Server-side "Basic" authentication.

AuthDomainBasic handles the server side of HTTP "Basic" (ie, cleartext password) authentication.

  • Constructor Details

    • AuthDomainBasic

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

      public AuthDomainBasic(String optname1, Object... varargs)

      Creates a AuthDomainBasic.

      You must set the AuthDomain:realm property, to indicate the realm name to be returned with the authentication challenge to the client. Other parameters are optional.

      Parameters:
      optname1 - name of first option, or null
      varargs - option name/value pairs
    • AuthDomainBasic

      public AuthDomainBasic()
      Create a new AuthDomainBasic.
  • Method Details

    • getType

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

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected AuthDomainBasic asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class AuthDomain
      Returns:
      the instance as if it were its parent type
    • setAuthCallback

      public void setAuthCallback(@Nullable AuthDomainBasicAuthCallback callback)

      Sets the callback that this AuthDomainBasic will use to authenticate incoming requests.

      For each request containing authorization, this AuthDomainBasic will invoke the callback, and then either accept or reject the request based on callback's return value.

      You can also set the auth callback by setting the AuthDomainBasic:auth-callback and AuthDomainBasic:auth-data properties, which can also be used to set the callback at construct time.

      Parameters:
      callback - the callback
    • builder

      public static AuthDomainBasic.Builder<? extends AuthDomainBasic.Builder> builder()
      A AuthDomainBasic.Builder object constructs a AuthDomainBasic with the specified properties. Use the various set...() methods to set properties, and finish construction with AuthDomainBasic.Builder.build().
      Returns:
      the builder object