canaille-globuzma/tests/oidc/test_jwks.py
2022-12-11 14:57:26 +01:00

18 lines
373 B
Python

from authlib.jose import jwk
def test_jwks(testclient, keypair):
_, pubkey = keypair
obj = jwk.dumps(pubkey, "RSA")
res = testclient.get("/oauth/jwks.json")
assert res.json == {
"keys": [
{
"kid": None,
"use": "sig",
"alg": "RS256",
**obj,
}
]
}