Support oauth codes
This commit is contained in:
@@ -12,7 +12,7 @@ type Provider interface {
|
||||
// Options returns the options of a provider
|
||||
Options() Options
|
||||
// Endpoint for the provider
|
||||
Endpoint() string
|
||||
Endpoint(...EndpointOption) string
|
||||
// Redirect url incase of UI
|
||||
Redirect() string
|
||||
}
|
||||
@@ -26,3 +26,15 @@ type Grant struct {
|
||||
// Scopes associated with grant
|
||||
Scopes []string
|
||||
}
|
||||
|
||||
type EndpointOptions struct {
|
||||
Code string
|
||||
}
|
||||
|
||||
type EndpointOption func(*EndpointOptions)
|
||||
|
||||
func WithCode(c string) EndpointOption {
|
||||
return func(o *EndpointOptions) {
|
||||
o.Code = c
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user