summaryrefslogtreecommitdiffstats
path: root/models/oauth2.go
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2021-03-15 02:52:12 +0800
committerGitHub <noreply@github.com>2021-03-14 19:52:12 +0100
commit167b0f46ef946fad3ca13976c3b87598f505e2ea (patch)
tree8b6a4a47a2a0149899b3eb49b296677c2dba4d36 /models/oauth2.go
parent164e35ead3c1b9b82d4a23644f6fe96652a747eb (diff)
downloadgitea-167b0f46ef946fad3ca13976c3b87598f505e2ea.tar.gz
gitea-167b0f46ef946fad3ca13976c3b87598f505e2ea.zip
chore(models): rewrite code format. (#14754)
* chore: rewrite format. * chore: update format Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * chore: update format Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * chore: Adjacent parameters with the same type should be grouped together * chore: update format.
Diffstat (limited to 'models/oauth2.go')
-rw-r--r--models/oauth2.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/models/oauth2.go b/models/oauth2.go
index 201610938a..83e2e8c43f 100644
--- a/models/oauth2.go
+++ b/models/oauth2.go
@@ -26,7 +26,8 @@ var OAuth2Providers = map[string]OAuth2Provider{
"bitbucket": {Name: "bitbucket", DisplayName: "Bitbucket", Image: "/img/auth/bitbucket.png"},
"dropbox": {Name: "dropbox", DisplayName: "Dropbox", Image: "/img/auth/dropbox.png"},
"facebook": {Name: "facebook", DisplayName: "Facebook", Image: "/img/auth/facebook.png"},
- "github": {Name: "github", DisplayName: "GitHub", Image: "/img/auth/github.png",
+ "github": {
+ Name: "github", DisplayName: "GitHub", Image: "/img/auth/github.png",
CustomURLMapping: &oauth2.CustomURLMapping{
TokenURL: oauth2.GetDefaultTokenURL("github"),
AuthURL: oauth2.GetDefaultAuthURL("github"),
@@ -34,7 +35,8 @@ var OAuth2Providers = map[string]OAuth2Provider{
EmailURL: oauth2.GetDefaultEmailURL("github"),
},
},
- "gitlab": {Name: "gitlab", DisplayName: "GitLab", Image: "/img/auth/gitlab.png",
+ "gitlab": {
+ Name: "gitlab", DisplayName: "GitLab", Image: "/img/auth/gitlab.png",
CustomURLMapping: &oauth2.CustomURLMapping{
TokenURL: oauth2.GetDefaultTokenURL("gitlab"),
AuthURL: oauth2.GetDefaultAuthURL("gitlab"),
@@ -45,14 +47,16 @@ var OAuth2Providers = map[string]OAuth2Provider{
"openidConnect": {Name: "openidConnect", DisplayName: "OpenID Connect", Image: "/img/auth/openid_connect.svg"},
"twitter": {Name: "twitter", DisplayName: "Twitter", Image: "/img/auth/twitter.png"},
"discord": {Name: "discord", DisplayName: "Discord", Image: "/img/auth/discord.png"},
- "gitea": {Name: "gitea", DisplayName: "Gitea", Image: "/img/auth/gitea.png",
+ "gitea": {
+ Name: "gitea", DisplayName: "Gitea", Image: "/img/auth/gitea.png",
CustomURLMapping: &oauth2.CustomURLMapping{
TokenURL: oauth2.GetDefaultTokenURL("gitea"),
AuthURL: oauth2.GetDefaultAuthURL("gitea"),
ProfileURL: oauth2.GetDefaultProfileURL("gitea"),
},
},
- "nextcloud": {Name: "nextcloud", DisplayName: "Nextcloud", Image: "/img/auth/nextcloud.png",
+ "nextcloud": {
+ Name: "nextcloud", DisplayName: "Nextcloud", Image: "/img/auth/nextcloud.png",
CustomURLMapping: &oauth2.CustomURLMapping{
TokenURL: oauth2.GetDefaultTokenURL("nextcloud"),
AuthURL: oauth2.GetDefaultAuthURL("nextcloud"),
@@ -60,7 +64,8 @@ var OAuth2Providers = map[string]OAuth2Provider{
},
},
"yandex": {Name: "yandex", DisplayName: "Yandex", Image: "/img/auth/yandex.png"},
- "mastodon": {Name: "mastodon", DisplayName: "Mastodon", Image: "/img/auth/mastodon.png",
+ "mastodon": {
+ Name: "mastodon", DisplayName: "Mastodon", Image: "/img/auth/mastodon.png",
CustomURLMapping: &oauth2.CustomURLMapping{
AuthURL: oauth2.GetDefaultAuthURL("mastodon"),
},