Merge pull request #2035 from jzelinskie/kids
key server: add kid to services JWKs
This commit is contained in:
commit
ea5039877c
1 changed files with 7 additions and 1 deletions
|
@ -61,7 +61,13 @@ def _lookup_service_key(service, signer_kid, approved_only=True):
|
|||
@key_server.route('/services/<service>/keys', methods=['GET'])
|
||||
def list_service_keys(service):
|
||||
keys = model.list_service_keys(service)
|
||||
return jsonify({'keys': [key.jwk for key in keys]})
|
||||
|
||||
def jwk_with_kid(key):
|
||||
jwk = key.jwk
|
||||
jwk.update({'kid': key.kid})
|
||||
return jwk
|
||||
|
||||
return jsonify({'keys': [jwk_with_kid(key) for key in keys]})
|
||||
|
||||
|
||||
@key_server.route('/services/<service>/keys/<kid>', methods=['GET'])
|
||||
|
|
Reference in a new issue