Skip to content

Commit

Permalink
fix: IdentityController for web-did
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed May 25, 2020
1 parent 58b0629 commit a829991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/daf-web-did/src/identity-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class IdentityController extends AbstractIdentityController {
return true
}

async getDidDocument(service: any): Promise<any> {
async getDidDocument(): Promise<any> {
const serializedIdentity = await this.identityStore.get(this.did)
return {
'@context': 'https://w3id.org/did/v1',
Expand All @@ -50,7 +50,6 @@ export class IdentityController extends AbstractIdentityController {
: 'Ed25519SignatureAuthentication2018',
publicKey: serializedIdentity.did + '#' + key.kid,
})),
service,
}
}
}
5 changes: 3 additions & 2 deletions packages/daf-web-did/src/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import {
AbstractIdentityController,
} from 'daf-core'

import { IdentityController } from './identity-controller'
export class Identity extends AbstractIdentity {
public readonly did: string
private readonly serializedIdentity: SerializedIdentity
public readonly identityProviderType: string
private readonly kms: AbstractKeyManagementSystem
public readonly identityController: AbstractIdentityController
public readonly identityController: IdentityController

constructor(options: {
identityProviderType: string
serializedIdentity: SerializedIdentity
kms: AbstractKeyManagementSystem
identityController: AbstractIdentityController
identityController: IdentityController
}) {
super()
this.did = options.serializedIdentity.did
Expand Down

0 comments on commit a829991

Please sign in to comment.