Skip to content

Commit

Permalink
Merge pull request trustbloc#1657 from fqutishat/new1232
Browse files Browse the repository at this point in the history
chore: call policy all the time in issuer flow
  • Loading branch information
fqutishat authored Mar 14, 2024
2 parents 5cca6d7 + 3fbbebd commit 5e58a22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Binary file added component/wallet-cli/wallet-cli
Binary file not shown.
12 changes: 5 additions & 7 deletions pkg/service/oidc4ci/oidc4ci_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,11 @@ func (s *Service) checkPolicy(
clientAssertionType,
clientAssertion string,
) error {
if profile.OIDCConfig == nil ||
!lo.Contains(profile.OIDCConfig.TokenEndpointAuthMethodsSupported, attestJWTClientAuthType) {
return nil
}

if err := s.validateClientAssertionParams(clientAssertionType, clientAssertion); err != nil {
return err
if profile.OIDCConfig != nil &&
lo.Contains(profile.OIDCConfig.TokenEndpointAuthMethodsSupported, attestJWTClientAuthType) {
if err := s.validateClientAssertionParams(clientAssertionType, clientAssertion); err != nil {
return err
}
}

if profile.Checks.Policy.PolicyURL != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/oidc4vp/oidc4vp_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ func TestService_VerifyOIDCVerifiablePresentation(t *testing.T) {
ProfileService: profileService,
DocumentLoader: loader,
VDR: vdr,
TrustRegistryService: trustRegistry,
TrustRegistry: trustRegistry,
})

err = s2.VerifyOIDCVerifiablePresentation(context.Background(), "txID1",
Expand Down

0 comments on commit 5e58a22

Please sign in to comment.