Skip to content

Commit

Permalink
feat: prompt option (#59)
Browse files Browse the repository at this point in the history
* feat: prompt option

* Update pkg/rp/relaying_party.go

Co-authored-by: Livio Amstutz <livio.a@gmail.com>

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
  • Loading branch information
hifabienne and livio-a committed Sep 21, 2020
1 parent 60560ce commit 6cfd02e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/rp/relaying_party.go
Expand Up @@ -401,6 +401,15 @@ func WithCodeChallenge(codeChallenge string) AuthURLOpt {
}
}

//WithPrompt sets the `prompt` params in the auth request
func WithPrompt(prompt oidc.Prompt) AuthURLOpt {
return func() []oauth2.AuthCodeOption {
return []oauth2.AuthCodeOption{
oauth2.SetAuthURLParam("prompt", string(prompt)),
}
}
}

type CodeExchangeOpt func() []oauth2.AuthCodeOption

//WithCodeVerifier sets the `code_verifier` param in the token request
Expand Down

0 comments on commit 6cfd02e

Please sign in to comment.