Socket
Socket
Sign inDemoInstall

@theydo/graphql-directive-requires-authentication

Package Overview
Dependencies
14
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.6 to 0.1.7

2

package.json
{
"name": "@theydo/graphql-directive-requires-authentication",
"version": "0.1.6",
"version": "0.1.7",
"description": "GraphQL directive for checking authentication through context",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# GraphQL Directive: @requiresAuthentication
This directive will throw an AuthenticationError if the context of the query operation
that implements this directive does not meet the criteria of "being authenticated".
The point of this directive is not to validate JWT tokens, since this is frequently
a project-specific implementation. Instead it is expected that resolving token status
is done in the Apollo getContext hook, where the validated token is used to extend
the context object (user information).
This directive will only assert the "isAuthenticated" status coming from the context
object.
## Usage

@@ -7,0 +12,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc