Skip to content

Commit

Permalink
feat: Expose act claim
Browse files Browse the repository at this point in the history
Added the `act` claim into the session claims.
  • Loading branch information
alex-ntousias committed Nov 3, 2023
1 parent 7ea00b4 commit 3372ea1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions clerk/tokens.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package clerk

import (
"encoding/json"
"fmt"
"time"

Expand All @@ -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.
Expand Down

0 comments on commit 3372ea1

Please sign in to comment.