Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-python
Manage
Activity
Members
Plan
Custom issue tracker
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-python
Commits
2882f296
Commit
2882f296
authored
4 years ago
by
Georgiy Eterevskiy
Browse files
Options
Downloads
Patches
Plain Diff
Rename `OAuth2Gateway` to `OAuth2Plugin`
parent
82e9747a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-2
2 additions, 2 deletions
README.md
perxis/auth.py
+1
-1
1 addition, 1 deletion
perxis/auth.py
with
3 additions
and
3 deletions
README.md
+
2
−
2
View file @
2882f296
...
...
@@ -53,11 +53,11 @@ stub.FooRpc(request, credentials=call_credentials)
```
python
import
grpc
from
auth
import
OAuth2
Gateway
from
auth
import
OAuth2
Plugin
from
users.users_pb2
import
GetRequest
from
users.users_pb2_grpc
import
UsersStub
oauth2_plugin
=
OAuth2
Gateway
(
oauth2_plugin
=
OAuth2
Plugin
(
client_id
=
'
client_id
'
,
client_secret
=
'
client_secret
'
,
token_url
=
'
https://example.com/oauth/token
'
,
audience
=
'
audience
'
)
...
...
This diff is collapsed.
Click to expand it.
perxis/auth.py
+
1
−
1
View file @
2882f296
...
...
@@ -6,7 +6,7 @@ from oauthlib.oauth2 import BackendApplicationClient, OAuth2Token
from
requests_oauthlib
import
OAuth2Session
class
OAuth2
Gateway
(
grpc
.
AuthMetadataPlugin
):
class
OAuth2
Plugin
(
grpc
.
AuthMetadataPlugin
):
_token
=
None
def
__init__
(
self
,
client_id
:
str
,
client_secret
:
str
,
token_url
:
str
,
audience
:
str
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment