Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix: compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jun 22, 2023
1 parent 8512bde commit 389500d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.edc.policy.engine.spi.PolicyEngine;
import org.eclipse.edc.policy.model.Policy;
import org.eclipse.edc.registration.spi.registration.DataspaceRegistrationPolicy;
import org.eclipse.edc.spi.agent.ParticipantAgent;
import org.eclipse.edc.spi.monitor.Monitor;
import org.eclipse.edc.spi.response.ResponseStatus;
import org.eclipse.edc.spi.result.Result;
Expand Down Expand Up @@ -74,9 +75,8 @@ void beforeEach() {

@Test
void isOnboardingAllowed_success() {
when(policyEngine.evaluate(eq(PARTICIPANT_REGISTRATION_SCOPE), eq(policy), argThat(a ->
verifiableCredentials.equals(a.getClaims()) &&
Map.of().equals(a.getAttributes()))))
when(policyEngine.evaluate(eq(PARTICIPANT_REGISTRATION_SCOPE), eq(policy), (argThat((ParticipantAgent a) -> verifiableCredentials.equals(a.getClaims()) &&
Map.of().equals(a.getAttributes())))))
.thenReturn(Result.success(policyResult));

var result = verifier.isOnboardingAllowed(participantDid);
Expand Down Expand Up @@ -105,7 +105,7 @@ void isOnboardingAllowed_whenPushToIdentityHubFails_fails() {

@Test
void isOnboardingAllowed_whenNotAllowedByPolicy_returnsFalse() {
when(policyEngine.evaluate(any(), any(), any()))
when(policyEngine.evaluate(any(), any(), any(ParticipantAgent.class)))
.thenReturn(Result.failure(failure));

var result = verifier.isOnboardingAllowed(participantDid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.nimbusds.jose.jwk.ECKey;
import org.eclipse.edc.iam.did.spi.document.DidConstants;
import org.eclipse.edc.iam.did.spi.document.DidDocument;
import org.eclipse.edc.iam.did.spi.document.EllipticCurvePublicKey;
import org.eclipse.edc.iam.did.spi.document.Service;
import org.eclipse.edc.iam.did.spi.document.VerificationMethod;
import org.eclipse.edc.registration.cli.ClientUtils;
Expand Down Expand Up @@ -47,7 +46,7 @@ static String didDocument() throws Exception {
.id("#my-key-1")
.type(DidConstants.ECDSA_SECP_256_K_1_VERIFICATION_KEY_2019)
.controller("")
.publicKeyJwk(new EllipticCurvePublicKey(publicKey.getCurve().getName(), publicKey.getKeyType().getValue(), publicKey.getX().toString(), publicKey.getY().toString()))
.publicKeyJwk(publicKey.toJSONObject())
.build();
var didDocument = DidDocument.Builder.newInstance()
.verificationMethod(List.of(vm))
Expand Down

0 comments on commit 389500d

Please sign in to comment.