@mastra/auth-cloud 1.2.6-alpha.0 → 1.2.7-alpha.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.
|
@@ -50,6 +50,14 @@ export interface IMastraAuthProvider<TUser = unknown> {
|
|
|
50
50
|
* Map an authenticated user to a memory resource id
|
|
51
51
|
*/
|
|
52
52
|
mapUserToResourceId?(user: TUser): string | undefined | null;
|
|
53
|
+
/**
|
|
54
|
+
* Return response headers (typically `Set-Cookie` for a rotated session)
|
|
55
|
+
* that the provider accumulated while handling this request and clear them
|
|
56
|
+
* from the provider's per-request state. The server middleware appends them
|
|
57
|
+
* to the outgoing response so that server-to-server session refreshes
|
|
58
|
+
* reach the browser.
|
|
59
|
+
*/
|
|
60
|
+
consumePendingResponseHeaders?(request: MastraAuthRequest): Record<string, string> | undefined;
|
|
53
61
|
}
|
|
54
62
|
export declare abstract class MastraAuthProvider<TUser = unknown> extends MastraBase implements IMastraAuthProvider<TUser> {
|
|
55
63
|
protected?: MastraAuthConfig['protected'];
|
|
@@ -97,6 +105,7 @@ export declare class CompositeAuth extends MastraAuthProvider implements ISSOPro
|
|
|
97
105
|
*/
|
|
98
106
|
get isSimpleAuth(): boolean;
|
|
99
107
|
authenticateToken(token: string, request: MastraAuthRequest): Promise<unknown | null>;
|
|
108
|
+
consumePendingResponseHeaders(request: MastraAuthRequest): Record<string, string> | undefined;
|
|
100
109
|
authorizeUser(user: unknown, request: MastraAuthRequest): Promise<boolean>;
|
|
101
110
|
/**
|
|
102
111
|
* Forward cookie header to SSO provider for PKCE validation.
|