feat: custom endpoint for device authorization (#368)
This commit is contained in:
parent
44f8403574
commit
8730a1685e
1 changed files with 10 additions and 0 deletions
10
pkg/op/op.go
10
pkg/op/op.go
|
@ -476,6 +476,16 @@ func WithCustomKeysEndpoint(endpoint Endpoint) Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func WithCustomDeviceAuthorizationEndpoint(endpoint Endpoint) Option {
|
||||||
|
return func(o *Provider) error {
|
||||||
|
if err := endpoint.Validate(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
o.endpoints.DeviceAuthorization = endpoint
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func WithCustomEndpoints(auth, token, userInfo, revocation, endSession, keys Endpoint) Option {
|
func WithCustomEndpoints(auth, token, userInfo, revocation, endSession, keys Endpoint) Option {
|
||||||
return func(o *Provider) error {
|
return func(o *Provider) error {
|
||||||
o.endpoints.Authorization = auth
|
o.endpoints.Authorization = auth
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue