diff --git a/static/img/auth.png b/static/img/auth.png new file mode 100644 index 000000000..fb7a9cad2 Binary files /dev/null and b/static/img/auth.png differ diff --git a/static/img/jwt.png b/static/img/jwt.png new file mode 100644 index 000000000..27b0aa98f Binary files /dev/null and b/static/img/jwt.png differ diff --git a/static/img/login-curl.png b/static/img/login-curl.png new file mode 100644 index 000000000..2fe008818 Binary files /dev/null and b/static/img/login-curl.png differ diff --git a/versioned_docs/version-4.0.0/running-keploy/api-testing-auth-setup.md b/versioned_docs/version-4.0.0/running-keploy/api-testing-auth-setup.md new file mode 100644 index 000000000..866e2db57 --- /dev/null +++ b/versioned_docs/version-4.0.0/running-keploy/api-testing-auth-setup.md @@ -0,0 +1,43 @@ +--- +id: api-testing-auth-setup +title: Auth Setup +sidebar_label: Auth Setup +description: Auth setup for API Testing +tags: + - API testing + - webhooks + - integration + - custom validation + - policy enforcement +keywords: + - webhook + - API testing + - PreExecute + - PostExecute + - external validation + - custom logic +--- + +import ProductTier from '@site/src/components/ProductTier'; + + + +This guide will help you setup your application Auth in API Test Generation and Run + +![Keploy](../../../static/img/auth.png) + +### 1. Login API + +![Keploy](../../../static/img/login-curl.png) + +This Auth option is for the application which provides a login API. Keploy will execute this login API when ever the auth token is required and use it in the API calls either in generation or run. + +JWT Token - Keploy will execute this API and take the token from the json response value with the key "token" or "access_token" or "jwt" + +Cookie - Keploy will execute this API and take the cookie from response headers with key value "Set-Cookie" + +### 2. Bearer Token + +![Keploy](../../../static/img/jwt.png) + +This Auth option is for the application which can be authenticated using jwt token. This token is used in all the API calls that are done by Keploy to the application. diff --git a/versioned_sidebars/version-4.0.0-sidebars.json b/versioned_sidebars/version-4.0.0-sidebars.json index 6399724df..74b2f5a79 100644 --- a/versioned_sidebars/version-4.0.0-sidebars.json +++ b/versioned_sidebars/version-4.0.0-sidebars.json @@ -170,6 +170,7 @@ "running-keploy/run-ai-generated-api-tests", "running-keploy/api-testing-cicd", "running-keploy/api-testing-webhook", + "running-keploy/api-testing-auth-setup", { "type": "doc", "label": "FAQs",