From 3372ea17dd6d7ff1c40cf07140f5a93130064c27 Mon Sep 17 00:00:00 2001 From: Alexandros Ntousias Date: Fri, 3 Nov 2023 11:04:30 +0200 Subject: [PATCH] feat: Expose act claim Added the `act` claim into the session claims. --- clerk/tokens.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/clerk/tokens.go b/clerk/tokens.go index 4ac2dbad..4a852955 100644 --- a/clerk/tokens.go +++ b/clerk/tokens.go @@ -1,6 +1,7 @@ package clerk import ( + "encoding/json" "fmt" "time" @@ -17,11 +18,12 @@ type TokenClaims struct { type SessionClaims struct { jwt.Claims - SessionID string `json:"sid"` - AuthorizedParty string `json:"azp"` - ActiveOrganizationID string `json:"org_id"` - ActiveOrganizationSlug string `json:"org_slug"` - ActiveOrganizationRole string `json:"org_role"` + SessionID string `json:"sid"` + AuthorizedParty string `json:"azp"` + ActiveOrganizationID string `json:"org_id"` + ActiveOrganizationSlug string `json:"org_slug"` + ActiveOrganizationRole string `json:"org_role"` + Actor json.RawMessage `json:"act,omitempty"` } // DecodeToken decodes a jwt token without verifying it.