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
288 B
TypeScript
Raw Normal View History

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