update api specification
Signed-off-by: Gasan Guseinov <gasan.guseinov@ing.com>
This commit is contained in:
@@ -551,6 +551,9 @@ export class OAuth2
|
||||
export type OAuth2CreateOptions = OAuthApiCreateOptions & {
|
||||
scopeTransform?: (scopes: string[]) => string[];
|
||||
popupOptions?: PopupOptions;
|
||||
authConnectorFactory?: (
|
||||
opts: OAuth2CreateOptions,
|
||||
) => AuthConnector<OAuth2Session>;
|
||||
};
|
||||
|
||||
// @public
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type CreateSessionOptions = {
|
||||
scopes: Set<string>;
|
||||
instantPopup?: boolean;
|
||||
@@ -22,6 +25,8 @@ export type CreateSessionOptions = {
|
||||
/**
|
||||
* An AuthConnector is responsible for realizing auth session actions
|
||||
* by for example communicating with a backend or interacting with the user.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type AuthConnector<AuthSession> = {
|
||||
createSession(options: CreateSessionOptions): Promise<AuthSession>;
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
/**
|
||||
* Options used to open a login popup.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type LoginPopupOptions = {
|
||||
/**
|
||||
@@ -65,6 +67,8 @@ type AuthResult =
|
||||
* to the app window. The message posted to the app must match the AuthResult type.
|
||||
*
|
||||
* The returned promise resolves to the response of the message that was posted from the auth popup.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export function showLoginPopup(options: LoginPopupOptions): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user