Skip to content

Commit 168487d

Browse files
author
anatoliis
committed
Fixes
1 parent 49e3148 commit 168487d

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

plugins/flask_yoti/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Flask Yoti #
22

3-
Description
4-
53
## Plugin configuration ##
64
### General settings ###
75

@@ -58,8 +56,8 @@ Example: `b14886f972d0c717`
5856
### Endpoints configuration ###
5957

6058
`flask_yoti` plugin provides some default endpoints:
61-
- `yoti_auth` (`/yoti/auth`) - is used for receiving token via callback and
62-
should'nt be changed
59+
- `yoti_auth` (`/yoti/auth`) - is a callback used for receiving an
60+
authentication token (shouldn't be changed)
6361
- `yoti_login` (`/yoti/login`) - a view with just a login button. Can (and should)
6462
be overridden by `'YOTI_LOGIN_VIEW'` setting
6563
- `yoti_profile` (`/yoti/profile`) - a view with user profile details. It's
@@ -82,7 +80,7 @@ app.config.update({
8280
If *not* authenticated user is trying to access a view with
8381
`@yoti_authenticated` decorator, he/she will be redirected to this view.
8482
Example: `login`<br>
85-
In case you have something like this in your Flask app:
83+
In this case you should have something like this in your Flask app:
8684
```python
8785
@app.route('/login')
8886
def login():
@@ -93,26 +91,27 @@ Default value: `flask_yoti.login` (with `/yoti/login/` URL)
9391
* **`YOTI_REDIRECT_TO`**<br>
9492
View name to which user is redirected after successful authentication.<br>
9593
Example: `profile`<br>
96-
In case you have something like this in your Flask app::
94+
In this case you should have something like this in your Flask app::
9795
```python
9896
@app.route('/profile')
9997
@yoti_authenticated
10098
def login():
10199
user_profile = session.get('yoti_user_profile')
102100
render_template('profile.html', **user_profile)
103101
```
104-
Default value: `flask_yoti.profile` (with `/yoti/profile/` URL
102+
Default value: `flask_yoti.profile` (with `/yoti/profile/` URL)
105103

106104
<br>
107105

108106

109107
### Yoti application configuration ###
110108

111109
Your Yoti application's callback URL should point to `your_site.com/yoti/auth`.<br>
112-
If you want to add a verification tag into any page (other than `/yoti/auth/`),
113-
you can use a `{{ yoti_site_verification }}` tag inside 'head' tag of that page.
110+
If you want to add a verification tag into any template using Jinja2 or DTL as a
111+
template language (other than `/yoti/auth/`, because it's already has one),
112+
you can use a `{{ yoti_site_verification }}` tag inside `<head>` of that template.
114113

115-
## Using plugin ##
114+
## Plugin usage ##
116115

117116
1. First you need to add a login button to some of your view's templates.
118117
- You can do it by using one of the predefined login buttons:

plugins/flask_yoti/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
version=VERSION,
1010
packages=find_packages(),
1111
license='MIT',
12-
description='Yoti Flask plugin for back-end integration.',
13-
long_description=long_description,
12+
description='Yoti SDK Plugin for the Flask microframework.',
13+
long_description='Yoti SDK Plugin for the Flask microframework.',
1414
url='https://github.com/lampkicking/yoti-sdk-server-python/plugins/flask_yoti',
1515
author='',
1616
author_email='',

0 commit comments

Comments
 (0)