From 950f2e207413551b868252a1bced6ce9263d16d4 Mon Sep 17 00:00:00 2001 From: Willem van Dreumel Date: Mon, 1 May 2017 15:26:53 +0200 Subject: Additional OAuth2 providers (#1010) * add google+ * sort signin oauth2 providers based on the name so order is always the same * update auth tip for google+ * add gitlab provider * add bitbucket provider (and some go fmt) * add twitter provider * add facebook provider * add dropbox provider * add openid connect provider incl. new format of tips section in "Add New Source" * lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow) * imports according to goimport and code style * make it possible to set custom urls to gitlab and github provider (only these could have a different host) * split up oauth2 into multiple files * small typo in comment * fix indention * fix indentation * fix new line before external import * fix layout of signin part * update "broken" dependency --- templates/admin/auth/edit.tmpl | 33 ++++++++++++++++++++++++++++++ templates/admin/auth/new.tmpl | 25 +++++++++++++++++++++-- templates/admin/auth/source/oauth.tmpl | 37 +++++++++++++++++++++++++++++++++- 3 files changed, 92 insertions(+), 3 deletions(-) (limited to 'templates/admin/auth') diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index ea5104b79f..3c74b2ad17 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -164,6 +164,39 @@ +
+ + +
+ +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ {{if .OAuth2DefaultCustomURLMappings}}{{range $key, $value := .OAuth2DefaultCustomURLMappings}} + + + + + {{end}}{{end}} {{end}}
diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index a18a782fc1..00239b0462 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -80,8 +80,29 @@
GMail Settings:

Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true

-
OAuth GitHub:
-

{{.i18n.Tr "admin.auths.tip.github"}}

+ +
{{.i18n.Tr "admin.auths.tips.oauth2.general"}}:
+

{{.i18n.Tr "admin.auths.tips.oauth2.general.tip"}}

+ +
{{.i18n.Tr "admin.auths.tip.oauth2_provider"}}
+
+
  • Bitbucket
  • + {{.i18n.Tr "admin.auths.tip.bitbucket"}} +
  • Dropbox
  • + {{.i18n.Tr "admin.auths.tip.dropbox"}} +
  • Facebook
  • + {{.i18n.Tr "admin.auths.tip.facebook"}} +
  • GitHub
  • + {{.i18n.Tr "admin.auths.tip.github"}} +
  • GitLab
  • + {{.i18n.Tr "admin.auths.tip.gitlab"}} +
  • Google+
  • + {{.i18n.Tr "admin.auths.tip.google_plus"}} +
  • OpenID Connect
  • + {{.i18n.Tr "admin.auths.tip.openid_connect"}} +
  • Twitter
  • + {{.i18n.Tr "admin.auths.tip.twitter"}} +
    diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 4d8e12e028..5d585c04dc 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -20,4 +20,39 @@ - +
    + + +
    + +
    +
    + + +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + {{if .OAuth2DefaultCustomURLMappings}} + {{range $key, $value := .OAuth2DefaultCustomURLMappings}} + + + + + {{end}} + {{end}} + \ No newline at end of file -- cgit v1.2.3