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/Tokens.ts

12 lines
288 B
TypeScript
Raw Normal View History

2020-12-16 22:02:43 +00:00
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
);
}