Skip to content

Instantly share code, notes, and snippets.

@lepture

lepture/AS.md Secret

Last active April 27, 2018 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lepture/48b16253d142172febc8c684760f89ba to your computer and use it in GitHub Desktop.
Save lepture/48b16253d142172febc8c684760f89ba to your computer and use it in GitHub Desktop.
Authlib v0.7 Changes

OAuth 2.0 Configuration

Deprecate OAUTH2_EXPIRES_{}, which means:

  • OAUTH2_EXPIRES_AUTHORIZATION_CODE
  • OAUTH2_EXPIRES_IMPLICIT
  • OAUTH2_EXPIRES_PASSWORD
  • OAUTH2_EXPIRES_CLIENT_CREDENTIALS

It is replaced with a diction configuration:

OAUTH2_EXPIRES_IN = {
  'authorization_code': 864000,
  'password': 3600,
}

Why? Because extended grant types are named like: urn:ietf:params:oauth:grant-type:jwt-bearer. We can't use a plain string as a key anymore.

JWS

JWS is full featured implemented in version 0.7. Previously, only compact serialization is implemented.

.encode

.encode is deprecated. Use .serialize instead.

.serialize is a combination of .serialize_compact and .serialize_json, you may use either of these two methods.

.decode

.decode is deprecated. Use .deserialize instead.

.deserialize is a combination of .deserialize_compact and .deserialize_json, you may use either of these two methods.

@lepture
Copy link
Author

lepture commented Apr 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment