@inrupt/solid-client-authn-browser 1.11.7 → 1.11.8-alpha.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/ClientAuthentication.d.ts +18 -17
- package/dist/Session.d.ts +35 -36
- package/dist/Session.js +2 -45
- package/dist/Session.js.map +1 -1
- package/dist/constant.d.ts +2 -2
- package/dist/defaultSession.d.ts +9 -9
- package/dist/dependencies.d.ts +6 -6
- package/dist/iframe.d.ts +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.es.js +1693 -0
- package/dist/index.js +1717 -27
- package/dist/login/AggregateLoginHandler.d.ts +4 -4
- package/dist/login/oidc/AggregateOidcHandler.d.ts +4 -4
- package/dist/login/oidc/ClientRegistrar.d.ts +6 -6
- package/dist/login/oidc/IssuerConfigFetcher.d.ts +8 -8
- package/dist/login/oidc/OidcLoginHandler.d.ts +10 -10
- package/dist/login/oidc/Redirector.d.ts +4 -4
- package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.d.ts +8 -8
- package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.d.ts +9 -9
- package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.d.ts +4 -4
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.d.ts +15 -16
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js +1 -23
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js.map +1 -1
- package/dist/login/oidc/redirectHandler/ErrorOidcHandler.d.ts +9 -9
- package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.d.ts +7 -7
- package/dist/login/oidc/refresh/TokenRefresher.d.ts +10 -10
- package/dist/login/webid/WebIdLoginHandler.d.ts +5 -5
- package/dist/logout/GeneralLogoutHandler.d.ts +7 -7
- package/dist/sessionInfo/SessionInfoManager.d.ts +16 -16
- package/dist/sessionInfo/SessionInfoManager.js +0 -8
- package/dist/sessionInfo/SessionInfoManager.js.map +1 -1
- package/dist/solid-client-authn.bundle.js +1720 -2
- package/dist/storage/BrowserStorage.d.ts +7 -7
- package/dist/storage/StorageUtility.d.ts +4 -4
- package/dist/util/UuidGenerator.d.ts +6 -6
- package/dist/util/urlPath.d.ts +1 -1
- package/examples/demoClientApp/package-lock.json +85 -18
- package/examples/demoClientApp/package.json +2 -1
- package/examples/demoClientApp/src/DemoClientApp.js +9 -1
- package/examples/single/bundle/package-lock.json +18 -18
- package/jest.config.js +6 -1
- package/package.json +17 -29
- package/rollup.config.js +57 -0
- package/src/ClientAuthentication.spec.ts +69 -1
- package/src/ClientAuthentication.ts +32 -14
- package/src/Session.spec.ts +0 -224
- package/src/Session.ts +8 -88
- package/src/login/oidc/__mocks__/Redirector.ts +9 -9
- package/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.spec.ts +34 -18
- package/src/login/oidc/redirectHandler/AuthCodeRedirectHandler.spec.ts +3 -171
- package/src/login/oidc/redirectHandler/AuthCodeRedirectHandler.ts +0 -68
- package/src/login/oidc/redirectHandler/__mocks__/RedirectHandler.ts +13 -0
- package/src/sessionInfo/SessionInfoManager.spec.ts +0 -27
- package/src/sessionInfo/SessionInfoManager.ts +0 -10
- package/src/index.browser.spec.ts +0 -27
- package/src/index.browser.ts +0 -24
- package/webpack.browser.js +0 -19
- package/webpack.common.js +0 -22
- package/webpack.config.js +0 -8
- package/webpack.dev.js +0 -17
- package/webpack.prod.js +0 -3
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { ILoginHandler, ILogoutHandler, IRedirectHandler, ISessionInfo, ISessionInfoManager, IIssuerConfigFetcher, ISessionInternalInfo, ILoginOptions } from "@inrupt/solid-client-authn-core";
|
|
2
|
-
import { EventEmitter } from "events";
|
|
3
|
-
export default class ClientAuthentication {
|
|
4
|
-
private loginHandler;
|
|
5
|
-
private redirectHandler;
|
|
6
|
-
private logoutHandler;
|
|
7
|
-
private sessionInfoManager;
|
|
8
|
-
private issuerConfigFetcher;
|
|
9
|
-
constructor(loginHandler: ILoginHandler, redirectHandler: IRedirectHandler, logoutHandler: ILogoutHandler, sessionInfoManager: ISessionInfoManager, issuerConfigFetcher: IIssuerConfigFetcher);
|
|
10
|
-
login: (options: ILoginOptions, eventEmitter: EventEmitter) => Promise<void>;
|
|
11
|
-
fetch: ((input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>) & typeof fetch;
|
|
12
|
-
logout: (sessionId: string) => Promise<void>;
|
|
13
|
-
getSessionInfo: (sessionId: string) => Promise<(ISessionInfo & ISessionInternalInfo) | undefined>;
|
|
14
|
-
getAllSessionInfo: () => Promise<ISessionInfo[]>;
|
|
15
|
-
validateCurrentSession: (currentSessionId: string) => Promise<(ISessionInfo & ISessionInternalInfo) | null>;
|
|
16
|
-
handleIncomingRedirect: (url: string, eventEmitter: EventEmitter) => Promise<ISessionInfo | undefined>;
|
|
17
|
-
|
|
1
|
+
import { ILoginHandler, ILogoutHandler, IRedirectHandler, ISessionInfo, ISessionInfoManager, IIssuerConfigFetcher, ISessionInternalInfo, ILoginOptions } from "@inrupt/solid-client-authn-core";
|
|
2
|
+
import { EventEmitter } from "events";
|
|
3
|
+
export default class ClientAuthentication {
|
|
4
|
+
private loginHandler;
|
|
5
|
+
private redirectHandler;
|
|
6
|
+
private logoutHandler;
|
|
7
|
+
private sessionInfoManager;
|
|
8
|
+
private issuerConfigFetcher;
|
|
9
|
+
constructor(loginHandler: ILoginHandler, redirectHandler: IRedirectHandler, logoutHandler: ILogoutHandler, sessionInfoManager: ISessionInfoManager, issuerConfigFetcher: IIssuerConfigFetcher);
|
|
10
|
+
login: (options: ILoginOptions, eventEmitter: EventEmitter) => Promise<void>;
|
|
11
|
+
fetch: ((input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>) & typeof fetch;
|
|
12
|
+
logout: (sessionId: string) => Promise<void>;
|
|
13
|
+
getSessionInfo: (sessionId: string) => Promise<(ISessionInfo & ISessionInternalInfo) | undefined>;
|
|
14
|
+
getAllSessionInfo: () => Promise<ISessionInfo[]>;
|
|
15
|
+
validateCurrentSession: (currentSessionId: string) => Promise<(ISessionInfo & ISessionInternalInfo) | null>;
|
|
16
|
+
handleIncomingRedirect: (url: string, eventEmitter: EventEmitter) => Promise<ISessionInfo | undefined>;
|
|
17
|
+
private cleanUrlAfterRedirect;
|
|
18
|
+
}
|
package/dist/Session.d.ts
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from "events";
|
|
3
|
-
import { ILoginInputOptions, ISessionInfo, IStorage } from "@inrupt/solid-client-authn-core";
|
|
4
|
-
import ClientAuthentication from "./ClientAuthentication";
|
|
5
|
-
export interface ISessionOptions {
|
|
6
|
-
secureStorage: IStorage;
|
|
7
|
-
insecureStorage: IStorage;
|
|
8
|
-
sessionInfo: ISessionInfo;
|
|
9
|
-
clientAuthentication: ClientAuthentication;
|
|
10
|
-
}
|
|
11
|
-
export interface IHandleIncomingRedirectOptions {
|
|
12
|
-
restorePreviousSession?: boolean;
|
|
13
|
-
useEssSession?: boolean;
|
|
14
|
-
url?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function silentlyAuthenticate(sessionId: string, clientAuthn: ClientAuthentication, options: {
|
|
17
|
-
inIframe?: boolean | undefined;
|
|
18
|
-
} | undefined, session: Session): Promise<boolean>;
|
|
19
|
-
export declare class Session extends EventEmitter {
|
|
20
|
-
readonly info: ISessionInfo;
|
|
21
|
-
private clientAuthentication;
|
|
22
|
-
private tokenRequestInProgress;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from "events";
|
|
3
|
+
import { ILoginInputOptions, ISessionInfo, IStorage } from "@inrupt/solid-client-authn-core";
|
|
4
|
+
import ClientAuthentication from "./ClientAuthentication";
|
|
5
|
+
export interface ISessionOptions {
|
|
6
|
+
secureStorage: IStorage;
|
|
7
|
+
insecureStorage: IStorage;
|
|
8
|
+
sessionInfo: ISessionInfo;
|
|
9
|
+
clientAuthentication: ClientAuthentication;
|
|
10
|
+
}
|
|
11
|
+
export interface IHandleIncomingRedirectOptions {
|
|
12
|
+
restorePreviousSession?: boolean;
|
|
13
|
+
useEssSession?: boolean;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function silentlyAuthenticate(sessionId: string, clientAuthn: ClientAuthentication, options: {
|
|
17
|
+
inIframe?: boolean | undefined;
|
|
18
|
+
} | undefined, session: Session): Promise<boolean>;
|
|
19
|
+
export declare class Session extends EventEmitter {
|
|
20
|
+
readonly info: ISessionInfo;
|
|
21
|
+
private clientAuthentication;
|
|
22
|
+
private tokenRequestInProgress;
|
|
23
|
+
constructor(sessionOptions?: Partial<ISessionOptions>, sessionId?: string);
|
|
24
|
+
login: (options: ILoginInputOptions) => Promise<void>;
|
|
25
|
+
fetch: (url: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
|
|
26
|
+
private internalLogout;
|
|
27
|
+
logout: () => Promise<void>;
|
|
28
|
+
handleIncomingRedirect: (inputOptions?: string | IHandleIncomingRedirectOptions) => Promise<ISessionInfo | undefined>;
|
|
29
|
+
onLogin(callback: () => unknown): void;
|
|
30
|
+
onLogout(callback: () => unknown): void;
|
|
31
|
+
onError(callback: (error: string | null, errorDescription?: string | null) => unknown): void;
|
|
32
|
+
onSessionRestore(callback: (currentUrl: string) => unknown): void;
|
|
33
|
+
onSessionExpiration(callback: () => unknown): void;
|
|
34
|
+
private setSessionInfo;
|
|
35
|
+
}
|
package/dist/Session.js
CHANGED
|
@@ -36,7 +36,6 @@ class Session extends events_1.EventEmitter {
|
|
|
36
36
|
constructor(sessionOptions = {}, sessionId) {
|
|
37
37
|
super();
|
|
38
38
|
this.tokenRequestInProgress = false;
|
|
39
|
-
this.tmpFetchWithCookies = false;
|
|
40
39
|
this.login = async (options) => {
|
|
41
40
|
var _a;
|
|
42
41
|
await this.clientAuthentication.login({
|
|
@@ -47,20 +46,12 @@ class Session extends events_1.EventEmitter {
|
|
|
47
46
|
return new Promise(() => undefined);
|
|
48
47
|
};
|
|
49
48
|
this.fetch = async (url, init) => {
|
|
50
|
-
return this.clientAuthentication.fetch(url,
|
|
51
|
-
...init,
|
|
52
|
-
credentials: this.tmpFetchWithCookies
|
|
53
|
-
?
|
|
54
|
-
"include"
|
|
55
|
-
:
|
|
56
|
-
init === null || init === void 0 ? void 0 : init.credentials,
|
|
57
|
-
});
|
|
49
|
+
return this.clientAuthentication.fetch(url, init);
|
|
58
50
|
};
|
|
59
51
|
this.internalLogout = async (emitSignal) => {
|
|
60
52
|
window.localStorage.removeItem(constant_1.KEY_CURRENT_SESSION);
|
|
61
53
|
await this.clientAuthentication.logout(this.info.sessionId);
|
|
62
54
|
this.info.isLoggedIn = false;
|
|
63
|
-
this.tmpFetchWithCookies = false;
|
|
64
55
|
if (emitSignal) {
|
|
65
56
|
this.emit(solid_client_authn_core_1.EVENTS.LOGOUT);
|
|
66
57
|
}
|
|
@@ -80,41 +71,6 @@ class Session extends events_1.EventEmitter {
|
|
|
80
71
|
(0, iframe_1.postRedirectUrlToParent)(url);
|
|
81
72
|
return undefined;
|
|
82
73
|
}
|
|
83
|
-
if (options.useEssSession !== true ||
|
|
84
|
-
options.restorePreviousSession === true) {
|
|
85
|
-
window.localStorage.setItem("tmp-resource-server-session-enabled", "false");
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
window.localStorage.setItem("tmp-resource-server-session-enabled", "true");
|
|
89
|
-
}
|
|
90
|
-
const storedSessionCookieReference = window.localStorage.getItem("tmp-resource-server-session-info");
|
|
91
|
-
if (typeof storedSessionCookieReference === "string" &&
|
|
92
|
-
options.restorePreviousSession !== true &&
|
|
93
|
-
options.useEssSession === true) {
|
|
94
|
-
function isValidSessionCookieReference(reference) {
|
|
95
|
-
var _a;
|
|
96
|
-
const resourceServers = Object.keys((_a = reference.sessions) !== null && _a !== void 0 ? _a : {});
|
|
97
|
-
return (typeof reference.webId === "string" &&
|
|
98
|
-
resourceServers.length > 0 &&
|
|
99
|
-
typeof reference.sessions[resourceServers[0]].expiration === "number");
|
|
100
|
-
}
|
|
101
|
-
const reference = JSON.parse(storedSessionCookieReference);
|
|
102
|
-
if (isValidSessionCookieReference(reference)) {
|
|
103
|
-
const resourceServers = Object.keys(reference.sessions);
|
|
104
|
-
const webIdOrigin = new URL(reference.webId).hostname;
|
|
105
|
-
const ownResourceServer = resourceServers.find((resourceServer) => {
|
|
106
|
-
return new URL(resourceServer).hostname === webIdOrigin;
|
|
107
|
-
});
|
|
108
|
-
const relevantServer = ownResourceServer !== null && ownResourceServer !== void 0 ? ownResourceServer : resourceServers[0];
|
|
109
|
-
if (reference.sessions[relevantServer].expiration - Date.now() >
|
|
110
|
-
5 * 60 * 1000) {
|
|
111
|
-
this.info.isLoggedIn = true;
|
|
112
|
-
this.info.webId = reference.webId;
|
|
113
|
-
this.tmpFetchWithCookies = true;
|
|
114
|
-
return this.info;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
74
|
this.tokenRequestInProgress = true;
|
|
119
75
|
const sessionInfo = await this.clientAuthentication.handleIncomingRedirect(url, this);
|
|
120
76
|
if (isLoggedIn(sessionInfo)) {
|
|
@@ -178,6 +134,7 @@ class Session extends events_1.EventEmitter {
|
|
|
178
134
|
this.on(solid_client_authn_core_1.EVENTS.LOGIN, () => window.localStorage.setItem(constant_1.KEY_CURRENT_SESSION, this.info.sessionId));
|
|
179
135
|
this.on(solid_client_authn_core_1.EVENTS.SESSION_EXPIRED, () => this.internalLogout(false));
|
|
180
136
|
this.on(solid_client_authn_core_1.EVENTS.ERROR, () => this.internalLogout(false));
|
|
137
|
+
window.localStorage.removeItem("tmp-resource-server-session-enabled");
|
|
181
138
|
}
|
|
182
139
|
onLogin(callback) {
|
|
183
140
|
this.on(solid_client_authn_core_1.EVENTS.LOGIN, callback);
|
package/dist/Session.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";;;AAwBA,mCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";;;AAwBA,mCAAsC;AACtC,6EAKyC;AACzC,+BAA0B;AAE1B,iDAAyE;AACzE,yCAAkE;AAClE,qCAAwE;AA8DjE,KAAK,UAAU,oBAAoB,CACxC,SAAiB,EACjB,WAAiC,EACjC,UAEI;IACF,QAAQ,EAAE,KAAK;CAChB,EACD,OAAgB;;IAEhB,MAAM,iBAAiB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC9E,IAAI,iBAAiB,KAAK,IAAI,EAAE;QAK9B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,0BAAe,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnE,MAAM,WAAW,CAAC,KAAK,CACrB;YACE,SAAS;YACT,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,iBAAiB,CAAC,MAAM;YACpC,WAAW,EAAE,iBAAiB,CAAC,WAAW;YAC1C,QAAQ,EAAE,iBAAiB,CAAC,WAAW;YACvC,YAAY,EAAE,iBAAiB,CAAC,eAAe;YAC/C,SAAS,EAAE,MAAA,iBAAiB,CAAC,SAAS,mCAAI,MAAM;YAChD,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,EACD,OAAO,CACR,CAAC;QACF,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAjCD,oDAiCC;AAED,SAAS,UAAU,CACjB,WAA0B;IAE1B,OAAO,CAAC,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAA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AE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAQD,mBAAmB,CAAC,QAAuB;QACzC,IAAI,CAAC,EAAE,CAAC,gCAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAEO,cAAc,CACpB,WAAgD;QAEhD,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QAC5C,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;QACtD,IAAI,CAAC,EAAE,CAAC,gCAAM,CAAC,gBAAgB,EAAE,CAAC,SAAiB,EAAE,EAAE;YACrD,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApTD,0BAoTC"}
|
package/dist/constant.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const KEY_CURRENT_SESSION: string;
|
|
2
|
-
export declare const KEY_CURRENT_URL: string;
|
|
1
|
+
export declare const KEY_CURRENT_SESSION: string;
|
|
2
|
+
export declare const KEY_CURRENT_URL: string;
|
package/dist/defaultSession.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Session } from "./Session";
|
|
2
|
-
export declare function getDefaultSession(): Session;
|
|
3
|
-
export declare const fetch: Session["fetch"];
|
|
4
|
-
export declare const login: Session["login"];
|
|
5
|
-
export declare const logout: Session["logout"];
|
|
6
|
-
export declare const handleIncomingRedirect: Session["handleIncomingRedirect"];
|
|
7
|
-
export declare const onLogin: Session["onLogin"];
|
|
8
|
-
export declare const onLogout: Session["onLogout"];
|
|
9
|
-
export declare const onSessionRestore: Session["onSessionRestore"];
|
|
1
|
+
import { Session } from "./Session";
|
|
2
|
+
export declare function getDefaultSession(): Session;
|
|
3
|
+
export declare const fetch: Session["fetch"];
|
|
4
|
+
export declare const login: Session["login"];
|
|
5
|
+
export declare const logout: Session["logout"];
|
|
6
|
+
export declare const handleIncomingRedirect: Session["handleIncomingRedirect"];
|
|
7
|
+
export declare const onLogin: Session["onLogin"];
|
|
8
|
+
export declare const onLogout: Session["onLogout"];
|
|
9
|
+
export declare const onSessionRestore: Session["onSessionRestore"];
|
package/dist/dependencies.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IStorage } from "@inrupt/solid-client-authn-core";
|
|
2
|
-
import ClientAuthentication from "./ClientAuthentication";
|
|
3
|
-
export declare function getClientAuthenticationWithDependencies(dependencies: {
|
|
4
|
-
secureStorage?: IStorage;
|
|
5
|
-
insecureStorage?: IStorage;
|
|
6
|
-
}): ClientAuthentication;
|
|
1
|
+
import { IStorage } from "@inrupt/solid-client-authn-core";
|
|
2
|
+
import ClientAuthentication from "./ClientAuthentication";
|
|
3
|
+
export declare function getClientAuthenticationWithDependencies(dependencies: {
|
|
4
|
+
secureStorage?: IStorage;
|
|
5
|
+
insecureStorage?: IStorage;
|
|
6
|
+
}): ClientAuthentication;
|
package/dist/iframe.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function redirectInIframe(redirectUrl: string): void;
|
|
2
|
-
export declare function setupIframeListener(handleIframeRedirect: (redirectUrl: string) => Promise<unknown>): void;
|
|
3
|
-
export declare function postRedirectUrlToParent(redirectUrl: string): void;
|
|
1
|
+
export declare function redirectInIframe(redirectUrl: string): void;
|
|
2
|
+
export declare function setupIframeListener(handleIframeRedirect: (redirectUrl: string) => Promise<unknown>): void;
|
|
3
|
+
export declare function postRedirectUrlToParent(redirectUrl: string): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Session, ISessionOptions } from "./Session";
|
|
2
|
-
export { getClientAuthenticationWithDependencies } from "./dependencies";
|
|
3
|
-
export * from "./defaultSession";
|
|
4
|
-
export { ILoginInputOptions, ISessionInfo, IStorage, NotImplementedError, ConfigurationError, InMemoryStorage, } from "@inrupt/solid-client-authn-core";
|
|
1
|
+
export { Session, ISessionOptions } from "./Session";
|
|
2
|
+
export { getClientAuthenticationWithDependencies } from "./dependencies";
|
|
3
|
+
export * from "./defaultSession";
|
|
4
|
+
export { ILoginInputOptions, ISessionInfo, IStorage, NotImplementedError, ConfigurationError, InMemoryStorage, } from "@inrupt/solid-client-authn-core";
|