Skip to content

Commit

Permalink
fix(iam): parse claimData from requested token
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhender committed Jun 8, 2021
1 parent b891505 commit 8de9935
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 { claimType, claimTypeVersion, sub } = this._jwt.decode(token) as { 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({ claimType, claimTypeVersion }, { subject: sub, issuer: this._did })
token: await this._jwt.sign({ claimData, claimTypeVersion }, { subject: sub, issuer: this._did })
});
const message: IClaimIssuance = {
id,
Expand Down

0 comments on commit 8de9935

Please sign in to comment.