Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions authcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (f FederationLeaf) GetAuthorizationURL(
if f.RequestURIGenerator != nil && opMetadata.RequestURIParameterSupported && len(resolved.TrustChain) > 0 {
ownResolved, err := DefaultMetadataResolver.ResolveResponsePayload(
apimodel.ResolveRequest{
Subject: f.EntityID,
Subject: f.EntityID(),
TrustAnchor: []string{resolved.TrustAnchor},
EntityTypes: []string{oidfedconst.EntityTypeOpenIDRelyingParty},
},
Expand Down Expand Up @@ -209,7 +209,7 @@ func (f FederationLeaf) GetAuthorizationURL(
} else {
q.Set("request", string(requestObject))
}
q.Set("client_id", f.EntityID)
q.Set("client_id", f.EntityID())
q.Set("response_type", "code")
q.Set("redirect_uri", redirectURI)
q.Set("scope", scope)
Expand All @@ -233,7 +233,7 @@ func (f FederationLeaf) CodeExchange(
params.Set("grant_type", "authorization_code")
params.Set("code", code)
params.Set("redirect_uri", redirectURI)
params.Set("client_id", f.EntityID)
params.Set("client_id", f.EntityID())

clientAssertion, err := f.oidcROProducer.ClientAssertion(
opMetadata.TokenEndpoint,
Expand Down
3 changes: 1 addition & 2 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cache

import (
"encoding/base64"
"log"
"strings"
"time"

Expand Down Expand Up @@ -31,7 +30,7 @@ type cacheWrapper struct {
func newCacheWrapper(defaultExpiration time.Duration) cacheWrapper {
c := gocache.NewCache().WithDefaultTTL(defaultExpiration)
if err := c.StartJanitor(); err != nil {
log.Fatal(err) // skipcq: RVV-A0003
internal.WithError(err).Error("Cache: failed to start janitor; proceeding without background cleanup")
}
return cacheWrapper{
c,
Expand Down
11 changes: 7 additions & 4 deletions explicit.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,17 @@ func (f FederationLeaf) DoExplicitClientRegistration(op string) (
if opMetadata == nil || opMetadata.FederationRegistrationEndpoint == "" {
return nil, nil, errors.New("op does not have a federation registration endpoint")
}
entityConfigurationData := f.EntityConfigurationPayload()
entityConfigurationData, err := f.EntityConfigurationPayload()
if err != nil {
return nil, nil, errors.Wrap(err, "could not get entity configuration payload")
}
AdjustRPMetadataToOP(entityConfigurationData.Metadata.RelyingParty, opMetadata)
entityConfigurationData.Audience = op
var headers jws.Headers
if len(resolved.TrustChain) > 0 {
ownResolved, err := DefaultMetadataResolver.ResolveResponsePayload(
apimodel.ResolveRequest{
Subject: f.EntityID,
Subject: f.EntityID(),
TrustAnchor: []string{resolved.TrustAnchor},
EntityTypes: []string{oidfedconst.EntityTypeOpenIDRelyingParty},
},
Expand All @@ -147,7 +150,7 @@ func (f FederationLeaf) DoExplicitClientRegistration(op string) (
_ = headers.Set("peer_trust_chain", resolved.TrustChain)
}
}
entityConfiguration, err := f.EntityStatementSigner.JWTWithHeaders(entityConfigurationData, headers)
entityConfiguration, err := f.SignEntityStatementWithHeaders(*entityConfigurationData, headers)
if err != nil {
return nil, nil, err
}
Expand Down Expand Up @@ -180,7 +183,7 @@ func (f FederationLeaf) DoExplicitClientRegistration(op string) (
if err != nil {
return nil, nil, errors.Wrap(err, "could not parse explicit registration response")
}
if res.Audience != f.EntityID {
if res.Audience != f.EntityID() {
return nil, nil,
errors.New("explicit client registration: OP returned unexpected audience")
}
Expand Down
Loading