Skip to content

Commit

Permalink
refactor!: rename verifyPublicToken param name
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename the prop name from `issuedToken` to `claimUrl` in method `verifyPublicClaim` in `IAM` class.
  • Loading branch information
Jakub Sydor committed Sep 10, 2021
1 parent a9308fe commit 1d65b89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion docs/api/classes/GnosisIam.GnosisIam-1.md
Expand Up @@ -1680,12 +1680,14 @@ verifyPublicClaim

**`description`** verifies issued token of claim

**`throws`** if the proof failed

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `Object` |
| `__namedParameters.issuedToken` | `string` |
| `__namedParameters.claimUrl` | `string` |

#### Returns

Expand Down
4 changes: 3 additions & 1 deletion docs/api/classes/iam.IAM.md
Expand Up @@ -1441,12 +1441,14 @@ verifyPublicClaim

**`description`** verifies issued token of claim

**`throws`** if the proof failed

#### Parameters

| Name | Type |
| :------ | :------ |
| `__namedParameters` | `Object` |
| `__namedParameters.issuedToken` | `string` |
| `__namedParameters.claimUrl` | `string` |

#### Returns

Expand Down
9 changes: 5 additions & 4 deletions src/iam.ts
Expand Up @@ -494,12 +494,13 @@ export class IAM extends IAMBase {
* verifyPublicClaim
*
* @description verifies issued token of claim
* @returns public claim data
* @returns { Promise<IPublicClaim> } public claim data
* @throws if the proof failed
*
*/
async verifyPublicClaim({ issuedToken }: { issuedToken: string }) {
async verifyPublicClaim({ claimUrl }: { claimUrl: string }) {
if (this._verifierClaims) {
return this._verifierClaims.verifyPublicProof(issuedToken);
return this._verifierClaims.verifyPublicProof(claimUrl);
}
throw new Error(ERROR_MESSAGES.CLAIMS_NOT_INITIALIZED);
}
Expand Down Expand Up @@ -1893,4 +1894,4 @@ export class IAM extends IAMBase {
}
throw new Error(ERROR_MESSAGES.CACHE_CLIENT_NOT_PROVIDED);
}
}
}

0 comments on commit 1d65b89

Please sign in to comment.