Package io.karatelabs.http
Class AuthorizationCodeAuthHandler
java.lang.Object
io.karatelabs.http.AuthorizationCodeAuthHandler
- All Implemented Interfaces:
AuthHandler
OAuth 2.0 Authorization Code + PKCE Auth Handler.
Implements the authorization code flow with PKCE for public clients.
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationCodeAuthHandler(Map<String, Object> config, OAuth2BrowserCallback browserCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(HttpRequestBuilder builder) getType()toCurlPreview(String platform) Returns the curl preview for this auth handler (without triggering side effects).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.karatelabs.http.AuthHandler
toCurlArgument
-
Constructor Details
-
AuthorizationCodeAuthHandler
public AuthorizationCodeAuthHandler(Map<String, Object> config, OAuth2BrowserCallback browserCallback)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceAuthHandler
-
getType
- Specified by:
getTypein interfaceAuthHandler
-
toCurlPreview
Description copied from interface:AuthHandlerReturns 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:
toCurlPreviewin interfaceAuthHandler- Parameters:
platform- "sh" for Unix/Linux/macOS, "cmd" for Windows CMD, "ps" for PowerShell
-