mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
More refactoring and code restructure
This commit is contained in:
parent
45e8cd7f15
commit
f6bf8a8960
4 changed files with 254 additions and 40 deletions
|
|
@ -16,7 +16,7 @@ type IdentityProvider struct {
|
|||
Issuer string `db:"issuer" json:"issuer" yaml:"issuer"`
|
||||
Endpoints Endpoints `db:"endpoints" json:"endpoints" yaml:"endpoints"`
|
||||
Supported Supported `db:"supported" json:"supported" yaml:"supported"`
|
||||
Jwks jwk.Set
|
||||
KeySet jwk.Set
|
||||
}
|
||||
|
||||
type Endpoints struct {
|
||||
|
|
@ -142,7 +142,7 @@ func (p *IdentityProvider) FetchJwks() error {
|
|||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
var err error
|
||||
p.Jwks, err = jwk.Fetch(ctx, p.Endpoints.JwksUri)
|
||||
p.KeySet, err = jwk.Fetch(ctx, p.Endpoints.JwksUri)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to fetch JWKS: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue