Coder Social home page Coder Social logo

oauth2lib's Introduction

oauth2lib

Python OAuth 2.0 Client and Provider Library

Authorization Code Grant :: OAuth 2 Section 4.1

Authorization Request :: OAuth 2 Section 4.1.1

    [For browser apps this happens in the window]
    Request: GET /get_authorization_code
                    ?response_type=code
                    &client_id={CLIENT_ID}
                    &redirect_uri={REDIRECT_URI}
                    [&state={STATE}]
                    [&scope={SCOPE}]

    Response: HTTP 302
                Location={REDIRECT_URI}
                    ?code={CODE}
                    &state={STATE}

    Error Response: HTTP 302
                Location={REDIRECT_URI}
                    ?error=access_denied
                    &state={STATE}

Access Token Request :: OAuth 2 Section 4.1.3

    [Server side only]
    Request: GET /get_access_token
                    ?grant_type=authorization_code
                    &client_id={CLIENT_ID}
                    &client_secret={CLIENT_SECRET}
                    &redirect_uri={REDIRECT_URI}
                    &code={CODE}

    Response: HTTP 200
                {
                   "access_token": "{ACCESS_TOKEN}",
                   "token_type": "{TOKEN_TYPE}",      // See OAuth 2 Section 7.1 Access Token Types
                   "expires_in": 3600,
                   "refresh_token": "{REFRESH_TOKEN}"
                 }

    Error Response: HTTP 400
                {
                    "error": "access_denied",
                    "error_description": "User does not have access to the team."
                }

oauth2lib's People

Contributors

ivotkv avatar mattspitz avatar nateferrero avatar stran12 avatar

Watchers

 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.