Skip to content

Commit

Permalink
feat: custom endpoint for device authorization (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhlemmer committed Apr 13, 2023
1 parent 44f8403 commit 8730a16
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/op/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
return func(o *Provider) error {
o.endpoints.Authorization = auth
Expand Down

0 comments on commit 8730a16

Please sign in to comment.