From 79ead65710b8b61c77c1cb8ddf644fcf9e593067 Mon Sep 17 00:00:00 2001 From: wener Date: Fri, 8 Oct 2021 00:16:24 +0800 Subject: [PATCH] rp Discover use client.Discover --- pkg/client/rp/relaying_party.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/client/rp/relaying_party.go b/pkg/client/rp/relaying_party.go index 669a910..b9b568d 100644 --- a/pkg/client/rp/relaying_party.go +++ b/pkg/client/rp/relaying_party.go @@ -170,17 +170,18 @@ func NewRelyingPartyOIDC(issuer, clientID, clientSecret, redirectURI string, sco return nil, err } } - endpoints, err := Discover(rp.issuer, rp.httpClient) + discoveryConfiguration, err := client.Discover(rp.issuer, rp.httpClient) if err != nil { return nil, err } + endpoints := GetEndpoints(discoveryConfiguration) rp.oauthConfig.Endpoint = endpoints.Endpoint rp.endpoints = endpoints return rp, nil } -//DefaultRPOpts is the type for providing dynamic options to the DefaultRP +//Option is the type for providing dynamic options to the DefaultRP type Option func(*relyingParty) error //WithCookieHandler set a `CookieHandler` for securing the various redirects