-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: remove legacy `9999` ports from example configuration * fix: update vp_formats in example configuration Used the example provided at https://openid.github.io/oid4vc-haip-sd-jwt-vc/draft-oid4vc-haip-sd-jwt-vc.html#section-7.2.7-3 * refactor: moved `VPFormat` schema to a specific file Extracted `VPFormat` and its related schemas from `__init__.py` to a dedicated file * refactor: moved `VPFormat` schema to a specific file Extracted `VPFormat` and its related schemas from `__init__.py` to a dedicated file * fix: update `VpFormats` and its related tests * refactor: raname `vp_format.py` in `vp_formats.py` --------- Co-authored-by: Salvatore Laiso <[email protected]>
- Loading branch information
1 parent
5a54fc3
commit 0f8c1d5
Showing
8 changed files
with
66 additions
and
37 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
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 |
---|---|---|
@@ -1,13 +0,0 @@ | ||
from enum import Enum | ||
from typing import List | ||
from pydantic import BaseModel | ||
|
||
class VPSigningAlgResponseSupported(str, Enum): | ||
eddsa = "EdDSA" | ||
es256k = "ES256K" | ||
|
||
class VPAlgorithmSchema(BaseModel): | ||
alg: List[VPSigningAlgResponseSupported] | ||
|
||
class VPFormat(BaseModel): | ||
jwt_vp_json: VPAlgorithmSchema | ||
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,21 @@ | ||
from enum import Enum | ||
from typing import List | ||
from pydantic import BaseModel, Field | ||
|
||
|
||
class Algorithms(Enum): | ||
es256 = "ES256" | ||
es384 = "ES384" | ||
es512 = "ES512" | ||
rs256 = "RS256" | ||
rs384 = "RS384" | ||
rs512 = "RS512" | ||
|
||
|
||
class VcSdJwt(BaseModel): | ||
sd_jwt_alg_values: List[Algorithms] = Field([], alias='sd-jwt_alg_values') | ||
kb_jwt_alg_values: List[Algorithms] = Field([], alias='kb-jwt_alg_values') | ||
|
||
|
||
class VpFormats(BaseModel): | ||
vc_sd_jwt: VcSdJwt = Field(..., alias='vc+sd-jwt') |
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
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