dh-auth-library 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/getLoginHandler.d.ts +2 -2
- package/dist/auth/getSessionHandler.d.ts +4 -4
- package/dist/auth/loginhandlers/digidGemachtigdeLoginHandler.d.ts +1 -1
- package/dist/auth/loginhandlers/digidLoginHandler.d.ts +1 -1
- package/dist/auth/loginhandlers/eHerkenningBewindvoerderLoginHandler.d.ts +1 -1
- package/dist/auth/loginhandlers/eHerkenningLoginHandler.d.ts +1 -1
- package/dist/auth/sessionHandler.d.ts +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AuthType } from '../constants';
|
|
1
|
+
import { AuthType } from '../constants/index';
|
|
2
2
|
import { LoginHandler } from './loginHandler';
|
|
3
|
-
import { LoginOptions } from './pages';
|
|
3
|
+
import { LoginOptions } from './pages/index';
|
|
4
4
|
/**
|
|
5
5
|
* Shortcut for creating the login handler for an auth type. Creating the handler directly, e.g.
|
|
6
6
|
* `new DigidLoginHandler(options)`, checks at compile time that the required options are there;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LoginHandler } from './loginHandler';
|
|
2
|
-
import { TestProfile } from '../constants';
|
|
3
|
-
import {
|
|
2
|
+
import { TestProfile } from '../constants/index';
|
|
3
|
+
import { LoginOptions } from './pages/index';
|
|
4
4
|
/**
|
|
5
5
|
* @param testProfile the test user to log in
|
|
6
|
-
* @param
|
|
6
|
+
* @param loginOptions with the login button and the accept cookiebutton if necessary
|
|
7
7
|
* @param loginHandler the login handler for the app the user logs in to, with that app's options, e.g.
|
|
8
8
|
* `new DigidLoginHandler({ loginButton, ... })` or `getLoginHandler(authType, options)`. Required for
|
|
9
9
|
* auth types that need options (`ad-session`, `digid`, `digid_gemachtigde`); left out, the handler
|
|
@@ -19,4 +19,4 @@ import { LoginOptionsWithButton } from './pages';
|
|
|
19
19
|
*
|
|
20
20
|
* getSessionHandler(digidUser1, openFormsDigid);
|
|
21
21
|
*/
|
|
22
|
-
export declare function getSessionHandler(testProfile: TestProfile,
|
|
22
|
+
export declare function getSessionHandler(testProfile: TestProfile, loginOptions: LoginOptions, loginHandler?: LoginHandler): import("nl-portal-playwright-libraries").SessionHandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
2
|
import { Account } from 'nl-portal-playwright-libraries';
|
|
3
3
|
import { LoginHandler } from '../loginHandler';
|
|
4
|
-
import { LoginOptionsWithButton } from '../pages';
|
|
4
|
+
import { LoginOptionsWithButton } from '../pages/index';
|
|
5
5
|
export declare class DigidGemachtigdeLoginHandler implements LoginHandler {
|
|
6
6
|
private readonly options;
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
2
|
import { Account } from 'nl-portal-playwright-libraries';
|
|
3
|
+
import { LoginOptionsWithButton } from '../pages/index';
|
|
3
4
|
import { LoginHandler } from '../loginHandler';
|
|
4
|
-
import { LoginOptionsWithButton } from '../pages';
|
|
5
5
|
export declare class DigidLoginHandler implements LoginHandler {
|
|
6
6
|
private readonly options;
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
2
|
import { Account } from 'nl-portal-playwright-libraries';
|
|
3
3
|
import { LoginHandler } from '../loginHandler';
|
|
4
|
-
import { LoginOptionsWithButton } from '../pages';
|
|
4
|
+
import { LoginOptionsWithButton } from '../pages/index';
|
|
5
5
|
export declare class EHerkenningBewindvoerderLoginHandler implements LoginHandler {
|
|
6
6
|
private readonly options;
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
2
|
import { Account } from 'nl-portal-playwright-libraries';
|
|
3
|
-
import { LoginHandler } from '../loginHandler';
|
|
4
3
|
import { LoginOptionsWithButton } from '../pages';
|
|
4
|
+
import { LoginHandler } from '../loginHandler';
|
|
5
5
|
export declare class EHerkenningLoginHandler implements LoginHandler {
|
|
6
6
|
private readonly options;
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Account, SessionHandler } from 'nl-portal-playwright-libraries';
|
|
2
2
|
import { LoginHandler } from './loginHandler';
|
|
3
|
-
import { AuthType } from '../constants';
|
|
3
|
+
import { AuthType } from '../constants/index';
|
|
4
4
|
export declare const MAX_SESSION_TIME_IN_MINUTES = 10;
|
|
5
5
|
/**
|
|
6
6
|
* This class creates the correct SessionHandler
|
package/dist/index.cjs.js
CHANGED
|
@@ -792,7 +792,7 @@ function getApiTokenFromSession(baseTest, handler) {
|
|
|
792
792
|
//#region src/auth/getSessionHandler.ts
|
|
793
793
|
/**
|
|
794
794
|
* @param testProfile the test user to log in
|
|
795
|
-
* @param
|
|
795
|
+
* @param loginOptions with the login button and the accept cookiebutton if necessary
|
|
796
796
|
* @param loginHandler the login handler for the app the user logs in to, with that app's options, e.g.
|
|
797
797
|
* `new DigidLoginHandler({ loginButton, ... })` or `getLoginHandler(authType, options)`. Required for
|
|
798
798
|
* auth types that need options (`ad-session`, `digid`, `digid_gemachtigde`); left out, the handler
|
|
@@ -808,8 +808,8 @@ function getApiTokenFromSession(baseTest, handler) {
|
|
|
808
808
|
*
|
|
809
809
|
* getSessionHandler(digidUser1, openFormsDigid);
|
|
810
810
|
*/
|
|
811
|
-
function getSessionHandler(testProfile,
|
|
812
|
-
return createSessionHandler(testProfile.authType, testProfile.account, loginHandler ?? getLoginHandler(testProfile.authType,
|
|
811
|
+
function getSessionHandler(testProfile, loginOptions, loginHandler) {
|
|
812
|
+
return createSessionHandler(testProfile.authType, testProfile.account, loginHandler ?? getLoginHandler(testProfile.authType, loginOptions));
|
|
813
813
|
}
|
|
814
814
|
//#endregion
|
|
815
815
|
exports.ADLoginHandler = ADLoginHandler;
|
package/dist/index.es.js
CHANGED
|
@@ -768,7 +768,7 @@ function getApiTokenFromSession(baseTest, handler) {
|
|
|
768
768
|
//#region src/auth/getSessionHandler.ts
|
|
769
769
|
/**
|
|
770
770
|
* @param testProfile the test user to log in
|
|
771
|
-
* @param
|
|
771
|
+
* @param loginOptions with the login button and the accept cookiebutton if necessary
|
|
772
772
|
* @param loginHandler the login handler for the app the user logs in to, with that app's options, e.g.
|
|
773
773
|
* `new DigidLoginHandler({ loginButton, ... })` or `getLoginHandler(authType, options)`. Required for
|
|
774
774
|
* auth types that need options (`ad-session`, `digid`, `digid_gemachtigde`); left out, the handler
|
|
@@ -784,8 +784,8 @@ function getApiTokenFromSession(baseTest, handler) {
|
|
|
784
784
|
*
|
|
785
785
|
* getSessionHandler(digidUser1, openFormsDigid);
|
|
786
786
|
*/
|
|
787
|
-
function getSessionHandler(testProfile,
|
|
788
|
-
return createSessionHandler(testProfile.authType, testProfile.account, loginHandler ?? getLoginHandler(testProfile.authType,
|
|
787
|
+
function getSessionHandler(testProfile, loginOptions, loginHandler) {
|
|
788
|
+
return createSessionHandler(testProfile.authType, testProfile.account, loginHandler ?? getLoginHandler(testProfile.authType, loginOptions));
|
|
789
789
|
}
|
|
790
790
|
//#endregion
|
|
791
791
|
export { ADLoginHandler, ADLoginPage, BaseLoginPage, DigidGemachtigdeLoginHandler, DigidLoginHandler, DigidLoginPage, EHerkenningBewindvoerderLoginHandler, EHerkenningLoginHandler, EHerkenningLoginPage, LocalhostLoginHandler, MAX_SESSION_TIME_IN_MINUTES, SessionFileHelper, createSessionHandler, getApiTokenFromSession, getLoginHandler, getSessionHandler, maskedFill };
|