forked from aws/aws-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppSyncAuthorizerResult.cs
More file actions
33 lines (29 loc) · 1.05 KB
/
AppSyncAuthorizerResult.cs
File metadata and controls
33 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.Text.Json.Serialization;
namespace Amazon.Lambda.AppSyncEvents;
/// <summary>
/// Represents the authorization result returned by a Lambda authorizer to AWS AppSync
/// containing authorization decisions and optional context for the GraphQL API.
/// </summary>
public class AppSyncAuthorizerResult
{
/// <summary>
/// Indicates if the request is authorized
/// </summary>
[JsonPropertyName("isAuthorized")]
public bool IsAuthorized { get; set; }
/// <summary>
/// Custom context to pass to resolvers, only supports key-value pairs.
/// </summary>
[JsonPropertyName("resolverContext")]
public Dictionary<string, string> ResolverContext { get; set; }
/// <summary>
/// List of fields that are denied access
/// </summary>
[JsonPropertyName("deniedFields")]
public IEnumerable<string> DeniedFields { get; set; }
/// <summary>
/// The number of seconds that the response should be cached for
/// </summary>
[JsonPropertyName("ttlOverride")]
public int? TtlOverride { get; set; }
}