forked from eclipse-edc/IdentityHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: IdentityHubCredentialsVerifier Fails if one VC signature verifi…
…cation fails (#24) * IdentityHubCredentialsVerifier fails if credential is invalid (#49) * IdentityHubCredentialsVerifier: Fails if one VC signature verification fails IdentityHubCredentialsVerifier: Fails if one VC signature verification fails * Applied comments. Added Override. * Removed mergeFailureMessages method.
- Loading branch information
Showing
6 changed files
with
170 additions
and
64 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...r/src/main/java/org/eclipse/dataspaceconnector/identityhub/verifier/AggregatedResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2022 Microsoft Corporation | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Microsoft Corporation - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.dataspaceconnector.identityhub.verifier; | ||
|
||
import org.eclipse.dataspaceconnector.spi.result.AbstractResult; | ||
import org.eclipse.dataspaceconnector.spi.result.Failure; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* A generic result type containing the result of processing plus the failures happening during the processing of the | ||
* result. | ||
* For example, when processing a List of objects, the processing can be successful for some objects, and unsuccessful | ||
* for others. | ||
* Using this class as a return type would let the client decide how to act about the failures. | ||
* | ||
* @param <T> Result type | ||
*/ | ||
class AggregatedResult<T> extends AbstractResult<T, Failure> { | ||
AggregatedResult(T successfulResult, List<String> failureMessage) { | ||
super(successfulResult, failureMessage.isEmpty() ? null : new Failure(failureMessage)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.