Skip to content
Snippets Groups Projects
Commit 2882f296 authored by Georgiy Eterevskiy's avatar Georgiy Eterevskiy
Browse files

Rename `OAuth2Gateway` to `OAuth2Plugin`

parent 82e9747a
No related branches found
No related tags found
No related merge requests found
......@@ -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'
)
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment