diff --git a/oidc-controller/api/templates/ver_config_explorer.html b/oidc-controller/api/templates/ver_config_explorer.html new file mode 100644 index 00000000..a45ca1b6 --- /dev/null +++ b/oidc-controller/api/templates/ver_config_explorer.html @@ -0,0 +1,200 @@ + + + + + + + {{ title }} + + + + + + +
+ + + + + + + + + + + + + {% for vc in ver_configs %} + + + + + + + + {% endfor %} + +
IDNameAttributesPresentation Request
{{ vc.ver_config_id }}{{ vc.proof_request.name }} +
    + {% for name in vc.proof_request.requested_attributes[0].names %} +
  • {{ name }}
  • + {% endfor %} +
+
+ + + + + +
+ +
+
+
+
+
Need to add a Presentation Request?
+

+ If you are integrating VCAuthN into your line of business + application and do not see the Presentation Request you need, + you can request an addition from us. +

+ Request Addition +
+
+
+
+
+
+
Integrating with VCAuthN-OIDC
+
Onboarding to SSO
+

+ Some text here about linking to "how to onboard" instructions. +
+ SSO Keyloak integration details, etc +

+ SSO Team + About VCs? +
+
+
+
+
+ + + + + + + + + + diff --git a/oidc-controller/api/verificationConfigs/router.py b/oidc-controller/api/verificationConfigs/router.py index 5fbfb31d..65b14cb6 100644 --- a/oidc-controller/api/verificationConfigs/router.py +++ b/oidc-controller/api/verificationConfigs/router.py @@ -1,4 +1,6 @@ from typing import List +from fastapi.responses import HTMLResponse +from jinja2 import Template from pymongo.database import Database from fastapi import APIRouter, Depends @@ -13,6 +15,7 @@ from ..core.auth import get_api_key from ..core.models import GenericErrorMessage, StatusMessage from ..db.session import get_db +from ..templates.helpers import add_asset router = APIRouter() @@ -43,6 +46,21 @@ async def get_all_ver_configs(db: Database = Depends(get_db)): return await VerificationConfigCRUD(db).get_all() +@router.get("/explorer", include_in_schema=False) +async def get_proof_request_explorer(db: Database = Depends(get_db)): + data = { + "title": "Presentation Request Explorer", + } + template_file = open("api/templates/ver_config_explorer.html", "r").read() + template = Template(template_file) + # get all from VerificationConfigCRUD and add to the jinja template + ver_configs = await VerificationConfigCRUD(db).get_all() + data["add_asset"] = add_asset + data["ver_configs"] = [vc.dict() for vc in ver_configs] + + return HTMLResponse(template.render(data)) + + @router.get( "/{ver_config_id}", status_code=http_status.HTTP_200_OK,