Exemplo n.º 1
0
        /// <summary>
        /// Login to ACL Auth Method
        /// </summary>
        /// <param name="writeOptions"></param>
        /// <param name="ct">Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing</param>
        /// <returns>>A write result containing an ACL Token for the login</returns>
        public async Task <WriteResult <TokenEntry> > Login(WriteOptions writeOptions, CancellationToken ct = default(CancellationToken))
        {
            var res = await _client.PutReturning <TokenEntry>("/v1/acl/login", writeOptions).Execute(ct).ConfigureAwait(false);

            return(new WriteResult <TokenEntry>(res, res.Response));
        }
Exemplo n.º 2
0
 public Task <WriteResult <bool> > Destroy(string id, WriteOptions q, CancellationToken ct = default(CancellationToken))
 {
     return(_client.PutReturning <bool>(string.Format("/v1/acl/destroy/{0}", id), q).Execute(ct));
 }