From 638ffb70d0df77d8f58ff8132033c30cd9116443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Mon, 15 Jun 2020 14:44:47 +0200 Subject: [PATCH] Add a migration doc for 2.0.0 --- docs/migration/{08_to_10.md => 08_to_1x.md} | 2 +- docs/migration/1x_to_2x.md | 24 +++++++++++++++++++++ mkdocs.yml | 3 ++- 3 files changed, 27 insertions(+), 2 deletions(-) rename docs/migration/{08_to_10.md => 08_to_1x.md} (99%) create mode 100644 docs/migration/1x_to_2x.md diff --git a/docs/migration/08_to_10.md b/docs/migration/08_to_1x.md similarity index 99% rename from docs/migration/08_to_10.md rename to docs/migration/08_to_1x.md index 7561a4cb..b0c9e026 100644 --- a/docs/migration/08_to_10.md +++ b/docs/migration/08_to_1x.md @@ -1,4 +1,4 @@ -# 0.8.x ➡️ 1.0.x +# 0.8.x ➡️ 1.x.x 1.0 version introduces major breaking changes that need you to update some of your code and migrate your data. diff --git a/docs/migration/1x_to_2x.md b/docs/migration/1x_to_2x.md new file mode 100644 index 00000000..71731c04 --- /dev/null +++ b/docs/migration/1x_to_2x.md @@ -0,0 +1,24 @@ +# 1.x.x ➡️ 2.x.x + +## JWT authentication backend + +To be fully compatible with Swagger authentication, the output of a successful login operation with the JWT authentication backend has changed: + +**Before** + +```json +{ + "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI" +} +``` + +**After** + +```json +{ + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI", + "token_type": "bearer" +} +``` + +Make sure to update your clients to read the token in the right property. diff --git a/mkdocs.yml b/mkdocs.yml index 709c43d8..9e483812 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -51,4 +51,5 @@ nav: - usage/routes.md - usage/dependency-callables.md - Migration: - - migration/08_to_10.md + - migration/08_to_1x.md + - migration/1x_to_2x.md