* add ability to customize okta login button name and icon
* update configs, add basic frontend test
* add icon to oauth settings type
* trigger tests
* fix typecheck
(cherry picked from commit 51cd6f3cc5)
This commit is contained in:
+4
-1
@@ -93,7 +93,10 @@ func (hs *HTTPServer) LoginView(c *models.ReqContext) {
|
||||
enabledOAuths := make(map[string]interface{})
|
||||
providers := hs.SocialService.GetOAuthInfoProviders()
|
||||
for key, oauth := range providers {
|
||||
enabledOAuths[key] = map[string]string{"name": oauth.Name}
|
||||
enabledOAuths[key] = map[string]string{
|
||||
"name": oauth.Name,
|
||||
"icon": oauth.Icon,
|
||||
}
|
||||
}
|
||||
|
||||
viewData.Settings["oauth"] = enabledOAuths
|
||||
|
||||
@@ -45,6 +45,7 @@ type OAuthInfo struct {
|
||||
TeamsUrl string
|
||||
AllowSignup bool
|
||||
Name string
|
||||
Icon string
|
||||
TlsClientCert string
|
||||
TlsClientKey string
|
||||
TlsClientCa string
|
||||
@@ -81,6 +82,7 @@ func ProvideService(cfg *setting.Cfg) *SocialService {
|
||||
HostedDomain: sec.Key("hosted_domain").String(),
|
||||
AllowSignup: sec.Key("allow_sign_up").MustBool(),
|
||||
Name: sec.Key("name").MustString(name),
|
||||
Icon: sec.Key("icon").String(),
|
||||
TlsClientCert: sec.Key("tls_client_cert").String(),
|
||||
TlsClientKey: sec.Key("tls_client_key").String(),
|
||||
TlsClientCa: sec.Key("tls_client_ca").String(),
|
||||
|
||||
Reference in New Issue
Block a user