feat: add token exchange to client

This commit is contained in:
Emil Bektimirov 2022-12-20 01:49:55 +01:00
parent 69e8cb434d
commit cf8128a60b
4 changed files with 270 additions and 38 deletions

View file

@ -13,6 +13,7 @@ import (
type ResourceServer interface {
IntrospectionURL() string
TokenEndpoint() string
HttpClient() *http.Client
AuthFn() (interface{}, error)
}
@ -29,6 +30,10 @@ func (r *resourceServer) IntrospectionURL() string {
return r.introspectURL
}
func (r *resourceServer) TokenEndpoint() string {
return r.tokenURL
}
func (r *resourceServer) HttpClient() *http.Client {
return r.httpClient
}