diff --git a/packages/did-auth-siop-op-authenticator/CHANGELOG.md b/packages/did-auth-siop-op-authenticator/CHANGELOG.md index 308379d75..091a20469 100644 --- a/packages/did-auth-siop-op-authenticator/CHANGELOG.md +++ b/packages/did-auth-siop-op-authenticator/CHANGELOG.md @@ -7,18 +7,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator - - - - # [0.5.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.4.0...v0.5.0) (2022-02-23) **Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator - - - - # [0.4.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator diff --git a/packages/did-auth-siop-op-authenticator/src/agent/DidAuthSiopOpAuthenticator.ts b/packages/did-auth-siop-op-authenticator/src/agent/DidAuthSiopOpAuthenticator.ts index c1bcbbd12..b0aecc269 100644 --- a/packages/did-auth-siop-op-authenticator/src/agent/DidAuthSiopOpAuthenticator.ts +++ b/packages/did-auth-siop-op-authenticator/src/agent/DidAuthSiopOpAuthenticator.ts @@ -65,7 +65,13 @@ export class DidAuthSiopOpAuthenticator implements IAgentPlugin { return Promise.reject(new Error(`Session with id: ${args.sessionId} already present`)) } - const session = new OpSession({ sessionId, identifier: args.identifier, expiresIn: args.expiresIn, supportedDidMethods: args.supportedDidMethods, context }) + const session = new OpSession({ + sessionId, + identifier: args.identifier, + expiresIn: args.expiresIn, + supportedDidMethods: args.supportedDidMethods, + context, + }) await session.init() this.sessions[sessionId] = session diff --git a/packages/did-auth-siop-op-authenticator/src/session/OpSession.ts b/packages/did-auth-siop-op-authenticator/src/session/OpSession.ts index 1bed2fe5a..fdfa0a6af 100644 --- a/packages/did-auth-siop-op-authenticator/src/session/OpSession.ts +++ b/packages/did-auth-siop-op-authenticator/src/session/OpSession.ts @@ -13,13 +13,12 @@ import { IOpsVerifySiopAuthenticationRequestUriArgs, IAuthRequestDetails, IMatchedPresentationDefinition, - IRequiredContext, ProvidedDidResolver, + IRequiredContext, + ProvidedDidResolver, } from '../types/IDidAuthSiopOpAuthenticator' -import { Resolvable } from 'did-resolver' const fetch = require('cross-fetch') - export class OpSession { public readonly id: string public readonly identifier: IIdentifier @@ -79,7 +78,7 @@ export class OpSession { } public async getSiopAuthenticationRequestFromRP(args: IOpsGetSiopAuthenticationRequestFromRpArgs): Promise { - const url = args.stateId ?`${args.redirectUrl}?stateId=${args.stateId}` : args.redirectUrl + const url = args.stateId ? `${args.redirectUrl}?stateId=${args.stateId}` : args.redirectUrl return fetch(url) .then(async (response: Response) => response.status >= 400 ? Promise.reject(new Error(await response.text())) : this.op!.parseAuthenticationRequestURI(await response.text()) @@ -134,9 +133,9 @@ export class OpSession { public async sendSiopAuthenticationResponse(args: IOpsSendSiopAuthenticationResponseArgs): Promise { const verification = { mode: SIOP.VerificationMode.INTERNAL, - resolveOpts: { - didMethods: [...this.supportedDidMethods, parseDid(this.identifier.did).method] - } + resolveOpts: { + didMethods: [...this.supportedDidMethods, parseDid(this.identifier.did).method], + }, } return this.op!.createAuthenticationResponse(args.verifiedAuthenticationRequest, { vp: args.verifiablePresentationResponse, verification }) .then((authResponse) => this.op!.submitAuthenticationResponse(authResponse)) @@ -236,10 +235,10 @@ export class OpSession { .registrationBy(SIOP.PassBy.VALUE) .response(SIOP.ResponseMode.POST) if (supportedDidMethods) { - supportedDidMethods.forEach(method => builder.addDidMethod(method)) + supportedDidMethods.forEach((method) => builder.addDidMethod(method)) } if (providedDidResolvers) { - providedDidResolvers.forEach(providedResolver => builder.addResolver(providedResolver.didMethod, providedResolver.resolver)) + providedDidResolvers.forEach((providedResolver) => builder.addResolver(providedResolver.didMethod, providedResolver.resolver)) } return builder.build() diff --git a/packages/did-auth-siop-op-authenticator/src/types/IDidAuthSiopOpAuthenticator.ts b/packages/did-auth-siop-op-authenticator/src/types/IDidAuthSiopOpAuthenticator.ts index 59d94a69c..4e78c0e6a 100644 --- a/packages/did-auth-siop-op-authenticator/src/types/IDidAuthSiopOpAuthenticator.ts +++ b/packages/did-auth-siop-op-authenticator/src/types/IDidAuthSiopOpAuthenticator.ts @@ -23,7 +23,7 @@ export interface IDidAuthSiopOpAuthenticator extends IPluginMethodMap { removeCustomApprovalForSiop(args: IRemoveCustomApprovalForSiopArgs, context: IRequiredContext): Promise } export interface ProvidedDidResolver { - didMethod: string, + didMethod: string resolver: Resolvable } diff --git a/packages/factom-did-provider/CHANGELOG.md b/packages/factom-did-provider/CHANGELOG.md index f77dc263c..4cbe1ba41 100644 --- a/packages/factom-did-provider/CHANGELOG.md +++ b/packages/factom-did-provider/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-factom-did-provider - - - - # [0.4.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-factom-did-provider diff --git a/packages/lto-did-provider/CHANGELOG.md b/packages/lto-did-provider/CHANGELOG.md index 74fe7e9d1..75298abc3 100644 --- a/packages/lto-did-provider/CHANGELOG.md +++ b/packages/lto-did-provider/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-lto-did-provider - - - - # [0.4.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-lto-did-provider diff --git a/packages/mnemonic-seed-manager/CHANGELOG.md b/packages/mnemonic-seed-manager/CHANGELOG.md index 9c1b26e7a..dfb5101ca 100644 --- a/packages/mnemonic-seed-manager/CHANGELOG.md +++ b/packages/mnemonic-seed-manager/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-mnemonic-seed-manager - - - - # [0.4.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-mnemonic-seed-manager diff --git a/packages/ssi-sdk-core/CHANGELOG.md b/packages/ssi-sdk-core/CHANGELOG.md index dfe2f2663..48c770931 100644 --- a/packages/ssi-sdk-core/CHANGELOG.md +++ b/packages/ssi-sdk-core/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-core - - - - # [0.4.0](https://github.com/Sphereon-OpenSource/ssi-sdk/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-core diff --git a/packages/vc-api-issuer/CHANGELOG.md b/packages/vc-api-issuer/CHANGELOG.md index d20b9e61c..741aa3678 100644 --- a/packages/vc-api-issuer/CHANGELOG.md +++ b/packages/vc-api-issuer/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-vc-api-issuer - - - - # [0.4.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-vc-api-issuer diff --git a/packages/vc-api-verifier/CHANGELOG.md b/packages/vc-api-verifier/CHANGELOG.md index 030b5c1bb..0974f9aeb 100644 --- a/packages/vc-api-verifier/CHANGELOG.md +++ b/packages/vc-api-verifier/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-vc-api-verifier - - - - # [0.4.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-vc-api-verifier diff --git a/packages/vc-handler-ld-local/CHANGELOG.md b/packages/vc-handler-ld-local/CHANGELOG.md index e8cd54485..5010b715f 100644 --- a/packages/vc-handler-ld-local/CHANGELOG.md +++ b/packages/vc-handler-ld-local/CHANGELOG.md @@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sphereon/ssi-sdk-vc-handler-ld-local - - - - # [0.4.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.4...v0.4.0) (2022-02-11) **Note:** Version bump only for package @sphereon/ssi-sdk-vc-handler-ld-local diff --git a/packages/waci-pex-qr-react/CHANGELOG.md b/packages/waci-pex-qr-react/CHANGELOG.md index 1e2059cf2..7a4e8eae2 100644 --- a/packages/waci-pex-qr-react/CHANGELOG.md +++ b/packages/waci-pex-qr-react/CHANGELOG.md @@ -5,14 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline # [0.5.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.4.0...v0.5.0) (2022-02-23) - ### Features -* Update waci pex implementation as it was serializing a SIOP Auth request including all options like private keys, not conforming to WACI-PEX ([90a1cba](https://github.com/Sphereon-Opensource/SSI-SDK/commit/90a1cba359b7a946951ef0d47746d01b3cbc225e)) - - - - +- Update waci pex implementation as it was serializing a SIOP Auth request including all options like private keys, not conforming to WACI-PEX ([90a1cba](https://github.com/Sphereon-Opensource/SSI-SDK/commit/90a1cba359b7a946951ef0d47746d01b3cbc225e)) # [0.4.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.4...v0.4.0) (2022-02-11) diff --git a/packages/waci-pex-qr-react/README.md b/packages/waci-pex-qr-react/README.md index 06cc189d1..0e3af2186 100644 --- a/packages/waci-pex-qr-react/README.md +++ b/packages/waci-pex-qr-react/README.md @@ -50,7 +50,7 @@ possible `accept` value may be: #### Importing the plugin ```typescript -import { WaciQrCodeProvider } from "@sphereon/ssi-sdk-waci-pex-qr-react"; +import { WaciQrCodeProvider } from '@sphereon/ssi-sdk-waci-pex-qr-react' // Include in the interface // const agent = createAgent<... WaciQrCodeProvider> @@ -68,15 +68,14 @@ plugins: [ #### Export for the function ```typescript -export const createSsiQrCode = agent.ssiQrCode; +export const createSsiQrCode = agent.ssiQrCode ``` The function declared in agent can be imported for usage like below: ```typescript -import { createSsiQrCode } from '../agent'; -import { QRContent, QRType } from "@sphereon/ssi-sdk-waci-pex-qr-react"; - +import { createSsiQrCode } from '../agent' +import { QRContent, QRType } from '@sphereon/ssi-sdk-waci-pex-qr-react' ``` #### Inside the component we can declare or get the values to pass to QR Code plugin @@ -122,9 +121,7 @@ On generate gives the following (example) output "from": "did:key:zrfdjkgfjgfdjk", "body": { "goal-code": "streamlined-vp", - "accept": [ - "siopv2+oidc4vp" - ] + "accept": ["siopv2+oidc4vp"] } } ``` @@ -135,16 +132,14 @@ If you want to create the payload manually and want to do serialization yourself const payload = OutOfBandMessage.createPayload(getOobQrCodeProps()) const encoded = OutOfBandMessage.urlEncode(payload) const url = oobQRProps.oobBaseUrl + encoded -console.log(url) // https://example.com/?oob=eyJ0eXBlIjoic2lvcHYyIiwiaWQiOiI1OTlmMzYzOC1iNTYzLTQ5MzctOTQ4Ny1kZmU1NTA5OWQ5MDAiLCJmcm9tIjoiZGlkOmtleTp6cmZkamtnZmpnZmRqayIsImJvZHkiOnsiZ29hbC1jb2RlIjoic3RyZWFtbGluZWQtdnAiLCJhY2NlcHQiOlsic2lvcHYyK29pZGM0dnAiXX19 +console.log(url) // https://example.com/?oob=eyJ0eXBlIjoic2lvcHYyIiwiaWQiOiI1OTlmMzYzOC1iNTYzLTQ5MzctOTQ4Ny1kZmU1NTA5OWQ5MDAiLCJmcm9tIjoiZGlkOmtleTp6cmZkamtnZmpnZmRqayIsImJvZHkiOnsiZ29hbC1jb2RlIjoic3RyZWFtbGluZWQtdnAiLCJhY2NlcHQiOlsic2lvcHYyK29pZGM0dnAiXX19 ``` #### For rendering add to the view ```jsx - + //... - { - this.delegateCreateOobQRCode() - } - + {this.delegateCreateOobQRCode()} + ``` diff --git a/packages/waci-pex-qr-react/src/types/WaciTypes.ts b/packages/waci-pex-qr-react/src/types/WaciTypes.ts index 1470fefb1..891993c6b 100644 --- a/packages/waci-pex-qr-react/src/types/WaciTypes.ts +++ b/packages/waci-pex-qr-react/src/types/WaciTypes.ts @@ -32,7 +32,6 @@ export enum StatusCode { CREATED = 'CREATED', } - /* TODO: See whether we need this. Not in the spec currently export interface WebRedirect {