fix: parse max_age and prompt correctly (and change scope type) (#105)
* fix: parse max_age and prompt correctly (and change scope type) * remove unnecessary omitempty
This commit is contained in:
parent
0591a0d1ef
commit
400f5c4de4
16 changed files with 98 additions and 85 deletions
|
@ -17,8 +17,8 @@ import (
|
|||
var (
|
||||
Encoder = func() utils.Encoder {
|
||||
e := schema.NewEncoder()
|
||||
e.RegisterEncoder(oidc.Scopes{}, func(value reflect.Value) string {
|
||||
return value.Interface().(oidc.Scopes).Encode()
|
||||
e.RegisterEncoder(oidc.SpaceDelimitedArray{}, func(value reflect.Value) string {
|
||||
return value.Interface().(oidc.SpaceDelimitedArray).Encode()
|
||||
})
|
||||
return e
|
||||
}()
|
||||
|
|
|
@ -430,10 +430,10 @@ func WithCodeChallenge(codeChallenge string) AuthURLOpt {
|
|||
}
|
||||
|
||||
//WithPrompt sets the `prompt` params in the auth request
|
||||
func WithPrompt(prompt oidc.Prompt) AuthURLOpt {
|
||||
func WithPrompt(prompt ...string) AuthURLOpt {
|
||||
return func() []oauth2.AuthCodeOption {
|
||||
return []oauth2.AuthCodeOption{
|
||||
oauth2.SetAuthURLParam("prompt", string(prompt)),
|
||||
oauth2.SetAuthURLParam("prompt", oidc.SpaceDelimitedArray(prompt).Encode()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue