forked from Github-Mirrors/canaille
17 lines
372 B
Python
17 lines
372 B
Python
from authlib.jose import JsonWebKey
|
|
|
|
|
|
def test_jwks(testclient, keypair):
|
|
_, pubkey = keypair
|
|
jwk = JsonWebKey.import_key(pubkey, {"kty": "RSA"})
|
|
|
|
res = testclient.get("/oauth/jwks.json")
|
|
assert res.json == {
|
|
"keys": [
|
|
{
|
|
"use": "sig",
|
|
"alg": "RS256",
|
|
**jwk,
|
|
}
|
|
]
|
|
}
|