-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add SIOPv2 Relying Party logic and REST API
- Loading branch information
Showing
76 changed files
with
4,300 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.vscode/* | ||
.idea/* | ||
*.iml | ||
.nyc_output | ||
build | ||
dist | ||
node_modules | ||
coverage | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "@sphereon/ssi-sdk-siopv2-openid4vp-common", | ||
"version": "0.9.0", | ||
"description": "Common SIOPv2 and OpenID4VP types between modules", | ||
"source": "src/index.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"author": "Sphereon <[email protected]>", | ||
"license": "Apache-2.0", | ||
"private": false, | ||
"dependencies": { | ||
"@sphereon/did-auth-siop": "^0.3.0-unstable.30" | ||
}, | ||
"scripts": { | ||
"build": "tsc" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.18.0" | ||
}, | ||
"files": [ | ||
"dist/**/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// noinspection JSUnusedGlobalSymbols | ||
import {AuthorizationResponsePayload} from "@sphereon/did-auth-siop"; | ||
|
||
export interface ClaimPayloadCommonOpts { | ||
[x: string]: any; | ||
} | ||
export declare enum AuthorizationRequestStateStatus { | ||
CREATED = "created", | ||
SENT = "sent", | ||
RECEIVED = "received", | ||
VERIFIED = "verified", | ||
ERROR = "error" | ||
} | ||
export declare enum AuthorizationResponseStateStatus { | ||
CREATED = "created", | ||
SENT = "sent", | ||
RECEIVED = "received", | ||
VERIFIED = "verified", | ||
ERROR = "error" | ||
} | ||
|
||
export interface GenerateAuthRequestURIResponse { | ||
correlationId: string; | ||
definitionId: string; | ||
authRequestURI: string; | ||
authStatusURI: string; | ||
} | ||
|
||
|
||
export interface AuthStatusResponse { | ||
status: AuthorizationRequestStateStatus | AuthorizationResponseStateStatus; | ||
correlationId: string; | ||
error?: string | ||
definitionId: string; | ||
lastUpdated: number; | ||
payload?: AuthorizationResponsePayload; // Only put in here once the status reaches Verified on the RP side | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './auth-model'; | ||
export * from './utils'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as u8a from 'uint8arrays' | ||
|
||
export function base64ToBytes(s: string): Uint8Array { | ||
const inputBase64Url = s.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') | ||
return u8a.fromString(inputBase64Url, 'base64url') | ||
} | ||
|
||
export function decodeBase64url(s: string): string { | ||
return u8a.toString(base64ToBytes(s)) | ||
} | ||
|
||
// noinspection JSUnusedLocalSymbols | ||
|
||
export function uriWithBase(path: string) { | ||
return `${process.env.BACKEND_BASE_URL}${path.startsWith('/') ? path : '/' + path}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"extends": "../tsconfig-base.json", | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"outDir": "dist", | ||
"declarationDir": "dist", | ||
"strictPropertyInitialization": false, | ||
"noUnusedLocals": false | ||
}, | ||
"references": [{ "path": "../ssi-types" }], | ||
"include": [ | ||
"src/**/*", | ||
], | ||
"exclude": [ | ||
"node_modules/**/*" | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...d-auth-siop-op-authenticator/package.json → ...ges/siopv2-openid4vp-op-auth/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# [0.9.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.8.0...v0.9.0) (2023-03-09) | ||
|
||
### Bug Fixes | ||
|
||
- credential mapper for jtw ([f04345b](https://github.com/Sphereon-Opensource/SSI-SDK/commit/f04345b97ff9a78a3dff096599f0b675b3239a3e)) | ||
- Fix DID handling in OP session ([926e358](https://github.com/Sphereon-Opensource/SSI-SDK/commit/926e358ef3eadf19fc3c8f7c9940fe6322c5ff85)) | ||
- Incorrect verification method id returned when signing credentials in some cases ([c508507](https://github.com/Sphereon-Opensource/SSI-SDK/commit/c508507ddd2e35fcb377a79bad3c82d695b3d93d)) | ||
- Move parseDid method to ssi-types ([0b28de3](https://github.com/Sphereon-Opensource/SSI-SDK/commit/0b28de3de21afd0a224d3d174103e072162231ed)) | ||
|
||
### Features | ||
|
||
- Add jwt as signature when decoding JWT VCs/VPs ([f089ac1](https://github.com/Sphereon-Opensource/SSI-SDK/commit/f089ac18dc470f0b8c581b49e70e7eba64d72bc3)) | ||
- Allow to relax JWT timing checks, where the JWT claim is slightly different from the VC claim. Used for issuance and expiration dates ([85bff6d](https://github.com/Sphereon-Opensource/SSI-SDK/commit/85bff6da21dea5d8f636ea1f55b41be00b18b002)) | ||
- Create VP in OP Authenticator and allow for callbacks ([0ed86d8](https://github.com/Sphereon-Opensource/SSI-SDK/commit/0ed86d8d2b655a718d7c8cf1a946e0150bf877ce)) | ||
- Make sure VP type corresponds with PEX definition ([129b663](https://github.com/Sphereon-Opensource/SSI-SDK/commit/129b66383752e05ab3067e459bff591a07aac690)) | ||
- Make sure VP type corresponds with PEX definition ([3dafa3f](https://github.com/Sphereon-Opensource/SSI-SDK/commit/3dafa3ff4c794d13eff3e2e0b6a85675667db089)) | ||
- Update SIOP OP to be in line wiht latest SIOP and also supporting late binding of identifiers ([2beea04](https://github.com/Sphereon-Opensource/SSI-SDK/commit/2beea04a6604d82b12ecbc11e68a9f41775c22ed)) | ||
|
||
# [0.8.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.7.0...v0.8.0) (2022-09-03) | ||
|
||
**Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator | ||
|
||
# [0.7.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.6.0...v0.7.0) (2022-08-05) | ||
|
||
**Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator | ||
|
||
# [0.6.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.1...v0.6.0) (2022-07-01) | ||
|
||
### Features | ||
|
||
- Add custom DID resolver support ([45cea11](https://github.com/Sphereon-Opensource/SSI-SDK/commit/45cea1182693b698611b062a9d664ad92e8dcd6a)) | ||
- Add default DID resolver support ([eebce18](https://github.com/Sphereon-Opensource/SSI-SDK/commit/eebce18bf9cc9d28a8bcdd6886100b7a8921bb2f)) | ||
- Add did resolver and method support per OpSession ([9378b45](https://github.com/Sphereon-Opensource/SSI-SDK/commit/9378b451d4907c8d5385f464b27f858547409bb4)) | ||
- Add did resolver and method support per OpSession ([a9f7afc](https://github.com/Sphereon-Opensource/SSI-SDK/commit/a9f7afc386189ca4851ce967f5abf7db812d1003)) | ||
- Add supported DID methods ([df74ccd](https://github.com/Sphereon-Opensource/SSI-SDK/commit/df74ccddcab06a032ca47a033a46bd0268826f72)) | ||
- Add supported DID methods ([7322265](https://github.com/Sphereon-Opensource/SSI-SDK/commit/732226544503c2bcc32bf4400da82e9154361abb)) | ||
|
||
## [0.5.1](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.5.0...v0.5.1) (2022-02-23) | ||
|
||
**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 | ||
|
||
## [0.3.4](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.3...v0.3.4) (2022-02-11) | ||
|
||
### Bug Fixes | ||
|
||
- fix imports ([738f4ca](https://github.com/Sphereon-Opensource/SSI-SDK/commit/738f4cafdf75c9d4831a3c31de1c0d5aff1d7285)) | ||
|
||
## [0.3.1](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.3.0...v0.3.1) (2022-01-28) | ||
|
||
**Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator | ||
|
||
# [0.3.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.2.0...v0.3.0) (2022-01-16) | ||
|
||
**Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator | ||
|
||
# [0.2.0](https://github.com/Sphereon-Opensource/SSI-SDK/compare/v0.1.0...v0.2.0) (2021-12-16) | ||
|
||
**Note:** Version bump only for package @sphereon/ssi-sdk-did-auth-siop-authenticator |
Oops, something went wrong.