From 2882f296cd59aa1340c4c3f50cf45e6158579ec3 Mon Sep 17 00:00:00 2001 From: Georgiy Eterevskiy <goshik_e@mail.ru> Date: Wed, 7 Apr 2021 17:31:12 +0300 Subject: [PATCH] Rename `OAuth2Gateway` to `OAuth2Plugin` --- README.md | 4 ++-- perxis/auth.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 90d7618..d89614f 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,11 @@ stub.FooRpc(request, credentials=call_credentials) ```python import grpc -from auth import OAuth2Gateway +from auth import OAuth2Plugin from users.users_pb2 import GetRequest from users.users_pb2_grpc import UsersStub -oauth2_plugin = OAuth2Gateway( +oauth2_plugin = OAuth2Plugin( client_id='client_id', client_secret='client_secret', token_url='https://example.com/oauth/token', audience='audience' ) diff --git a/perxis/auth.py b/perxis/auth.py index a8cda9b..dcbaf6e 100644 --- a/perxis/auth.py +++ b/perxis/auth.py @@ -6,7 +6,7 @@ from oauthlib.oauth2 import BackendApplicationClient, OAuth2Token from requests_oauthlib import OAuth2Session -class OAuth2Gateway(grpc.AuthMetadataPlugin): +class OAuth2Plugin(grpc.AuthMetadataPlugin): _token = None def __init__(self, client_id: str, client_secret: str, token_url: str, audience: str, -- GitLab