예제 #1
0
        /// <summary>
        /// Stores the async.
        /// </summary>
        /// <returns>The async.</returns>
        /// <param name="grant">Grant.</param>
        public async Task StoreAsync(PersistedGrant grant)
        {
            try
            {
                using (var context = new DynamoDBContext(client, ddbConfig))
                {
                    await context.SaveAsync <PersistedGrantDynamoDB>(grant.GetPersistedGrantDynamoDB());
                }
            }
            catch (Exception ex)
            {
                logger.LogError(default(EventId), ex, "PersistedGrantRepository.StoreAsync failed with PersistedGrant {grant}", grant);
                await Task.FromException(ex);

                return;
            }

            await Task.CompletedTask;
        }