You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-08-08 22:46:33 +02:00
Refactor makeLoginURL to accept extraParams
And don't require the caller to know how to use the returned params.
This commit is contained in:
@ -212,10 +212,10 @@ func (p *AzureProvider) GetEmailAddress(ctx context.Context, s *sessions.Session
|
||||
}
|
||||
|
||||
func (p *AzureProvider) GetLoginURL(redirectURI, state string) string {
|
||||
a, params := makeLoginURL(p.ProviderData, redirectURI, state)
|
||||
extraParams := url.Values{}
|
||||
if p.ProtectedResource != nil && p.ProtectedResource.String() != "" {
|
||||
params.Add("resource", p.ProtectedResource.String())
|
||||
extraParams.Add("resource", p.ProtectedResource.String())
|
||||
}
|
||||
a.RawQuery = params.Encode()
|
||||
a := makeLoginURL(p.ProviderData, redirectURI, state, extraParams)
|
||||
return a.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user