From: javivaz Date: Wed, 22 Mar 2023 12:11:18 +0000 (+0100) Subject: Add oauth2 client-credentials example (#1044) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=32b5f404e134c280c4fc00ffa952977f66431f73;p=blackbox_exporter.git 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> --- 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: