Skip to content

Commit

Permalink
fix(claims): enrich claim request with type and version
Browse files Browse the repository at this point in the history
claimType and claimTypeVersion added to claim request
  • Loading branch information
Passerino committed Dec 9, 2021
1 parent 3a2fb68 commit a633530
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/api/interfaces/modules_claims_claims_types.IClaimRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
### Properties

- [claimIssuer](modules_claims_claims_types.IClaimRequest.md#claimissuer)
- [claimType](modules_claims_claims_types.IClaimRequest.md#claimtype)
- [claimTypeVersion](modules_claims_claims_types.IClaimRequest.md#claimtypeversion)
- [id](modules_claims_claims_types.IClaimRequest.md#id)
- [registrationTypes](modules_claims_claims_types.IClaimRequest.md#registrationtypes)
- [requester](modules_claims_claims_types.IClaimRequest.md#requester)
Expand All @@ -31,6 +33,18 @@

___

### claimType

**claimType**: `string`

___

### claimTypeVersion

**claimTypeVersion**: `string`

___

### id

**id**: `string`
Expand Down
2 changes: 2 additions & 0 deletions src/modules/claims/claims.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export class ClaimsService {
claimIssuer: issuer,
requester: this._signerService.did,
registrationTypes,
claimType: role,
claimTypeVersion: version.toString(),
};

if (registrationTypes.includes(RegistrationTypes.OnChain)) {
Expand Down
2 changes: 2 additions & 0 deletions src/modules/claims/claims.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { IMessage } from "../messaging/messaging.types";

export interface IClaimRequest extends IMessage {
token: string;
claimType: string;
claimTypeVersion: string;
registrationTypes: RegistrationTypes[];
subjectAgreement?: string;
}
Expand Down

0 comments on commit a633530

Please sign in to comment.