GRAPHQL_JWT_SECRET_KEY
. If you plug a Ghostwriter JWT into a debugger like the one at https://jwt.io/, you will see something similar to the following:
Login
action. The resulting JWT holds the same privileges as the authenticated user. The user JWTs are valid for 15 minutes.
Login
action is disabled for accounts with 2FA configured. An account with 2FA should use a generated API token (see below).Login
action is they have user-defined expiration dates. They are intended to be used for long-running automation tasks.
Authorization
header: Authorization: Bearer TOKEN
Hasura will connect to an authentication webhook before a request. The webhook takes several steps to thoroughly examine the JWT before allowing a request to proceed:
200 OK
response with your requested data.
If the token is not accepted, the authorization webhook will return a 401 Unauthorized
response with an error like this:
public
role with the username anonymous
. This is not a real user or role and is only used to manage access to resources designed to be accessed without authentication.
The only action available for this anonymous
user is the Login
action.