UNPKG

bento-auth-js

Version:

Authentication library for web applications of Bento-Platform

31 lines (30 loc) 1.14 kB
import { AnyAction } from "redux"; import { ThunkAction } from "redux-thunk"; import { RootState } from "./store"; type OpenIdConfigPayload = { issuer: string; authorization_endpoint: string; end_session_endpoint?: string; token_endpoint: string; grant_types_supported: string[]; }; export declare const fetchOpenIdConfiguration: import("@reduxjs/toolkit").AsyncThunk<OpenIdConfigPayload, string, { state?: unknown; dispatch?: import("redux").Dispatch; extra?: unknown; rejectValue?: unknown; serializedErrorType?: unknown; pendingMeta?: unknown; fulfilledMeta?: unknown; rejectedMeta?: unknown; }>; export declare const fetchOpenIdConfigurationIfNecessary: (openIdConfigUrl: string) => ThunkAction<void, RootState, unknown, AnyAction>; export type OIDCSliceState = { isFetching: boolean; hasAttempted: boolean; data?: OpenIdConfigPayload; expiry?: number; }; export declare const openIdConfigSlice: import("@reduxjs/toolkit").Slice<OIDCSliceState, {}, "openIdConfiguration">; declare const _default: import("redux").Reducer<OIDCSliceState>; export default _default;