diff --git a/oidc-controller/api/core/oidc/tests/__mocks__.py b/oidc-controller/api/core/oidc/tests/__mocks__.py index 2aec37ac..3057c8e0 100644 --- a/oidc-controller/api/core/oidc/tests/__mocks__.py +++ b/oidc-controller/api/core/oidc/tests/__mocks__.py @@ -1,6 +1,10 @@ from datetime import datetime, timedelta -from api.verificationConfigs.models import VerificationConfig, VerificationProofRequest +from api.verificationConfigs.models import ( + VerificationConfig, + VerificationProofRequest, + MetaData, +) from api.authSessions.models import AuthSession # Presentation returned from the debug webhook @@ -1341,6 +1345,15 @@ ver_config = VerificationConfig( ver_config_id="verified-email", subject_identifier="email", + metadata={ + "en": MetaData( + title="Get Name", + claims=[ + "That you are a BC Resident", + "That you are a member of the Law Society of British Columbia", + ], + ), + }, proof_request=VerificationProofRequest( name="BCGov Verified Email", version="1.0", diff --git a/oidc-controller/api/routers/oidc.py b/oidc-controller/api/routers/oidc.py index 912fe2d9..165cf78a 100644 --- a/oidc-controller/api/routers/oidc.py +++ b/oidc-controller/api/routers/oidc.py @@ -35,6 +35,7 @@ from ..verificationConfigs.crud import VerificationConfigCRUD from ..verificationConfigs.helpers import VariableSubstitutionError +from ..verificationConfigs.models import MetaData ChallengePollUri = "/poll" @@ -202,6 +203,11 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)): # BC Wallet deep link wallet_deep_link = gen_deep_link(auth_session) + metadata = ( + ver_config.metadata["en"] + if ver_config.metadata and "en" in ver_config.metadata + else MetaData(title="Scan with a Digital Wallet", claims=[]) + ) # This is the payload to send to the template data = { "image_contents": image_contents, @@ -212,6 +218,8 @@ async def get_authorize(request: Request, db: Database = Depends(get_db)): "controller_host": controller_host, "challenge_poll_uri": ChallengePollUri, "wallet_deep_link": wallet_deep_link, + "title": metadata.title, + "claims": metadata.claims, } # Prepare the template diff --git a/oidc-controller/api/templates/verified_credentials.html b/oidc-controller/api/templates/verified_credentials.html index fbef9022..474d560d 100644 --- a/oidc-controller/api/templates/verified_credentials.html +++ b/oidc-controller/api/templates/verified_credentials.html @@ -24,9 +24,12 @@
🡸 Go back + >🡸 Go back -

Scan with a Digital Wallet

+

{{title}}

+
+ +
Scan with a Digital Wallet >
🡸 Go back + >🡸 Go back

Continue with:

+ +
Continue with: Download the BC Wallet app + >Download the BC Wallet app

+