@nextcloud/auth
Version:
Nextcloud helpers related to authentication and the current user
20 lines (19 loc) • 530 B
TypeScript
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
export interface CsrfTokenObserver {
(token: string): void;
}
/**
* Get current request token
*
* @return 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;