rp Discover use client.Discover
This commit is contained in:
parent
55e2b05fd8
commit
79ead65710
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue