Skip to content

Commit

Permalink
Update 'rol' types in PrivateClaims (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairaziz authored Jul 12, 2024
1 parent 8a3f594 commit d684ade
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/poor-mice-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@quiltt/core": patch
"@quiltt/react": patch
"@quiltt/react-native": patch
---

Update 'rol' types in PrivateClaims
4 changes: 1 addition & 3 deletions packages/core/src/JsonWebToken.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { Maybe } from './types'

type AdminRole = 'manager' | 'core' | 'basic'

export type RegisteredClaims = {
iss: string // (issuer): Issuer of the JWT
sub: string // (subject): Subject of the JWT (Person ID)
Expand All @@ -18,7 +16,7 @@ export type PrivateClaims = {
cid: string // Client ID
aid: string // Administrator ID
ver: number // Session Token Version
rol: AdminRole // Administrator Role
rol: 'basic' | 'core' | 'manager' | 'super-admin' // Administrator Role
}

export type Claims<T> = RegisteredClaims & T
Expand Down

0 comments on commit d684ade

Please sign in to comment.