Skip to content

Commit

Permalink
fix(iam.issueClaim): move claimTypeVersion into claimData
Browse files Browse the repository at this point in the history
Based on code review feedback from Dmitry
SWTCH-998

Co-authored-by: Dmitry <44746858+JGiter@users.noreply.github.com>
  • Loading branch information
jrhender and JGiter committed Jun 8, 2021
1 parent 8de9935 commit 3a72523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iam.ts
Expand Up @@ -1483,9 +1483,9 @@ export class IAM extends IAMBase {
if (!this._jwt) {
throw new Error(ERROR_MESSAGES.JWT_NOT_INITIALIZED);
}
const { claimData, claimTypeVersion, sub } = this._jwt.decode(token) as { claimData: { claimType: string }, claimTypeVersion: string; sub: string };
const { claimData, claimTypeVersion, sub } = this._jwt.decode(token) as { claimData: { claimType: string; claimTypeVersion: string }; sub: string };
const issuedToken = await this.issuePublicClaim({
token: await this._jwt.sign({ claimData, claimTypeVersion }, { subject: sub, issuer: this._did })
token: await this._jwt.sign({ claimData }, { subject: sub, issuer: this._did })
});
const message: IClaimIssuance = {
id,
Expand Down

0 comments on commit 3a72523

Please sign in to comment.