WIP stubbing out tokenexchangehandler

This commit is contained in:
Margo Crawford 2020-12-07 17:28:51 -08:00
parent b7b6816531
commit e5ecaf01a0
2 changed files with 24 additions and 1 deletions

View File

@ -83,7 +83,7 @@ func PinnipedCLIOIDCClient() *fosite.DefaultOpenIDConnectClient {
Public: true, Public: true,
RedirectURIs: []string{"http://127.0.0.1/callback"}, RedirectURIs: []string{"http://127.0.0.1/callback"},
ResponseTypes: []string{"code"}, ResponseTypes: []string{"code"},
GrantTypes: []string{"authorization_code"}, GrantTypes: []string{"authorization_code", "token_exchange"},
Scopes: []string{"openid", "profile", "email"}, Scopes: []string{"openid", "profile", "email"},
}, },
TokenEndpointAuthMethod: "none", TokenEndpointAuthMethod: "none",

View File

@ -0,0 +1,23 @@
package oidc
import (
"context"
"github.com/ory/fosite"
"github.com/ory/fosite/compose"
)
func TokenExchangeFactory(config *compose.Config, storage interface{}, strategy interface{}) interface{} {
return &TokenExchangeHandler{}
}
type TokenExchangeHandler struct {
}
func (t *TokenExchangeHandler) HandleTokenEndpointRequest(ctx context.Context, requester fosite.AccessRequester) error {
return nil
}
func (t *TokenExchangeHandler) PopulateTokenEndpointResponse(ctx context.Context, requester fosite.AccessRequester, responder fosite.AccessResponder) error {
return nil
}