Add -prompt flag

Space separated list of OpenID prompt options (https://developers.google.com/identity/protocols/OpenIDConnect#prompt)
This commit is contained in:
Thomas Vaillant
2018-11-05 16:43:30 +01:00
parent b54871391f
commit c897bc8387
4 changed files with 11 additions and 1 deletions

View File

@ -40,6 +40,8 @@ type ForwardAuth struct {
Domain []string
Direct bool
Prompt string
}
// Request Validation
@ -114,7 +116,9 @@ func (f *ForwardAuth) GetLoginURL(r *http.Request, nonce string) string {
q.Set("client_id", fw.ClientId)
q.Set("response_type", "code")
q.Set("scope", fw.Scope)
// q.Set("approval_prompt", fw.ClientId)
if fw.Prompt != "" {
q.Set("prompt", fw.Prompt)
}
q.Set("redirect_uri", f.redirectUri(r))
q.Set("state", state)