diff --git a/README.md b/README.md index 90d7618ecedc2c547f0f43ade14299cef730c543..d89614f91e67cff6cb7c4c789407fec3a177a401 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 a8cda9baa9e8d86552be4844ff2bbfb167b4dcb8..dcbaf6e552bd8312cf1f47246be5d8ee68872a0a 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,