diff --git a/README.md b/README.md index fa1a85ad..56c0258d 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,7 @@ user_id = user_profile.get('user_id') selfie = user_profile.get('selfie') given_names = user_profile.get('given_names') family_name = user_profile.get('family_name') +full_name = user_profile.get('full_name') phone_number = user_profile.get('phone_number') date_of_birth = user_profile.get('date_of_birth') postal_address = user_profile.get('postal_address') @@ -187,9 +188,11 @@ For information on testing with multiple Python versions, see [VERSION-SUPPORT.m * [X] Photo `selfie` * [X] Given Names `given_names` * [X] Family Name `family_name` + * [X] Full Name `full_name` * [X] Mobile Number `phone_number` - * [X] Email address `email_address` - * [X] Date of Birth `date_of_birth` + * [X] Email Address `email_address` + * [X] Age / Date of Birth `date_of_birth` + * [X] Age / Verify Condition `age_[over|under]:[1-999]` * [X] Address `postal_address` * [X] Gender `gender` * [X] Nationality `nationality` diff --git a/examples/yoti_example_django/yoti_example/templates/profile.html b/examples/yoti_example_django/yoti_example/templates/profile.html index 09f36452..8dc25741 100644 --- a/examples/yoti_example_django/yoti_example/templates/profile.html +++ b/examples/yoti_example_django/yoti_example/templates/profile.html @@ -39,6 +39,13 @@

Home

{% endif %} + {% if full_name %} + + Full Name: + {{full_name}} + + {% endif %} + {% if phone_number %} Phone Number: @@ -53,6 +60,13 @@

Home

{% endif %} + {% if age_verified %} + + Age Verified: + {{age_verified}} + + {% endif %} + {% if postal_address %} Postal Address: diff --git a/examples/yoti_example_django/yoti_example/views.py b/examples/yoti_example_django/yoti_example/views.py index d41b91be..14dc5f5c 100644 --- a/examples/yoti_example_django/yoti_example/views.py +++ b/examples/yoti_example_django/yoti_example/views.py @@ -25,6 +25,10 @@ def get(self, request, *args, **kwargs): activity_details = client.get_activity_details(request.GET['token']) context = activity_details.user_profile context['base64_selfie_uri'] = getattr(activity_details, 'base64_selfie_uri') + + # This key uses the format: age_[over|under]:[1-999] and is dynamically + # generated based on the dashboard attribute Age / Verify Condition + context['age_verified'] = context.get('age_over:18') selfie = context.get('selfie') if selfie is not None: self.save_image(selfie) diff --git a/examples/yoti_example_flask/app.py b/examples/yoti_example_flask/app.py index bbc25f43..7427a084 100644 --- a/examples/yoti_example_flask/app.py +++ b/examples/yoti_example_flask/app.py @@ -37,6 +37,10 @@ def auth(): activity_details = client.get_activity_details(request.args['token']) user_profile = activity_details.user_profile user_profile['base64_selfie_uri'] = getattr(activity_details, 'base64_selfie_uri') + + # This key uses the format: age_[over|under]:[1-999] and is dynamically + # generated based on the dashboard attribute Age / Verify Condition + user_profile['age_verified'] = user_profile.get('age_over:18') selfie = user_profile.get('selfie') if selfie is not None: save_image(selfie) diff --git a/examples/yoti_example_flask/templates/profile.html b/examples/yoti_example_flask/templates/profile.html index eb7fca22..b4a0f457 100644 --- a/examples/yoti_example_flask/templates/profile.html +++ b/examples/yoti_example_flask/templates/profile.html @@ -39,6 +39,13 @@

Home

{% endif %} + {% if full_name %} + + Full Name: + {{full_name}} + + {% endif %} + {% if phone_number %} Phone Number: @@ -53,6 +60,13 @@

Home

{% endif %} + {% if age_verified %} + + Age Verified: + {{age_verified}} + + {% endif %} + {% if postal_address %} Postal Address: diff --git a/plugins/django_yoti/django_yoti/templates/yoti_profile.html b/plugins/django_yoti/django_yoti/templates/yoti_profile.html index 9577b653..8f805ced 100644 --- a/plugins/django_yoti/django_yoti/templates/yoti_profile.html +++ b/plugins/django_yoti/django_yoti/templates/yoti_profile.html @@ -35,6 +35,13 @@

Home

{% endif %} + {% if full_name %} + + Full Name: + {{full_name}} + + {% endif %} + {% if phone_number %} Phone Number: diff --git a/plugins/flask_yoti/flask_yoti/templates/yoti_profile.html b/plugins/flask_yoti/flask_yoti/templates/yoti_profile.html index 386fd1a3..1827f16a 100644 --- a/plugins/flask_yoti/flask_yoti/templates/yoti_profile.html +++ b/plugins/flask_yoti/flask_yoti/templates/yoti_profile.html @@ -35,6 +35,13 @@

Home

{% endif %} + {% if full_name %} + + Full Name: + {{full_name}} + + {% endif %} + {% if phone_number %} Phone Number: