Skip to content

Commit

Permalink
feat(verifyVc): update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
whitneypurdum committed Jul 13, 2022
1 parent e5733c6 commit eb0c7e0
Show file tree
Hide file tree
Showing 31 changed files with 537 additions and 377 deletions.
76 changes: 40 additions & 36 deletions docs/api/classes/modules_cache_client.CacheClient.md
Expand Up @@ -115,7 +115,7 @@

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[addDIDToWatchList](../interfaces/modules_cache_client.ICacheClient.md#adddidtowatchlist)
ICacheClient.addDIDToWatchList

___

Expand Down Expand Up @@ -143,7 +143,9 @@ ___

**authenticate**(): `Promise`<`void`\>

**`description`** Refreshes access token. If login still fails then signs new identity token and requests access token
**`Description`**

Refreshes access token. If login still fails then signs new identity token and requests access token
After authentication runs previously failed requests

#### Returns
Expand All @@ -168,7 +170,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[deleteClaim](../interfaces/modules_cache_client.ICacheClient.md#deleteclaim)
ICacheClient.deleteClaim

___

Expand Down Expand Up @@ -204,7 +206,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getAppDefinition](../interfaces/modules_cache_client.ICacheClient.md#getappdefinition)
ICacheClient.getAppDefinition

___

Expand All @@ -224,7 +226,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getApplicationRoles](../interfaces/modules_cache_client.ICacheClient.md#getapplicationroles)
ICacheClient.getApplicationRoles

___

Expand All @@ -244,7 +246,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getApplicationsByOrganization](../interfaces/modules_cache_client.ICacheClient.md#getapplicationsbyorganization)
ICacheClient.getApplicationsByOrganization

___

Expand All @@ -265,7 +267,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getApplicationsByOwner](../interfaces/modules_cache_client.ICacheClient.md#getapplicationsbyowner)
ICacheClient.getApplicationsByOwner

___

Expand All @@ -285,7 +287,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getAssetById](../interfaces/modules_cache_client.ICacheClient.md#getassetbyid)
ICacheClient.getAssetById

___

Expand All @@ -306,7 +308,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getAssetHistory](../interfaces/modules_cache_client.ICacheClient.md#getassethistory)
ICacheClient.getAssetHistory

___

Expand All @@ -326,7 +328,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getClaimById](../interfaces/modules_cache_client.ICacheClient.md#getclaimbyid)
ICacheClient.getClaimById

___

Expand All @@ -347,7 +349,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getClaimsByIssuer](../interfaces/modules_cache_client.ICacheClient.md#getclaimsbyissuer)
ICacheClient.getClaimsByIssuer

___

Expand All @@ -368,7 +370,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getClaimsByRequester](../interfaces/modules_cache_client.ICacheClient.md#getclaimsbyrequester)
ICacheClient.getClaimsByRequester

___

Expand All @@ -389,7 +391,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getClaimsByRevoker](../interfaces/modules_cache_client.ICacheClient.md#getclaimsbyrevoker)
ICacheClient.getClaimsByRevoker

___

Expand All @@ -410,7 +412,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getClaimsBySubject](../interfaces/modules_cache_client.ICacheClient.md#getclaimsbysubject)
ICacheClient.getClaimsBySubject

___

Expand All @@ -430,7 +432,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getClaimsBySubjects](../interfaces/modules_cache_client.ICacheClient.md#getclaimsbysubjects)
ICacheClient.getClaimsBySubjects

___

Expand All @@ -450,7 +452,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getDIDsForRole](../interfaces/modules_cache_client.ICacheClient.md#getdidsforrole)
ICacheClient.getDIDsForRole

___

Expand All @@ -471,7 +473,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getDidDocument](../interfaces/modules_cache_client.ICacheClient.md#getdiddocument)
ICacheClient.getDidDocument

___

Expand All @@ -492,7 +494,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getNamespaceBySearchPhrase](../interfaces/modules_cache_client.ICacheClient.md#getnamespacebysearchphrase)
ICacheClient.getNamespaceBySearchPhrase

___

Expand All @@ -512,7 +514,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getOfferedAssets](../interfaces/modules_cache_client.ICacheClient.md#getofferedassets)
ICacheClient.getOfferedAssets

___

Expand All @@ -532,7 +534,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getOrgDefinition](../interfaces/modules_cache_client.ICacheClient.md#getorgdefinition)
ICacheClient.getOrgDefinition

___

Expand All @@ -552,7 +554,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getOrgHierarchy](../interfaces/modules_cache_client.ICacheClient.md#getorghierarchy)
ICacheClient.getOrgHierarchy

___

Expand All @@ -572,7 +574,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getOrganizationRoles](../interfaces/modules_cache_client.ICacheClient.md#getorganizationroles)
ICacheClient.getOrganizationRoles

___

Expand All @@ -593,7 +595,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getOrganizationsByOwner](../interfaces/modules_cache_client.ICacheClient.md#getorganizationsbyowner)
ICacheClient.getOrganizationsByOwner

___

Expand All @@ -613,7 +615,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getOwnedAssets](../interfaces/modules_cache_client.ICacheClient.md#getownedassets)
ICacheClient.getOwnedAssets

___

Expand All @@ -633,7 +635,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getPreviouslyOwnedAssets](../interfaces/modules_cache_client.ICacheClient.md#getpreviouslyownedassets)
ICacheClient.getPreviouslyOwnedAssets

___

Expand All @@ -653,7 +655,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getRoleDefinition](../interfaces/modules_cache_client.ICacheClient.md#getroledefinition)
ICacheClient.getRoleDefinition

___

Expand All @@ -673,7 +675,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getRolesByOwner](../interfaces/modules_cache_client.ICacheClient.md#getrolesbyowner)
ICacheClient.getRolesByOwner

___

Expand All @@ -693,7 +695,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getRolesByRevoker](../interfaces/modules_cache_client.ICacheClient.md#getrolesbyrevoker)
ICacheClient.getRolesByRevoker

___

Expand All @@ -713,7 +715,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getRolesDefinition](../interfaces/modules_cache_client.ICacheClient.md#getrolesdefinition)
ICacheClient.getRolesDefinition

___

Expand Down Expand Up @@ -753,15 +755,17 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[getSubOrganizationsByOrganization](../interfaces/modules_cache_client.ICacheClient.md#getsuborganizationsbyorganization)
ICacheClient.getSubOrganizationsByOrganization

___

### handleError

**handleError**(`error`): `Promise`<`unknown`\>

**`description`** Interceptor of authentication errors. Queues failed requests and starts authentication process.
**`Description`**

Interceptor of authentication errors. Queues failed requests and starts authentication process.

#### Parameters

Expand Down Expand Up @@ -817,7 +821,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[isAuthEnabled](../interfaces/modules_cache_client.ICacheClient.md#isauthenabled)
ICacheClient.isAuthEnabled

___

Expand All @@ -838,7 +842,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[issueClaim](../interfaces/modules_cache_client.ICacheClient.md#issueclaim)
ICacheClient.issueClaim

___

Expand All @@ -855,7 +859,7 @@ https://energyweb.atlassian.net/wiki/spaces/MYEN/pages/2303295607/ICL-+ICS+Auth+

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[login](../interfaces/modules_cache_client.ICacheClient.md#login)
ICacheClient.login

___

Expand Down Expand Up @@ -896,7 +900,7 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[rejectClaim](../interfaces/modules_cache_client.ICacheClient.md#rejectclaim)
ICacheClient.rejectClaim

___

Expand All @@ -916,4 +920,4 @@ ___

#### Implementation of

[ICacheClient](../interfaces/modules_cache_client.ICacheClient.md).[requestClaim](../interfaces/modules_cache_client.ICacheClient.md#requestclaim)
ICacheClient.requestClaim
8 changes: 4 additions & 4 deletions docs/api/classes/modules_claims.ClaimsService.md
Expand Up @@ -46,7 +46,7 @@ claimsService.getClaimById(claim.id);
- [resolveCredentialAndVerify](modules_claims.ClaimsService.md#resolvecredentialandverify)
- [revokeClaim](modules_claims.ClaimsService.md#revokeclaim)
- [revokeMultipleClaim](modules_claims.ClaimsService.md#revokemultipleclaim)
- [verifyOffChainClaim](modules_claims.ClaimsService.md#verifyoffchainclaim)
- [verifyRoleEIP191JWT](modules_claims.ClaimsService.md#verifyroleeip191jwt)
- [verifyVc](modules_claims.ClaimsService.md#verifyvc)
- [create](modules_claims.ClaimsService.md#create)

Expand Down Expand Up @@ -792,9 +792,9 @@ claimsService.revokeMultipleClaim({

___

### verifyOffChainClaim
### verifyRoleEIP191JWT

**verifyOffChainClaim**(`offChainClaim`): `Promise`<[`CredentialVerificationResult`](../interfaces/modules_claims.CredentialVerificationResult.md)\>
**verifyRoleEIP191JWT**(`roleEIP191JWT`): `Promise`<[`CredentialVerificationResult`](../interfaces/modules_claims.CredentialVerificationResult.md)\>

Verifies:
- That off-chain claim was issued by authorized issuer
Expand All @@ -804,7 +804,7 @@ Verifies:

| Name | Type |
| :------ | :------ |
| `offChainClaim` | `RoleEIP191JWT` |
| `roleEIP191JWT` | `RoleEIP191JWT` |

#### Returns

Expand Down
4 changes: 3 additions & 1 deletion docs/api/classes/modules_signer.SignerService.md
Expand Up @@ -353,7 +353,9 @@ ___

Add event handler for certain events

**`requires`** to be called after the connection to wallet was initialized
**`Requires`**

to be called after the connection to wallet was initialized

#### Returns

Expand Down
8 changes: 6 additions & 2 deletions docs/api/classes/modules_staking.StakingFactoryService.md
Expand Up @@ -35,7 +35,9 @@ Intended for staking pool

**allServices**(): `Promise`<[`Service`](../modules/modules_staking.md#service)[]\>

**`description`** Returns all services for which pools are launched
**`Description`**

Returns all services for which pools are launched

#### Returns

Expand All @@ -47,7 +49,9 @@ ___

**getPool**(): `Promise`<[`StakingPoolService`](modules_staking.StakingPoolService.md)\>

**`description`** Returns pool launched for energyweb org
**`Description`**

Returns pool launched for energyweb org

#### Returns

Expand Down

0 comments on commit eb0c7e0

Please sign in to comment.