Add oauth login hint param

This commit is contained in:
Ben Toogood
2020-04-21 13:37:26 +01:00
parent 075d7d4fef
commit 19f0836e70
2 changed files with 13 additions and 0 deletions

View File

@@ -28,7 +28,10 @@ type Grant struct {
}
type EndpointOptions struct {
// State is a code to verify the req
State string
// LoginHint prefils the user id on oauth clients
LoginHint string
}
type EndpointOption func(*EndpointOptions)
@@ -38,3 +41,9 @@ func WithState(c string) EndpointOption {
o.State = c
}
}
func WithLoginHint(hint string) EndpointOption {
return func(o *EndpointOptions) {
o.LoginHint = hint
}
}