diff --git a/NineChronicles.Headless/GraphTypes/StandaloneQuery.cs b/NineChronicles.Headless/GraphTypes/StandaloneQuery.cs index 413d20e12..869f38e04 100644 --- a/NineChronicles.Headless/GraphTypes/StandaloneQuery.cs +++ b/NineChronicles.Headless/GraphTypes/StandaloneQuery.cs @@ -31,6 +31,10 @@ public class StandaloneQuery : ObjectGraphType public StandaloneQuery(StandaloneContext standaloneContext, IConfiguration configuration, ActionEvaluationPublisher publisher, StateMemoryCache stateMemoryCache) { bool useSecretToken = configuration[GraphQLService.SecretTokenKey] is { }; + if (Convert.ToBoolean(configuration.GetSection("Jwt")["EnableJwtAuthentication"])) + { + this.AuthorizeWith(GraphQLService.JwtPolicyKey); + } Field>(name: "stateQuery", arguments: new QueryArguments( new QueryArgument