Worked a little on anonymous access, needs more work

This commit is contained in:
Torkel Ödegaard
2015-01-07 16:37:24 +01:00
parent 9d629f2780
commit 35326e1d92
6 changed files with 52 additions and 40 deletions

View File

@@ -4,23 +4,4 @@ app_mode = development
router_logging = false
static_root_path = grafana/src
[oauth]
enabled = true
[oauth.github]
enabled = true
client_id = de054205006b9baa2e17
client_secret = 72b7ea52d9f1096fdf36cea95e95362a307e0322
scopes = user:email
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
[oauth.google]
enabled = true
client_id = 106011922963-4pvl05e9urtrm8bbqr0vouosj3e8p8kb.apps.googleusercontent.com
client_secret = K2evIa4QhfbhhAm3SO72t2Zv
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token

View File

@@ -34,21 +34,25 @@ session_id_hashfunc = sha1
; Session hash key, default is use random string
session_id_hashkey =
[oauth]
[auth]
anonymous = false
anonymous_account_id =
[auth.grafana]
enabled = true
[oauth.github]
enabled = true
client_id = de054205006b9baa2e17
client_secret = 72b7ea52d9f1096fdf36cea95e95362a307e0322
[auth.github]
enabled = false
client_id = some_id
client_secret = some_secret
scopes = user:email
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
[oauth.google]
enabled = true
client_id = 106011922963-4pvl05e9urtrm8bbqr0vouosj3e8p8kb.apps.googleusercontent.com
client_secret = K2evIa4QhfbhhAm3SO72t2Zv
[auth.google]
enabled = false
client_id = some_client_id
client_secret = some_client_secret
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token