-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [FC-0006] add Verifiable Credentials bare feature (#1973)
- Loading branch information
1 parent
e643359
commit 2d9d73e
Showing
69 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
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,3 @@ | ||
""" | ||
Admin section configuration. | ||
""" |
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 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class VerifiableCredentialsConfig(AppConfig): | ||
name = "credentials.apps.verifiable_credentials" | ||
verbose_name = "Verifiable Credentials" |
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 @@ | ||
""" | ||
Verifiable Credentials self-checks. | ||
""" |
3 changes: 3 additions & 0 deletions
3
credentials/apps/verifiable_credentials/composition/__init__.py
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 @@ | ||
""" | ||
Verifiable Credentials different data models specifications. | ||
""" |
4 changes: 4 additions & 0 deletions
4
credentials/apps/verifiable_credentials/composition/open_badges.py
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,4 @@ | ||
""" | ||
Open Badges 3.0.* data model. | ||
See specification: https://1edtech.github.io/openbadges-specification/ob_v3p0.html | ||
""" |
3 changes: 3 additions & 0 deletions
3
credentials/apps/verifiable_credentials/composition/schemas.py
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 @@ | ||
""" | ||
Complementary schemas for verifiable credential composition. | ||
""" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,3 @@ | ||
""" | ||
Composition utils. | ||
""" |
5 changes: 5 additions & 0 deletions
5
credentials/apps/verifiable_credentials/composition/verifiable_credentials.py
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,5 @@ | ||
""" | ||
Verifiable Credentials v1.1 data model. | ||
See specification: https://www.w3.org/TR/vc-data-model/ | ||
""" |
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 @@ | ||
""" | ||
Issuance module. | ||
""" |
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 @@ | ||
""" | ||
Issuance line processor. | ||
""" |
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 @@ | ||
""" | ||
Verifiable Credentials DB models. | ||
""" |
3 changes: 3 additions & 0 deletions
3
credentials/apps/verifiable_credentials/issuance/renderers.py
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 @@ | ||
""" | ||
Verifiable credentials renderers. | ||
""" |
3 changes: 3 additions & 0 deletions
3
credentials/apps/verifiable_credentials/issuance/serializers.py
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 @@ | ||
""" | ||
Verifiable Credentials serializers. | ||
""" |
6 changes: 6 additions & 0 deletions
6
credentials/apps/verifiable_credentials/issuance/status_list.py
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 @@ | ||
""" | ||
Status List issuance utils. | ||
Status list is managed for each Issuer separately. | ||
Status lists are verifiable credentials themselves, but with a specific shape. | ||
""" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,3 @@ | ||
""" | ||
Issuance utils. | ||
""" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,3 @@ | ||
""" | ||
Verifiable credentials specific permissions. | ||
""" |
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,8 @@ | ||
"""Root API URLs for verifiable_credentials.""" | ||
from django.conf.urls import include | ||
from django.urls import re_path | ||
|
||
|
||
urlpatterns = [ | ||
re_path(r"^v1/", include(("credentials.apps.verifiable_credentials.rest_api.v1.urls", "v1"), namespace="v1")), | ||
] |
Empty file.
Empty file.
Empty file.
11 changes: 11 additions & 0 deletions
11
credentials/apps/verifiable_credentials/rest_api/v1/urls.py
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,11 @@ | ||
""" | ||
Verifiable Credentials API v1 URLs. | ||
""" | ||
from rest_framework import routers | ||
|
||
|
||
router = routers.DefaultRouter() | ||
|
||
urlpatterns = [] | ||
|
||
urlpatterns += router.urls |
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,13 @@ | ||
""" | ||
Settings for Verifiable Credentials are all namespaced in the VERIFIABLE_CREDENTIALS setting. | ||
This is pretty similar to what the DRF does, like this: | ||
VERIFIABLE_CREDENTIALS = { | ||
'setting_1': 'value_1', | ||
'setting_2': 'value_2', | ||
} | ||
This module provides the `vc_setting` object, that is used to access | ||
Verifiable Credentials settings, checking for explicit settings first, then falling | ||
back to the defaults. | ||
""" |
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 @@ | ||
""" | ||
Verifiable Credentials signal handlers. | ||
""" |
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 @@ | ||
""" | ||
Verifiable Credentials built-in storage backends. | ||
""" |
Empty file.
3 changes: 3 additions & 0 deletions
3
credentials/apps/verifiable_credentials/storages/status_list.py
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 @@ | ||
""" | ||
Status List 2021 storage. | ||
""" |
Empty file.
Empty file.
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,3 @@ | ||
""" | ||
Storages utils. | ||
""" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,21 @@ | ||
""" | ||
Toggles for verifiable_credentials app. | ||
""" | ||
|
||
from edx_toggles.toggles import SettingToggle | ||
|
||
|
||
# .. toggle_name: ENABLE_VERIFIABLE_CREDENTIALS | ||
# .. toggle_implementation: DjangoSetting | ||
# .. toggle_default: False | ||
# .. toggle_description: Determines if the Credentials IDA uses digital credentials issuance. | ||
# .. toggle_warning: Requires the Learner Record MFE to be deployed and used in a given environment if toggled to true. | ||
# .. toggle_life_expectancy: permanent | ||
# .. toggle_permanent_justification: Digital Credentials are optional for usage. | ||
# .. toggle_creation_date: 2023-02-02 | ||
# .. toggle_use_cases: open_edx | ||
ENABLE_VERIFIABLE_CREDENTIALS = SettingToggle("ENABLE_VERIFIABLE_CREDENTIALS", default=False, module_name=__name__) | ||
|
||
|
||
def is_verifiable_credentials_enabled(): | ||
return ENABLE_VERIFIABLE_CREDENTIALS.is_enabled() |
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,10 @@ | ||
""" | ||
URLs for verifiable_credentials. | ||
""" | ||
from django.conf.urls import include | ||
from django.urls import re_path | ||
|
||
|
||
urlpatterns = [ | ||
re_path(r"^api/", include(("credentials.apps.verifiable_credentials.rest_api.urls", "api"), namespace="api")), | ||
] |
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
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