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

Commit

Permalink
Merge pull request #724 from boschresearch/fix/oob-credential-payload
Browse files Browse the repository at this point in the history
small backend fix for PR: 723
  • Loading branch information
etschelp authored Mar 11, 2022
2 parents c8a0d2d + 42537d5 commit ef68239
Show file tree
Hide file tree
Showing 23 changed files with 88 additions and 82 deletions.
4 changes: 2 additions & 2 deletions backend/business-partner-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
<version>5.6.1</version>
<version>5.6.2</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
Expand All @@ -170,7 +170,7 @@
<dependency>
<groupId>io.micronaut.email</groupId>
<artifactId>micronaut-email-mailjet</artifactId>
<version>1.0.1</version>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static void copyFrom(@NonNull PartnerAPI to, @NonNull Partner from) {
* 2. Legal Name from public profile if set 3. aca-py label, --label flag or
* overwritten when creating the connection with the label option 4. did, public
* or peer
*
*
* @return the partners name or null if no match was found
*/
public String getName() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 - for information on the respective copyright owner
* Copyright (c) 2020-2022 - for information on the respective copyright owner
* see the NOTICE file and/or the repository at
* https://github.com/hyperledger-labs/business-partner-agent
*
Expand Down Expand Up @@ -76,7 +76,7 @@ public class LedgerExplorerClient {
/**
* Query the ledger explorer for a list of credential definitions that are based
* on a did or a TRX id.
*
*
* @param query query can be either a did or a transaction id.
* @return optional list of {@link PartnerCredentialType}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public HttpResponse<RuntimeConfig> getRuntimeConfig() {
* Trigger the backend to write configured endpoints to the ledger. TAA digest
* has to be passed to explicitly confirm prior TTA acceptance by the user for
* this ledger interaction / session.
*
*
* @param tAADigest {@link TAADigestRequest}
* @return {@link HttpResponse}
*/
Expand All @@ -299,7 +299,7 @@ public HttpResponse<Boolean> isEndpointsWriteRequired() {

/**
* Get TAA record (digest, text, version)
*
*
* @return {@link TAARecord}
*/
@Get("/taa/get")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class InvitationController {

/**
* Check invitation (receive)
*
*
* @param body {@link CheckInvitationRequest}
* @return {@link MutableHttpResponse}
*/
Expand All @@ -60,7 +60,7 @@ public MutableHttpResponse<Object> checkInvitation(@Body CheckInvitationRequest

/**
* Receive / accept invitation
*
*
* @param body {@link AcceptInvitationRequest}
* @return {@link MutableHttpResponse}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public HttpResponse<String> issueCredential(@Valid @Body IssueCredentialRequest
/**
* Issue OOB credential step 1 - prepares credential offer and returns URL for
* use within the barcode
*
*
* @param req {@link IssueOOBCredentialRequest}
* @return {@link APICreateInvitationResponse}
*/
Expand All @@ -140,7 +140,7 @@ public HttpResponse<APICreateInvitationResponse> issueCredentialConnectionLess(

/**
* Issue OOB credential step 2 - redirect with encoded offer
*
*
* @param id {@link UUID}
* @return Redirect with encoded credential offer in the location header
*/
Expand Down Expand Up @@ -188,7 +188,7 @@ public HttpResponse<CredEx> revokeCredential(@PathVariable UUID id) {
/**
* Send holder a new credential offer based on an existing (revoked) exchange
* record
*
*
* @param id credential exchange id
* @return {@link HttpResponse}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class MessagingController {

/**
* List message templates
*
*
* @return list of {@link MessageTemplateCmd.ApiMessageTemplate}
*/
@Get("/template")
Expand All @@ -62,7 +62,7 @@ public HttpResponse<List<MessageTemplateCmd.ApiMessageTemplate>> listMessageTemp

/**
* Add new message template
*
*
* @param template {@link MessageTemplateCmd.MessageTemplateRequest}
* @return {@link MessageTemplateCmd.ApiMessageTemplate}
*/
Expand All @@ -74,7 +74,7 @@ public HttpResponse<MessageTemplateCmd.ApiMessageTemplate> addMessageTemplate(

/**
* Update message template
*
*
* @param id {@link UUID} template id
* @param template {@link MessageTemplateCmd.MessageTemplateRequest}
* @return HTTP status
Expand All @@ -88,7 +88,7 @@ public HttpResponse<Void> updateMessageTemplate(@PathVariable UUID id,

/**
* Delete message template
*
*
* @param id {@link UUID} template id
* @return HTTP status
*/
Expand All @@ -102,7 +102,7 @@ public HttpResponse<Void> deleteMessageTemplate(@PathVariable UUID id) {

/**
* List user info
*
*
* @return list of {@link MessageUserInfoCmd.ApiUserInfo}
*/
@Get("/user-info")
Expand All @@ -112,7 +112,7 @@ public HttpResponse<List<MessageUserInfoCmd.ApiUserInfo>> listUserInfo() {

/**
* Add new user info configuration
*
*
* @param config {@link MessageUserInfoCmd.UserInfoRequest}
* @return {@link MessageUserInfoCmd.ApiUserInfo}
*/
Expand All @@ -124,7 +124,7 @@ public HttpResponse<MessageUserInfoCmd.ApiUserInfo> addUserInfo(

/**
* Update user info configuration
*
*
* @param id {@link UUID} user info id
* @param config {@link MessageUserInfoCmd.UserInfoRequest}
* @return HTTP status
Expand All @@ -138,7 +138,7 @@ public HttpResponse<Void> updateUserInfo(@PathVariable UUID id,

/**
* Delete user info configuration
*
*
* @param id {@link UUID} user info id
* @return HTTP status
*/
Expand All @@ -152,7 +152,7 @@ public HttpResponse<Void> deleteUserInfo(@PathVariable UUID id) {

/**
* List message trigger configuration
*
*
* @return list of {@link MessageTriggerConfigCmd.ApiTriggerConfig}
*/
@Get("/trigger")
Expand All @@ -162,7 +162,7 @@ public HttpResponse<List<MessageTriggerConfigCmd.ApiTriggerConfig>> listMessageT

/**
* ASdd new message trigger configuration
*
*
* @param trigger {@link MessageTriggerConfigCmd.ApiTriggerConfig}
* @return {@link MessageTriggerConfigCmd.TriggerConfigRequest}
*/
Expand All @@ -175,7 +175,7 @@ public HttpResponse<MessageTriggerConfigCmd.ApiTriggerConfig> addMessageTrigger(

/**
* Update message trigger configuration
*
*
* @param id {@link UUID} message trigger id
* @param trigger {@link MessageTriggerConfigCmd.TriggerConfigRequest}
* @return HTTP status
Expand All @@ -190,7 +190,7 @@ public HttpResponse<Void> updateMessageTrigger(@PathVariable UUID id,

/**
* Delete message trigger configuration
*
*
* @param id {@link UUID} message trigger id
* @return HTTP status
*/
Expand All @@ -204,7 +204,7 @@ public HttpResponse<Void> deleteMessageTrigger(@PathVariable UUID id) {

/**
* Manual trigger to send an invitation url by email
*
*
* @param request {@link AdHocMessageRequest}
* @return HTTP status
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class ProofTemplateController {

/**
* List configured templates
*
*
* @return list of {@link ProofTemplate}
*/
@Get
Expand All @@ -63,7 +63,7 @@ public HttpResponse<List<ProofTemplate>> listProofTemplates() {

/**
* Get template by id
*
*
* @param id proof template id
* @return {@link ProofTemplate}
*/
Expand All @@ -79,7 +79,7 @@ public HttpResponse<ProofTemplate> getProofTemplateForId(@PathVariable UUID id)

/**
* Add a new proof template
*
*
* @param template {@link ProofTemplate}
* @return {@link ProofTemplate}
*/
Expand Down Expand Up @@ -109,7 +109,7 @@ public HttpResponse<Set<String>> listKnownConditionOperators() {

/**
* Delete proof template by id
*
*
* @param id proof template id
* @return Http Status
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class DidResolver {
/**
* Tries to resolve the partners public profile based on the did contained
* within a commercial register credential.
*
*
* @param pp {@link PartnerProof}
*/
@Async
Expand Down Expand Up @@ -115,7 +115,7 @@ public void resolveDid(PartnerProof pp, @NonNull List<PresentationExchangeRecord
* did can be resolved to a profile, if this is not possible try to do this
* based on a did that is embedded in the partners label. The label is supposed
* to adhere to the following format: did:sov:xxx:123:MyLabel
*
*
* @param p {@link Partner}
*/
@Async
Expand Down Expand Up @@ -158,7 +158,7 @@ private Optional<PartnerAPI> lookupPartnerSave(String did) {
/**
* Extracts the did and label components from a label is supposed to adhere to
* the following format: did:sov:123:MyLabel.
*
*
* @param label the label
* @return {@link ConnectionLabel}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class PartnerCredDefLookup {
/**
* Get/filter partners that can issue credentials that are based on the schema's
* id.
*
*
* @param schemaId the schema id
* @return {@link PartnerAPI} list
*/
Expand All @@ -82,7 +82,7 @@ public List<PartnerAPI> getIssuersFor(@NonNull String schemaId) {
/**
* If a ledger explorer is configured. Find partners that can issue credentials
* that are based on the schema id.
*
*
* @param schemaId the schema id
* @param result {@link List} that should contain the result
*/
Expand All @@ -104,7 +104,7 @@ void filterBySupportedCredential(String schemaId, List<PartnerAPI> result) {
* If NO ledger explorer is configured, statically match configured issuer did's
* to partner did's to find partners that can issue a credential based on the
* schema id.
*
*
* @param schemaId the schema id
* @param result {@link List} that should contain the result
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private String parseInvitationBlockFromRedirect(@NonNull HttpUrl url) {
* we are only interested in the query so the result is wrapped for easier
* parsing. In case of an url we simply convert to maintain the original
* location.
*
*
* @param invitationUri uri as String
* @param decode if the invitationUri needs url decoding
* @return {@link HttpUrl} or null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public abstract class CredentialManagerBase {
* If there is a problem during the credential exchange and aca-py is started
* without the option to preserve exchange records, the record is deleted
* immediately. Hence, we need to check if the record exists in both systems.
*
*
* @param id credential exchange id
* @return {@link BPACredentialExchange}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class HolderManager extends CredentialManagerBase {

/**
* Request credential from issuer (partner)
*
*
* @param partnerId {@link UUID}
* @param myDocId {@link UUID}
* @param version {@link ExchangeVersion}
Expand Down Expand Up @@ -150,7 +150,7 @@ public void sendCredentialProposal(@NonNull UUID partnerId, @NonNull UUID myDocI

/**
* Holder accepts credential offer received from issuer
*
*
* @param id {@link UUID} bpa credential exchange id
*/
public void sendCredentialRequest(@NonNull UUID id) {
Expand All @@ -173,7 +173,7 @@ public void sendCredentialRequest(@NonNull UUID id) {

/**
* Holder declines credential offer received from issuer
*
*
* @param id {@link UUID} bpa credential exchange id
* @param message optional reason
*/
Expand All @@ -189,7 +189,7 @@ public void declineCredentialOffer(@NonNull UUID id, @Nullable String message) {

/**
* Sets the credential's visibility in the public profile
*
*
* @param id {@link UUID} bpa credential exchange id
*/
public void toggleVisibility(UUID id) {
Expand Down Expand Up @@ -221,7 +221,7 @@ public List<AriesCredential> listHeldCredentials(@Nullable List<CredentialType>

/**
* Find wallet credential by id
*
*
* @param id {@link UUID} bpa credential exchange id
* @return {@link AriesCredential}
*/
Expand Down
Loading

0 comments on commit ef68239

Please sign in to comment.