Instantly share code, notes, and snippets.

@lepture /AS.md Secret
Last active Apr 27, 2018

Embed
What would you like to do?
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

This comment has been minimized.

Owner

lepture commented Apr 26, 2018

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