This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src/api/token.ts

12 lines
286 B
TypeScript
Raw Normal View History

import { DefaultClient } from "./client";
interface TokenResponse {
key: string;
}
export function tokenByIdentifier(identifier: string): Promise<string> {
2020-11-26 22:35:59 +00:00
return DefaultClient.fetch<TokenResponse>("core", "tokens", identifier, "view_key").then(
(r) => r.key
);
}