From 32b5f404e134c280c4fc00ffa952977f66431f73 Mon Sep 17 00:00:00 2001 From: javivaz Date: Wed, 22 Mar 2023 13:11:18 +0100 Subject: [PATCH] Add oauth2 client-credentials example (#1044) * Add oauth2 client-credentials example Add an example for oauth2 config with client-credentials, valid status response codes, token url, etc. Signed-off-by: javivaz * Remove commented config Signed-off-by: Suraj Nath <9503187+electron0zero@users.noreply.github.com> --------- Signed-off-by: javivaz Signed-off-by: Suraj Nath <9503187+electron0zero@users.noreply.github.com> Co-authored-by: Suraj Nath <9503187+electron0zero@users.noreply.github.com> --- example.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/example.yml b/example.yml index b9a2fdf..b7ac278 100644 --- a/example.yml +++ b/example.yml @@ -58,6 +58,22 @@ modules: basic_auth: username: "username" password: "mysecret" + http_2xx_oauth_client_credentials: + prober: http + timeout: 5s + http: + valid_http_versions: ["HTTP/1.1", "HTTP/2"] + follow_redirects: true + preferred_ip_protocol: "ip4" + valid_status_codes: + - 200 + - 201 + oauth2: + client_id: "client_id" + client_secret: "client_secret" + token_url: "https://api.example.com/token" + endpoint_params: + grant_type: "client_credentials" http_custom_ca_example: prober: http http: -- 2.25.1