Skip to content

Commit

Permalink
feature: added Federation Operator credential role for parties
Browse files Browse the repository at this point in the history
  • Loading branch information
Brummos committed Oct 29, 2024
1 parent 9e12eec commit 689d19d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
22 changes: 20 additions & 2 deletions packages/data-store/src/__tests__/contact.store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@ describe('Contact store tests', (): void => {
correlationId: 'example_did3',
},
},
{
alias: 'test_alias4',
origin: IdentityOrigin.EXTERNAL,
roles: [CredentialRole.FEDERATION_OPERATOR],
identifier: {
type: CorrelationIdentifierType.DID,
correlationId: 'example_did4',
},
},
],
electronicAddresses: [
{
Expand All @@ -391,7 +400,7 @@ describe('Contact store tests', (): void => {
}
const result: Array<Party> = await contactStore.getParties(args)

expect(result[0].identities.length).toEqual(3)
expect(result[0].identities.length).toEqual(4)
expect(result[0].electronicAddresses.length).toEqual(1)
})

Expand Down Expand Up @@ -1208,6 +1217,15 @@ describe('Contact store tests', (): void => {
correlationId: 'example_did3',
},
},
{
alias: 'test_alias4',
origin: IdentityOrigin.EXTERNAL,
roles: [CredentialRole.FEDERATION_OPERATOR],
identifier: {
type: CorrelationIdentifierType.DID,
correlationId: 'example_did4',
},
},
],
}

Expand All @@ -1216,7 +1234,7 @@ describe('Contact store tests', (): void => {

expect(result.roles).toBeDefined()
expect(result.roles.length).toEqual(3)
expect(result.roles).toEqual([CredentialRole.VERIFIER, CredentialRole.ISSUER, CredentialRole.HOLDER])
expect(result.roles).toEqual([CredentialRole.VERIFIER, CredentialRole.ISSUER, CredentialRole.HOLDER, CredentialRole.FEDERATION_OPERATOR])
})

it('should add relationship', async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export enum CredentialRole {
ISSUER = 'ISSUER',
VERIFIER = 'VERIFIER',
HOLDER = 'HOLDER',
FEDERATION_OPERATOR = 'FEDERATION OPERATOR'
}

export enum CredentialStateType {
Expand Down

0 comments on commit 689d19d

Please sign in to comment.