Exemplo n.º 1
0
 def replace_service_key(self, old_kid, kid, jwk, metadata,
                         expiration_date):
     try:
         data.model.service_keys.replace_service_key(
             old_kid, kid, jwk, metadata, expiration_date)
     except data.model.ServiceKeyDoesNotExist:
         raise ServiceKeyDoesNotExist()
Exemplo n.º 2
0
 def get_service_key(self,
                     signer_kid,
                     service=None,
                     alive_only=True,
                     approved_only=True):
     try:
         key = data.model.service_keys.get_service_key(
             signer_kid, service, alive_only, approved_only)
         return _db_key_to_servicekey(key)
     except data.model.ServiceKeyDoesNotExist:
         raise ServiceKeyDoesNotExist()
Exemplo n.º 3
0
 def delete_service_key(self, kid):
     try:
         key = data.model.service_keys.delete_service_key(kid)
         return _db_key_to_servicekey(key)
     except data.model.ServiceKeyDoesNotExist:
         raise ServiceKeyDoesNotExist()