mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 02:23:31 -06:00
* OAuth: Add strict role mapping By default the user is assigned the role Viewer if role_attribute_path doesn't return a role, which is not always desirable. This commit adds a strict mode, which deny the user access if a role isn't returned. Fix #26626 * Update docs/sources/auth/generic-oauth.md Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * Update docs/sources/auth/generic-oauth.md * Update .gitignore file with WAN * Removed WAN from .gitignore Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
28 lines
652 B
Go
28 lines
652 B
Go
package setting
|
|
|
|
type OAuthInfo struct {
|
|
ClientId, ClientSecret string
|
|
Scopes []string
|
|
AuthUrl, TokenUrl string
|
|
Enabled bool
|
|
EmailAttributeName string
|
|
EmailAttributePath string
|
|
RoleAttributePath string
|
|
RoleAttributeStrict bool
|
|
AllowedDomains []string
|
|
HostedDomain string
|
|
ApiUrl string
|
|
AllowSignup bool
|
|
Name string
|
|
TlsClientCert string
|
|
TlsClientKey string
|
|
TlsClientCa string
|
|
TlsSkipVerify bool
|
|
}
|
|
|
|
type OAuther struct {
|
|
OAuthInfos map[string]*OAuthInfo
|
|
}
|
|
|
|
var OAuthService *OAuther
|