@nextcloud/auth
Version:
Nextcloud helpers related to authentication and the current user
16 lines (15 loc) • 417 B
TypeScript
export interface CsrfTokenObserver {
(token: string): void;
}
/**
* Get current request token
*
* @return {string|null} Current request token or null if not set
*/
export declare function getRequestToken(): string | null;
/**
* Add an observer which is called when the CSRF token changes
*
* @param observer The observer
*/
export declare function onRequestTokenUpdate(observer: CsrfTokenObserver): void;