-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,420 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
========================= | ||
Verifiable Credential API | ||
========================= | ||
|
||
Ensure that OpenAPI schema from https://github.com/w3c-ccg/vc-api/ supported | ||
well by *rororo* library. |
Empty file.
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,22 @@ | ||
from pathlib import Path | ||
from typing import List, Union | ||
|
||
from aiohttp import web | ||
|
||
from rororo import BaseSettings, setup_openapi, setup_settings | ||
from vc_api.views import operations | ||
|
||
|
||
def create_app( | ||
argv: Union[List[str], None] = None, | ||
*, | ||
settings: Union[BaseSettings, None] = None, | ||
) -> web.Application: | ||
settings = settings or BaseSettings.from_environ() | ||
|
||
return setup_openapi( | ||
setup_settings(web.Application(), settings), | ||
Path(__file__).parent / "vc-api.yaml", | ||
operations, | ||
cache_create_schema_and_spec=settings.is_test, | ||
) |
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,35 @@ | ||
ISSUE_CREDENTIAL_REQUEST = { | ||
"credential": { | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1", | ||
], | ||
"id": "http://example.gov/credentials/3732", | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"issuer": "did:example:123", | ||
"issuanceDate": "2020-03-16T22:37:26.544Z", | ||
"credentialSubject": { | ||
"id": "did:example:123", | ||
"degree": { | ||
"type": "BachelorDegree", | ||
"name": "Bachelor of Science and Arts", | ||
}, | ||
}, | ||
}, | ||
"options": { | ||
"created": "2020-04-02T18:48:36Z", | ||
"credentialStatus": {"type": "RevocationList2020Status"}, | ||
}, | ||
} | ||
|
||
ISSUE_CREDENTIAL_RESPONSE = { | ||
"verifiableCredential": { | ||
"proof": { | ||
"type": "Ed25519Signature2018", | ||
"created": "2020-04-02T18:28:08Z", | ||
"verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN", | ||
"proofPurpose": "assertionMethod", | ||
"jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA", | ||
}, | ||
} | ||
} |
Oops, something went wrong.