File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,11 +9,21 @@ title: PostGraphile JWT Guide
99> project. The language of the specification is meant to be generally applicable
1010> and adoptable by any who might want to use it.
1111
12+ ** NOTE** : what follows is a specification of how you can use JWTs to authenticate a user
13+ with PostgreSQL such that PostgreSQL may perform your authorization checks. This
14+ is not the only way of achieving this goal with PostGraphile, for example you
15+ can do as the PostGraphile maintainer does and use standard session-based
16+ authentication (i.e. with cookies) via the relevant Express/Koa/Fastify middleware
17+ and PostGraphile's [ ` pgSettings ` function] ( /postgraphile/usage-library/#pgsettings-function )
18+ allowing you to leverage powerful pre-built authentication stacks such as
19+ [ passport.js] ( http://www.passportjs.org/ ) which has OAuth integration with most
20+ major "social login" providers.
21+
1222## PostgreSQL JSON Web Token Serialization Specification
1323
1424This specification aims to define a standard way to serialize [ JSON Web
1525Tokens] [ jwt ] (JWT, [ RFC 7519] [ rfc7519 ] ) to a PostgreSQL database for developers
16- who want to move authentication logic into their PostgreSQL schema.
26+ who want to move authorization logic into their PostgreSQL schema.
1727
1828[ Terminology] [ jwt-terms ] from the JSON Web Token specification will be used.
1929
You can’t perform that action at this time.
0 commit comments