Forked from nilsdebruin/fastapi_google_authentication_imports.py
Created
June 2, 2019 13:30
-
-
Save francbartoli/fc9099a390cb56549d10f6fc88b95227 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional | |
from datetime import datetime, timedelta | |
import jwt | |
from jwt import PyJWTError | |
from fastapi import Depends, FastAPI, HTTPException | |
from fastapi.encoders import jsonable_encoder | |
from fastapi.security.oauth2 import ( | |
OAuth2, | |
OAuthFlowsModel, | |
get_authorization_scheme_param, | |
) | |
from fastapi.openapi.docs import get_swagger_ui_html | |
from fastapi.openapi.utils import get_openapi | |
from starlette.status import HTTP_403_FORBIDDEN | |
from starlette.responses import RedirectResponse, JSONResponse, HTMLResponse | |
from starlette.requests import Request | |
from pydantic import BaseModel | |
import httplib2 | |
from oauth2client import client | |
from google.oauth2 import id_token | |
from google.auth.transport import requests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment