Skip to content

Instantly share code, notes, and snippets.

@lepture lepture/SP.md Secret
Created Mar 19, 2019

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

This comment has been minimized.

Copy link
Owner Author

lepture commented Mar 19, 2019

@Sphinxs

This comment has been minimized.

Copy link

Sphinxs 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
You can’t perform that action at this time.