Exemplo n.º 1
0
        public KeysListPostResponse DirectoryV3ServiceKeysListPost(ServiceKeysListPostRequest request, EntityIdentifier subject)
        {
            var response          = ExecuteRequest(HttpMethod.POST, "/directory/v3/service/keys/list", subject, request, null);
            var decryptedResponse = DecryptResponse <List <KeysListPostResponse.Key> >(response);

            return(new KeysListPostResponse(decryptedResponse));
        }
Exemplo n.º 2
0
        public List <PublicKey> GetServicePublicKeys(Guid serviceId)
        {
            var request  = new ServiceKeysListPostRequest(serviceId);
            var response = _transport.DirectoryV3ServiceKeysListPost(request, _directoryId);
            var keys     = new List <PublicKey>();

            foreach (var transportKey in response.PublicKeys)
            {
                keys.Add(new PublicKey(
                             transportKey.Id,
                             transportKey.Active,
                             transportKey.Created,
                             transportKey.Expires
                             ));
            }

            return(keys);
        }