Skip to content

Instantly share code, notes, and snippets.

@lepture

lepture/SP.md Secret

Created March 19, 2019 06:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lepture/7e38d505c1e22e6e913d8625e5c52cca to your computer and use it in GitHub Desktop.
Save lepture/7e38d505c1e22e6e913d8625e5c52cca to your computer and use it in GitHub Desktop.
Authlib v0.11 Changes

authlib.specs

The specs module has been splitted into jose, oauth1, oauth2, and oidc.

jose

Authlib exported everything into authlib.jose, you don't have to remember the RFC numbers anymore.

Before v0.11

from authlib.specs.rfc7515 import JWS
from authlib.specs.rfc7519 import JWT

=> v0.11

from authlib.jose import JWS, JWT

oauth1

Authlib exported everything into authlib.oauth1.

Before v0.11

from authlib.specs.rfc5849 import AuthorizationServer

=> v0.11

from authlib.oauth1 import AuthorizationServer

oauth2

OAuth 2.0 is a little complex, you still need to import modules from the rfcXXXX folder.

Before v0.11

from authlib.specs.rfc7523 import JWTBearerGrant

=> v0.11

from authlib.oauth2.rfc7523 import JWTBearerGrant

But there are shortcuts for the basic modules:

from authlib.oauth2 import OAuth2Error, AuthorizationServer, ResourceProtector

oidc

The authlib.specs.oidc has been renamed to authlib.oidc.core.

Before v0.11

from authlib.specs.oidc import *

=> v0.11

from authlib.oidc.core import *
@lepture
Copy link
Author

lepture commented Mar 19, 2019

Copy link

ghost commented Apr 18, 2019

Cool, only a few changes.

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