/* * Copyright (c) 2021-Present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ // TypeScript Version: 4.1 /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable camelcase */ import { OktaAuthOptions, OktaAuth } from '@okta/okta-auth-js'; export function createConfig(config: Okta.ConfigParameters): Promise; export function getAuthClient(): OktaAuth; export function signIn( credentials?: Okta.Credentials ): Promise; export function signInWithBrowser( options?: Okta.BrowserOptions ): Promise; export function authenticate( { sessionToken }: { sessionToken: string } ): Promise; export function signOut(): Promise<{ resolve_type: string }>; export function getAccessToken(): Promise<{ access_token: string }>; export function getIdToken(): Promise<{ id_token: string }>; export function getUser(): Promise; export function getUserFromIdToken(): Promise; export function isAuthenticated(): Promise<{ authenticated: boolean }>; export function revokeAccessToken(): Promise; export function revokeIdToken(): Promise; export function revokeRefreshToken(): Promise; export function introspectAccessToken(): Promise; export function introspectIdToken(): Promise; export function introspectRefreshToken(): Promise; export function refreshTokens(): Promise; export function clearTokens(): Promise; import { NativeEventEmitter } from 'react-native'; export const EventEmitter: NativeEventEmitter; export namespace Okta { interface ConfigParameters { issuer?: string; clientId: string; redirectUri: string; endSessionRedirectUri: string; discoveryUri: string; scopes: string[]; requireHardwareBackedKeyStore: boolean; androidChromeTabColor?: string; httpConnectionTimeout?: number; httpReadTimeout?: number; browserMatchAll?: boolean; oktaAuthConfig?: OktaAuthOptions; } interface AuthenticationResponse { resolve_type: string; access_token: string; } interface RefreshResponse { access_token?: string; id_token?: string; refresh_token?: string; } interface Credentials { username: string; password: string; } interface BrowserOptions { idp?: string; noSSO?: boolean; login_hint?: string prompt?: string } interface StringAnyMap { [index: string]: string | number | boolean | StringAnyMap; } }