1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-12-13 23:35:50 +02:00

Move provider URLs to package level vars

This commit is contained in:
Joel Speed
2020-05-25 13:08:04 +01:00
parent 9643a0b10c
commit d4dd34a65a
23 changed files with 553 additions and 327 deletions

View File

@@ -25,12 +25,17 @@ type GitLabProvider struct {
var _ Provider = (*GitLabProvider)(nil)
const (
gitlabProviderName = "GitLab"
gitlabDefaultScope = "openid email"
)
// NewGitLabProvider initiates a new GitLabProvider
func NewGitLabProvider(p *ProviderData) *GitLabProvider {
p.ProviderName = "GitLab"
p.ProviderName = gitlabProviderName
if p.Scope == "" {
p.Scope = "openid email"
p.Scope = gitlabDefaultScope
}
return &GitLabProvider{ProviderData: p}