Skip to content

Commit

Permalink
fix(docs): clarify jwtRole is JSON path components (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
bidoubiwa authored and benjie committed Aug 6, 2019
1 parent 4025068 commit d6c5a78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ export interface PostGraphileOptions<
// null.
/* @middlewareOnly */
jwtVerifyOptions?: jwt.VerifyOptions;
// A comma separated list of strings that give a path in the jwt from which
// to extract the postgres role. If none is provided it will use the key
// `role` on the root of the jwt.
// An array of (strings) path components that make up the path in the jwt from which to extract the postgres role.
// By default, the role is extracted from `token.role`, so the default value is `['role']`.
// e.g. `{ iat: 123456789, creds: { local: { role: "my_role" } } }`
// the path would be `token.creds.local.role` i.e. `['creds', 'local', 'role']`
/* @middlewareOnly */
jwtRole?: Array<string>;
// The Postgres type identifier for the compound type which will be signed as
Expand Down

0 comments on commit d6c5a78

Please sign in to comment.