UNPKG

@rockcarver/frodo-lib

Version:

A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.

50 lines 2.17 kB
import { AxiosRequestConfig, AxiosResponse } from 'axios'; import { type AccessTokenResponseType } from '../api/OAuth2OIDCApi'; import { TokenInfoResponseType } from '../api/OAuth2OIDCApi'; import { State } from '../shared/State'; export type AccessTokenMetaType = AccessTokenResponseType & { expires: number; from_cache?: boolean; }; export type OAuth2Oidc = { authorize(amBaseUrl: string, data: string, config: AxiosRequestConfig): Promise<AxiosResponse<any, any>>; accessToken(amBaseUrl: string, data: any, config: AxiosRequestConfig): Promise<AccessTokenMetaType>; accessTokenRfc7523AuthZGrant(clientId: string, jwt: string, scope: string[], config?: AxiosRequestConfig): Promise<AccessTokenMetaType>; getTokenInfo(amBaseUrl: string, config: AxiosRequestConfig): Promise<TokenInfoResponseType>; clientCredentialsGrant(amBaseUrl: string, clientId: string, clientSecret: string, scope: string): Promise<AccessTokenMetaType>; }; declare const _default: (state: State) => OAuth2Oidc; export default _default; export declare function authorize({ amBaseUrl, data, config, state, }: { amBaseUrl: string; data: string; config: AxiosRequestConfig; state: State; }): Promise<AxiosResponse<any, any>>; export declare function accessToken({ amBaseUrl, data, config, realm, state, }: { amBaseUrl: string; data: any; config: AxiosRequestConfig; realm?: boolean; state: State; }): Promise<AccessTokenMetaType>; export declare function accessTokenRfc7523AuthZGrant({ clientId, jwt, scope, config, state, }: { clientId: string; jwt: string; scope: string[]; config?: AxiosRequestConfig; state: State; }): Promise<AccessTokenMetaType>; export declare function getTokenInfo({ amBaseUrl, config, state, }: { amBaseUrl: string; config: AxiosRequestConfig; state: State; }): Promise<TokenInfoResponseType>; export declare function clientCredentialsGrant({ amBaseUrl, clientId, clientSecret, scope, state, }: { amBaseUrl: string; clientId: string; clientSecret: string; scope: string; state: State; }): Promise<AccessTokenMetaType>; //# sourceMappingURL=OAuth2OidcOps.d.ts.map