@absolutejs/auth 0.70.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ import { type AccessTokenPrincipalConfig, type AuthPrincipal } from './principal';
2
+ /** The context shared by authenticated WebSocket and finite HTTP Sync work. */
3
+ export type AbsoluteAuthSyncContext<UserType> = {
4
+ authPrincipal: AuthPrincipal<UserType>;
5
+ user: UserType;
6
+ };
7
+ /**
8
+ * Capability consumed by @absolutejs/sync without taking a package dependency
9
+ * on Auth. Keeping both credential forms behind one bridge guarantees that a
10
+ * socket ticket and a background bearer token produce the same application
11
+ * context shape.
12
+ */
13
+ export type AbsoluteAuthSyncBridge<UserType> = {
14
+ consumeSocketTicket: (input: {
15
+ audience?: string;
16
+ ticket: string;
17
+ }) => Promise<AbsoluteAuthSyncContext<UserType> | undefined>;
18
+ resolveBearer: (input: {
19
+ authorization?: string;
20
+ }) => Promise<AbsoluteAuthSyncContext<UserType> | undefined>;
21
+ };
22
+ export declare const createAbsoluteAuthSyncBridge: <UserType>(accessTokens: AccessTokenPrincipalConfig<UserType>) => AbsoluteAuthSyncBridge<UserType>;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.70.0",
2
+ "version": "0.71.0",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {