Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d360e1f

Browse files
committed
Add Users class
1 parent fa75717 commit d360e1f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

auth0/v2/authentication/users.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from .base import AuthenticationBase
2+
3+
4+
class Users(AuthenticationBase):
5+
6+
def __init__(self, domain):
7+
self.domain = domain
8+
9+
def userinfo(self, access_token):
10+
return self.get(
11+
url='https://%s/userinfo' % self.domain,
12+
headers={'Authorization': 'Bearer %s' % access_token}
13+
)
14+
15+
def tokeninfo(self, jwt):
16+
return self.post(
17+
url='https://%s/tokeninfo' % self.domain,
18+
data={'id_token': jwt},
19+
headers={'Content-Type: application/json'}
20+
)

0 commit comments

Comments
 (0)