Giter VIP home page Giter VIP logo

authlib's Introduction

Authlib

Build Status Coverage Status PyPI Version Maintainability Follow Twitter

The ultimate Python library in building OAuth and OpenID Connect servers. JWS, JWK, JWA, JWT are included.

Authlib is compatible with Python2.7+ and Python3.6+.

authorization_server.register_grant(AuthorizationCodeGrant)
authorization_server.register_grant(ImplicitGrant)
authorization_server.register_grant(ResourceOwnerPasswordGrant)
authorization_server.register_grant(ClientCredentialsGrant)
authorization_server.register_grant(RefreshTokenGrant)
authorization_server.register_grant(AuthorizationCodeGrant, [OpenIDCode()])
authorization_server.register_grant(OpenIDImplicitGrant)
authorization_server.register_grant(OpenIDHybridGrant)
authorization_server.register_endpoint(RevocationEndpoint)
authorization_server.register_endpoint(IntrospectionEndpoint)

Sponsors

If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0's Python SDK and free plan at auth0.com/overview.
For quickly implementing token-based authencation, feel free to check Authing's Python SDK.
Get professionally-supported Authlib with the Tidelift Subscription.

Support Me via GitHub Sponsors.

Useful Links

  1. Homepage: https://authlib.org/.
  2. Documentation: https://docs.authlib.org/.
  3. Purchase Commercial License: https://authlib.org/plans.
  4. Blog: https://blog.authlib.org/.
  5. Twitter: https://twitter.com/authlib.
  6. StackOverflow: https://stackoverflow.com/questions/tagged/authlib.
  7. Other Repositories: https://github.com/authlib.
  8. Subscribe Tidelift: https://tidelift.com/subscription/pkg/pypi-authlib.

Spec Implementations

Lovely features that Authlib has built-in:

๐ŸŽ‰ RFC5849: The OAuth 1.0 Protocol
  • OAuth1Session for Requests
  • OAuth1Client for HTTPX
  • OAuth 1.0 Client for Flask
  • OAuth 1.0 Client for Django
  • OAuth 1.0 Server for Flask
  • OAuth 1.0 Server for Django
๐ŸŽ‰ RFC6749: The OAuth 2.0 Authorization Framework
  • OAuth2Session for Requests
  • OAuth2Client for HTTPX
  • OAuth 2.0 Client for Flask
  • OAuth 2.0 Client for Django
  • OAuth 2.0 Server for Flask
  • OAuth 2.0 Server for Django
๐ŸŽ‰ RFC6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage
  • Bearer Token for OAuth2Session
  • Bearer Token for Flask provider
  • Bearer Token for Django provider
๐ŸŽ‰ RFC7009: OAuth 2.0 Token Revocation
  • Token Revocation for Flask provider
  • Token Revocation for Django provider
๐ŸŽ‰ RFC7515: JSON Web Signature (JWS)
  • Compact serialize and deserialize
  • JSON serialize and deserialize
๐ŸŽ‰ RFC7516: JSON Web Encryption (JWE)
  • Compact serialize and deserialize
  • JSON serialize and deserialize
๐ŸŽ‰ RFC7517: JSON Web Key (JWK)
  • "oct" algorithm via RFC7518
  • "RSA" algorithm via RFC7518
  • "EC" algorithm via RFC7518
๐ŸŽ‰ RFC7518: JSON Web Algorithms (JWA)
  • Algorithms for JWS
  • Algorithms for JWE (some of them)
  • Algorithms for JWK
๐ŸŽ‰ RFC7519: JSON Web Token (JWT)
  • Use JWS for JWT
  • Use JWE for JWT
  • Payload claims validation
๐ŸŽ‰ RFC7521: Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants
  • Common Client for Assertion Framework
  • Common Server for Assertion Framework
โณ RFC7522: Security Assertion Markup Language (SAML) 2.0 Profile for OAuth 2.0 Client Authentication and Authorization Grants

RFC7522 will not be included in Authlib.

๐ŸŽ‰ RFC7523: JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants
  • Using JWTs as Client Authorization
  • Using JWTs as Authorization Grants
๐ŸŽ‰ RFC7591: OAuth 2.0 Dynamic Client Registration Protocol
  • Dynamic Client Registration Endpoint for Flask OAuth 2.0 Server
  • Dynamic Client Registration Endpoint for Django OAuth 2.0 Server
โณ RFC7592: OAuth 2.0 Dynamic Client Registration Management Protocol

RFC7592 implementation is in plan.

๐ŸŽ‰ RFC7636: Proof Key for Code Exchange by OAuth Public Clients
  • Requests, HTTPX, Flask, Django, Starlette integrations
  • Server side grant implementation
๐ŸŽ‰ RFC7662: OAuth 2.0 Token Introspection
  • Token Introspection for Flask OAuth 2.0 Server
  • Token Introspection for Django OAuth 2.0 Server
โณ RFC7797: JSON Web Signature (JWS) Unencoded Payload Option

RFC7797 implementation is in plan.

๐ŸŽ‰ RFC8414: OAuth 2.0 Authorization Server Metadata
  • Authorization Server Metadata Model
  • Well Known URI
  • Framework integrations
๐ŸŽ‰ RFC8628: OAuth 2.0 Device Authorization Grant
  • Device Authorization Endpoint
  • Device Code Grant
๐ŸŽ‰ OpenID Connect Core 1.0
  • OpenID Code Flow
  • OpenID Implicit Flow
  • OpenID Hybrid Flow
  • OpenID Claims validation
  • Form Post Response Mode
  • OpenID Connect for Flask OAuth 2.0 Server
  • OpenID Connect for Django OAuth 2.0 Server
๐ŸŽ‰ OpenID Connect Discovery 1.0
  • OpenID Provider Metadata Model
  • Well Known URI
  • Framework integrations

And more will be added.

Framework Integrations

Framework integrations with current specification implementations:

  • Requests OAuth 1/2 Session
  • Requests Assertion Session
  • HTTPX sync/async OAuth 1/2 Session
  • HTTPX sync/async Assertion Session
  • Flask OAuth 1/2 Client
  • Django OAuth 1/2 Client
  • Starlette OAuth 1/2 Client
  • Flask OAuth 1.0 Provider
  • Flask OAuth 2.0 Provider
  • Flask OpenID Connect 1.0
  • Django OAuth 1.0 Provider
  • Django OAuth 2.0 Provider
  • Django OpenID Connect 1.0

Security Reporting

If you found security bugs, please do not send a public issue or patch. You can send me email at [email protected]. Attachment with patch is welcome. My PGP Key fingerprint is:

72F8 E895 A70C EBDF 4F2A DFE0 7E55 E3E0 118B 2B4C

Or, you can use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

License

Authlib offers two licenses:

  1. BSD for open source projects
  2. Commercial license for closed source projects

Companies can purchase a commercial license at Authlib Plans.

Support

If you need any help, you can always ask questions on StackOverflow with a tag of "Authlib". DO NOT ASK HELP IN GITHUB ISSUES.

We also provide commercial consulting and supports. You can find more information at https://authlib.org/support.

authlib's People

Contributors

lepture avatar greyli avatar pablogamboa avatar aparamon avatar anikolaienko avatar venthur avatar flokli avatar hammygoonan avatar hsgkim avatar steelwalrus avatar jimmy-lt avatar jcassee avatar kbirkeland avatar leogout avatar d1c3 avatar mjos avatar nfvs avatar pmarti avatar rostikl avatar soasme avatar timgates42 avatar lawliet89 avatar aradnaev avatar jonathanunderwood avatar nebularazer avatar timfeirg avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.