You've already forked oauth2-proxy
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user