Skip to content

Commit 73a2726

Browse files
committed
SDK-378: Changed Django example project to use HTTPS
1 parent 47120e5 commit 73a2726

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Additionally an [example AML application](/examples/aml/app.py) is provided in t
194194

195195
## Running the Examples
196196

197-
The callback URL for both example projects will be `http://localhost:5000/yoti/auth`
197+
The callback URL for both example projects will be `https://localhost:5000/yoti/auth`
198198

199199
### With Docker
200200

@@ -209,7 +209,7 @@ To run the Flask or Django container:
209209
1. Rebuild the images if you have modified the docker-compose.yml file with
210210
- `docker-compose build --no-cache`
211211
1. Start the container with `docker-compose up`
212-
1. Navigate to http://localhost:5000
212+
1. Navigate to https://localhost:5000
213213

214214
### Running Locally
215215

@@ -227,8 +227,8 @@ Both example applications utilise the env variables described in [Configuration]
227227

228228
1. Change directories to the Django project: `cd examples/yoti_example_django`
229229
1. Apply migrations before the first start by running: `python manage.py migrate`
230-
1. Run: `python manage.py runserver 0.0.0.0:5000`
231-
1. Navigate to http://localhost:5000
230+
1. Run: `python manage.py runsslserver 0.0.0.0:5000`
231+
1. Navigate to https://localhost:5000
232232

233233
#### AML Example
234234

@@ -275,3 +275,11 @@ Please provide the following to get you up and working as quickly as possible:
275275
* Screenshot
276276

277277
Once we have answered your question we may contact you again to discuss Yoti products and services. If you’d prefer us not to do this, please let us know when you e-mail.
278+
279+
### Windows Configuration
280+
If you're using Windows and you haven't installed Cryptography before, you might need to set two environment variables for Cryptography to install (it is a requirement of the Yoti package):
281+
```shell
282+
set LIB=C:\OpenSSL-Win64\lib;%LIB%
283+
set INCLUDE=C:\OpenSSL-Win64\include;%INCLUDE%
284+
```
285+
Where `OpenSSL-Win64` is the location that you have installed OpenSSL to. See [here](https://cryptography.io/en/latest/installation/#building-cryptography-on-windows) for more information.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Django>=1.11
22
yoti
33
python-dotenv>=0.7.1
4+
django-sslserver

examples/yoti_example_django/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ certifi==2018.4.16 # via requests
99
cffi==1.11.5 # via cryptography
1010
chardet==3.0.4 # via requests
1111
cryptography==2.2.2 # via yoti
12+
django-sslserver==0.20
1213
django==1.11
1314
future==0.16.0 # via yoti
1415
idna==2.7 # via cryptography, requests

examples/yoti_example_django/yoti_example/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'django.contrib.sessions',
3838
'django.contrib.messages',
3939
'django.contrib.staticfiles',
40+
'sslserver'
4041
]
4142

4243
MIDDLEWARE = [

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
click==6.6
2-
cryptography==1.5.2
2+
cryptography>=1.5.2
33
Django==1.11
44
flask==0.11.1
55
itsdangerous==0.24

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
install_requires=['cryptography>=1.4', 'protobuf>=3.0.0',
2121
'requests>=2.0.0', 'future>=0.11.0'],
2222
extras_require={
23-
'examples': ['Django==1.11', 'Flask>=0.10', 'python-dotenv>=0.7.1'],
23+
'examples': ['Django>=1.8', 'Flask>=0.10', 'python-dotenv>=0.7.1', 'django-sslserver>=0.2'],
2424
},
2525
classifiers=[
2626
'Development Status :: 5 - Production/Stable',
@@ -38,5 +38,5 @@
3838
'Programming Language :: Python :: 3.6',
3939
'Topic :: Software Development :: Libraries :: Python Modules',
4040
],
41-
keywords='2FA multifactor authentication verification identity login register verify 2Factor',
41+
keywords='yoti sdk 2FA multifactor authentication verification identity login register verify 2Factor',
4242
)

0 commit comments

Comments
 (0)