Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update auth.ts #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import {
AuthType, DOMSelector, EmbedConfig, EmbedEvent,
} from './types';

import { getDOMNode, getRedirectUrl, getSSOMarker } from './utils';
import {
EndPoints,
Expand Down Expand Up @@ -42,7 +43,7 @@
}

/**
* Enum for auth status emitted by the emitter returned from {@link init}.

Check warning on line 46 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

The type 'init' is undefined
* @group Authentication / Init
*/
export enum AuthStatus {
Expand All @@ -66,13 +67,13 @@
* Emitted when inPopup is true in the SAMLRedirect flow and the
* popup is waiting to be triggered either programmatically
* or by the trigger button.
* @version SDK: 1.19.0

Check warning on line 70 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Invalid JSDoc @Version: "SDK: 1.19.0"
*/
WAITING_FOR_POPUP = 'WAITING_FOR_POPUP',
}

/**
* Event emitter returned from {@link init}.

Check warning on line 76 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

The type 'init' is undefined
* @group Authentication / Init
*/
export interface AuthEventEmitter {
Expand Down Expand Up @@ -100,7 +101,7 @@
once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
/**
* Trigger an event on the emitter returned from init.
* @param {@link AuthEvent}

Check warning on line 104 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Syntax error in type: @link AuthEvent
*/
emit(event: AuthEvent, ...args: any[]): boolean;
/**
Expand All @@ -119,7 +120,7 @@
}

/**
* Events which can be triggered on the emitter returned from {@link init}.

Check warning on line 123 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

The type 'init' is undefined
* @group Authentication / Init
*/
export enum AuthEvent {
Expand All @@ -132,7 +133,7 @@

let authEE: EventEmitter<AuthStatus | AuthEvent>;

/**

Check warning on line 136 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Missing JSDoc @returns declaration
*
*/
export function getAuthEE(): EventEmitter<AuthStatus | AuthEvent> {
Expand All @@ -141,7 +142,7 @@

/**
*
* @param eventEmitter

Check warning on line 145 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Missing JSDoc @param "eventEmitter" description

Check warning on line 145 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Missing JSDoc @param "eventEmitter" type
*/
export function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void {
authEE = eventEmitter;
Expand Down Expand Up @@ -176,7 +177,7 @@

/**
*
* @param failureType

Check warning on line 180 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Missing JSDoc @param "failureType" description

Check warning on line 180 in src/auth.ts

View workflow job for this annotation

GitHub Actions / build

Missing JSDoc @param "failureType" type
*/
export function notifyAuthFailure(failureType: AuthFailureType): void {
if (!authEE) {
Expand Down
Loading