-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
86 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
--- | ||
"@clerk/astro": patch | ||
"@clerk/backend": patch | ||
"@clerk/express": patch | ||
"@clerk/fastify": patch | ||
"@clerk/nextjs": patch | ||
"@clerk/remix": patch | ||
"@clerk/clerk-sdk-node": patch | ||
"@clerk/types": patch | ||
--- | ||
|
||
Move `AuthObject` and its related types to `@clerk/types`. You will now be able to import it from there. | ||
Export the type `AuthObject`. You can now use it like so: | ||
|
||
```ts | ||
import type { AuthObject } from "@clerk/backend" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@clerk/clerk-sdk-node": patch | ||
"@clerk/express": patch | ||
"@clerk/fastify": patch | ||
"@clerk/nextjs": patch | ||
"@clerk/astro": patch | ||
"@clerk/remix": patch | ||
--- | ||
|
||
Internal change: Use `AuthObject` type import from `@clerk/backend`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,7 @@ | ||
import type { ActClaim, JwtPayload } from 'jwtv2'; | ||
import type { OrganizationCustomPermissionKey, OrganizationCustomRoleKey } from 'organizationMembership'; | ||
import type { CheckAuthorizationWithCustomPermissions } from 'session'; | ||
import type { ServerGetToken } from 'ssr'; | ||
|
||
import type { JWT } from './jwt'; | ||
import type { ClerkResource } from './resource'; | ||
|
||
export interface TokenResource extends ClerkResource { | ||
jwt?: JWT; | ||
getRawString: () => string; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
export type AuthObjectDebugData = Record<string, any>; | ||
/** | ||
* @internal | ||
*/ | ||
export type AuthObjectDebug = () => AuthObjectDebugData; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export type SignedInAuthObject = { | ||
sessionClaims: JwtPayload; | ||
sessionId: string; | ||
actor: ActClaim | undefined; | ||
userId: string; | ||
orgId: string | undefined; | ||
orgRole: OrganizationCustomRoleKey | undefined; | ||
orgSlug: string | undefined; | ||
orgPermissions: OrganizationCustomPermissionKey[] | undefined; | ||
getToken: ServerGetToken; | ||
has: CheckAuthorizationWithCustomPermissions; | ||
debug: AuthObjectDebug; | ||
}; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export type SignedOutAuthObject = { | ||
sessionClaims: null; | ||
sessionId: null; | ||
actor: null; | ||
userId: null; | ||
orgId: null; | ||
orgRole: null; | ||
orgSlug: null; | ||
orgPermissions: null; | ||
getToken: ServerGetToken; | ||
has: CheckAuthorizationWithCustomPermissions; | ||
debug: AuthObjectDebug; | ||
}; | ||
|
||
export type AuthObject = SignedInAuthObject | SignedOutAuthObject; |