From b50640ff3c23cc485275cfdd507453463c72839b Mon Sep 17 00:00:00 2001 From: Simon Schneider Date: Thu, 23 Aug 2018 11:19:44 +0200 Subject: [PATCH] add Generic OAuth --- grafana/files/grafana.ini | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/grafana/files/grafana.ini b/grafana/files/grafana.ini index db3b64d..cd57e47 100644 --- a/grafana/files/grafana.ini +++ b/grafana/files/grafana.ini @@ -191,6 +191,21 @@ org_name = {{ server.auth.get('role', server.auth.anonymous.role) }} ;api_url = https://www.googleapis.com/oauth2/v1/userinfo ;allowed_domains = +#################################### Generic OAuth ########################## +[auth.generic_oauth] +{%- if server.auth.engine == 'oauth' or server.auth.get('oauth', {}).get('enabled', False) %} +enabled = true +client_id = {{ server.auth.get('oauth', {}).get('client_id', 'YOUR_APP_CLIENT_ID') }} +client_secret = {{ server.auth.get('oauth', {}).get('client_secret', 'YOUR_APP_CLIENT_SECRET') }} +scopes = {{ server.auth.get('oauth', {}).get('scopes', '') }} +auth_url = {{ server.auth.get('oauth', {}).get('auth_url', '') }} +token_url = {{ server.auth.get('oauth', {}).get('token_url', '') }} +api_url = {{ server.auth.get('oauth', {}).get('api_url', '') }} +allowed_domains = {{ server.auth.get('oauth', {}).get('allowed_domains', '') }} +allow_sign_up = {{ server.auth.get('oauth', {}).get('allow_sign_up', 'true') }} +{%- endif %} + + #################################### Auth Proxy ########################## [auth.proxy] {%- if server.auth.engine == 'proxy' or server.auth.get('proxy', {}).get('enabled', False) %}