add auth_time in id_token
This commit is contained in:
parent
f6e71436ec
commit
efddc68764
|
@ -28,6 +28,7 @@ def make_id_token(client_user: ClientUser):
|
|||
"aud": client_user.client.oauth_client_id,
|
||||
"exp": arrow.now().shift(hours=1).timestamp,
|
||||
"iat": arrow.now().timestamp,
|
||||
"auth_time": arrow.now().timestamp,
|
||||
}
|
||||
|
||||
claims = {**claims, **client_user.get_user_info()}
|
||||
|
|
|
@ -159,13 +159,13 @@ def test_authorize_code_flow_no_openid_scope(flask_client):
|
|||
assert len(queries["code"]) == 1
|
||||
|
||||
# Exchange the code to get access_token
|
||||
valid_credentials = base64.b64encode(
|
||||
basic_auth_headers = base64.b64encode(
|
||||
f"{client.oauth_client_id}:{client.oauth_client_secret}".encode()
|
||||
).decode("utf-8")
|
||||
|
||||
r = flask_client.post(
|
||||
url_for("oauth.token"),
|
||||
headers={"Authorization": "Basic " + valid_credentials},
|
||||
headers={"Authorization": "Basic " + basic_auth_headers},
|
||||
data={"grant_type": "authorization_code", "code": queries["code"][0]},
|
||||
)
|
||||
|
||||
|
@ -245,13 +245,13 @@ def test_authorize_code_flow_with_openid_scope(flask_client):
|
|||
assert len(queries["code"]) == 1
|
||||
|
||||
# Exchange the code to get access_token
|
||||
valid_credentials = base64.b64encode(
|
||||
basic_auth_headers = base64.b64encode(
|
||||
f"{client.oauth_client_id}:{client.oauth_client_secret}".encode()
|
||||
).decode("utf-8")
|
||||
|
||||
r = flask_client.post(
|
||||
url_for("oauth.token"),
|
||||
headers={"Authorization": "Basic " + valid_credentials},
|
||||
headers={"Authorization": "Basic " + basic_auth_headers},
|
||||
data={"grant_type": "authorization_code", "code": queries["code"][0]},
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue