Class AuthorizationCodeAuthHandler

java.lang.Object
io.karatelabs.http.AuthorizationCodeAuthHandler
All Implemented Interfaces:
AuthHandler

public class AuthorizationCodeAuthHandler extends Object implements AuthHandler
OAuth 2.0 Authorization Code + PKCE Auth Handler. Implements the authorization code flow with PKCE for public clients.
  • Constructor Details

  • Method Details

    • apply

      public void apply(HttpRequestBuilder builder)
      Specified by:
      apply in interface AuthHandler
    • getType

      public String getType()
      Specified by:
      getType in interface AuthHandler
    • toCurlPreview

      public String toCurlPreview(String platform)
      Description copied from interface: AuthHandler
      Returns the curl preview for this auth handler (without triggering side effects). This is used for UI/preview purposes where we don't want to make network calls. If null, falls back to toCurlArgument() behavior. For OAuth handlers that need network access, this should return a placeholder.
      Specified by:
      toCurlPreview in interface AuthHandler
      Parameters:
      platform - "sh" for Unix/Linux/macOS, "cmd" for Windows CMD, "ps" for PowerShell