Skip to content

Add decode_access_token to client #768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use double quotes to conform to codebase standards
  • Loading branch information
Aetylus committed May 1, 2025
commit fef9e3e960f21358ba255e84b6be2e247064a991
36 changes: 18 additions & 18 deletions tests/clients/test_starlette/test_oauth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,18 @@ async def test_oauth2_decode_access_token():
)

header = {
'alg': 'RS256',
'typ': 'at+jwt',
"alg": "RS256",
"typ": "at+jwt",
}
now = int(time.time())
access_token = {
'iss': 'https://i.b',
'exp': now + 3600,
'aud': 'dev',
'sub': '123',
'client_id': '123',
'iat': now,
'jti': '123',
"iss": "https://i.b",
"exp": now + 3600,
"aud": "dev",
"sub": "123",
"client_id": "123",
"iat": now,
"jti": "123",
}
token = to_native(jwt.encode(header, access_token, secret_key))

Expand All @@ -367,18 +367,18 @@ async def test_oauth2_invalid_access_token():
)

header = {
'alg': 'RS256',
'typ': 'at+jwt',
"alg": "RS256",
"typ": "at+jwt",
}
now = int(time.time())
access_token = {
'iss': 'https://i.b',
'exp': now + 3600,
'aud': 'invalid', # aud does not equal client_id
'sub': '123',
'client_id': '123',
'iat': now,
'jti': '123',
"iss": "https://i.b",
"exp": now + 3600,
"aud": "invalid", # aud does not equal client_id
"sub": "123",
"client_id": "123",
"iat": now,
"jti": "123",
}
token = to_native(jwt.encode(header, access_token, secret_key))

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy