@nsshunt/stsoauth2plugin 0.1.46 → 0.1.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsshunt/stsoauth2plugin",
3
- "version": "0.1.46",
3
+ "version": "0.1.49",
4
4
  "description": "STS OAuth2 VUE Plugin",
5
5
  "files": [
6
6
  "dist",
@@ -18,7 +18,7 @@
18
18
  "test": "jest --detectOpenHandles --no-cache",
19
19
  "testwatch": "jest --watchAll --detectOpenHandles --no-cache",
20
20
  "build2": "tsc",
21
- "build": "tsc --noEmit && vite build"
21
+ "build": "tsc && vite build"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
@@ -0,0 +1,7 @@
1
+ export declare class CryptoUtils {
2
+ DigestMessage: (message: any) => Promise<string>;
3
+ CreateRandomString: (size?: number) => string;
4
+ CreateRandomStringEx: () => string;
5
+ }
6
+ export default CryptoUtils;
7
+ //# sourceMappingURL=CryptoUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CryptoUtils.d.ts","sourceRoot":"","sources":["../../src/Utils/CryptoUtils.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IACvB,aAAa,oCASZ;IAED,kBAAkB,4BAOjB;IAED,oBAAoB,eAOnB;CACD;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,8 @@
1
+ declare class QueryParams {
2
+ DecodeQueryParams: (params: any) => {};
3
+ CreateQueryParams: (params: any) => string;
4
+ _GetQueryParams: (param: any) => {};
5
+ GetQueryParams: () => {};
6
+ }
7
+ export default QueryParams;
8
+ //# sourceMappingURL=QueryParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryParams.d.ts","sourceRoot":"","sources":["../../src/Utils/QueryParams.ts"],"names":[],"mappings":"AAEA,cAAM,WAAW;IAChB,iBAAiB,sBAQhB;IAED,iBAAiB,0BAWhB;IAED,eAAe,qBAcd;IAED,cAAc,WAEb;CACD;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ISTSOAuth2ManagerOptions } from './stsoauth2types';
2
+ export * from './stsoauth2types';
3
+ export * from './stsoauth2manager';
4
+ export * from './stsoauth2worker';
5
+ export declare const STSOAuth2ManagerPlugin: {
6
+ install: (app: any, options: ISTSOAuth2ManagerOptions) => void;
7
+ };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,sBAAsB;iCACV,wBAAwB;CAIhD,CAAA"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import { JSONObject } from "@nsshunt/stsutils";
2
+ export interface IStsStorage<T> {
3
+ get(key: string): T;
4
+ set(key: string, value: T, options?: JSONObject): void;
5
+ remove(key: string): void;
6
+ }
7
+ export declare enum ClientStorageType {
8
+ LOCAL_STORAGE = "LocalStorage",
9
+ SESSION_STORAGE = "SessionStorage",
10
+ COOKIE_STORAGE = "CookieStorage",
11
+ MEMORY_STORAGE = "MemoryStorage"
12
+ }
13
+ export declare class ClientStorageOptions {
14
+ clientStorageType: ClientStorageType;
15
+ storageOptions?: JSONObject;
16
+ }
17
+ export declare class ClientStorageFactory<T> {
18
+ #private;
19
+ constructor(options: ClientStorageOptions);
20
+ GetStorage(): IStsStorage<T>;
21
+ }
22
+ //# sourceMappingURL=stsStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stsStorage.d.ts","sourceRoot":"","sources":["../src/stsStorage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,WAAW,WAAW,CAAC,CAAC;IAC7B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;IACnB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IACtD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,oBAAY,iBAAiB;IAC5B,aAAa,iBAAiB;IAC9B,eAAe,mBAAmB;IAClC,cAAc,kBAAkB;IAChC,cAAc,kBAAkB;CAChC;AA2GD,qBAAa,oBAAoB;IAChC,iBAAiB,EAAE,iBAAiB,CAAoC;IACxE,cAAc,CAAC,EAAE,UAAU,CAAA;CAC3B;AAED,qBAAa,oBAAoB,CAAC,CAAC;;gBAItB,OAAO,EAAE,oBAAoB;IAoBzC,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAI5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stsoauth2launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stsoauth2launcher.d.ts","sourceRoot":"","sources":["../src/stsoauth2launcher.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { JSONObject } from '@nsshunt/stsutils';
2
+ import { ISTSOAuth2ManagerOptions } from './stsoauth2types';
3
+ export declare class STSOAuth2Manager {
4
+ #private;
5
+ constructor(app: any, options: ISTSOAuth2ManagerOptions);
6
+ RestoreSession: () => Promise<boolean>;
7
+ Authorize: () => Promise<void>;
8
+ HandleRedirect: (queryVars: JSONObject) => Promise<boolean>;
9
+ Logout: () => Promise<boolean>;
10
+ }
11
+ //# sourceMappingURL=stsoauth2manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stsoauth2manager.d.ts","sourceRoot":"","sources":["../src/stsoauth2manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAKpE,OAAO,EACN,wBAAwB,EACiD,MAAM,kBAAkB,CAAA;AAmBlG,qBAAa,gBAAgB;;gBAkBhB,GAAG,KAAA,EAAE,OAAO,EAAE,wBAAwB;IA+RlD,cAAc,QAAY,QAAQ,OAAO,CAAC,CAQzC;IAED,SAAS,QAAa,QAAQ,IAAI,CAAC,CASlC;IAED,cAAc,cAAqB,UAAU,KAAG,QAAQ,OAAO,CAAC,CAoB/D;IAED,MAAM,QAAa,QAAQ,OAAO,CAAC,CAQlC;CACD"}
@@ -0,0 +1,109 @@
1
+ export declare enum AuthorizeOptionsResponseType {
2
+ CODE = "code",
3
+ ID_TOKEN = "id_token",
4
+ TOKEN = "token"
5
+ }
6
+ export declare enum AuthorizeOptionsResponseMode {
7
+ QUERY = "query",
8
+ FRAGMENT = "fragment",
9
+ FORM_POST = "form_post"
10
+ }
11
+ export interface IAuthorizeOptions {
12
+ client_id: string;
13
+ nonce: string;
14
+ response_type: AuthorizeOptionsResponseType[];
15
+ redirect_uri: string;
16
+ response_mode: AuthorizeOptionsResponseMode;
17
+ scope: string;
18
+ state: string;
19
+ code_challenge: string;
20
+ code_challenge_method: string;
21
+ code_verifier?: string;
22
+ }
23
+ export interface IAuthorizeResponse {
24
+ state: string;
25
+ code: string;
26
+ }
27
+ export interface IAuthorizeErrorResponse {
28
+ error: string;
29
+ error_description: string;
30
+ }
31
+ export declare enum OAuthGrantTypes {
32
+ CLIENT_CREDENTIALS = "client_credentials",
33
+ AUTHORIZATION_CODE = "authorization_code",
34
+ REFRESH_TOKEN = "refresh_token"
35
+ }
36
+ export interface IAuthorizationCodeFlowParameters {
37
+ client_id: string;
38
+ scope: string;
39
+ code: string;
40
+ redirect_uri: string;
41
+ grant_type: OAuthGrantTypes;
42
+ code_verifier: string;
43
+ }
44
+ export interface IRefreshFlowParameters {
45
+ client_id: string;
46
+ scope: string;
47
+ refresh_token: string;
48
+ grant_type: OAuthGrantTypes;
49
+ }
50
+ export interface ITokenResponse {
51
+ access_token: string;
52
+ token_type: string;
53
+ expires_in: number;
54
+ scope: string;
55
+ refresh_token: string;
56
+ id_token: string;
57
+ }
58
+ export interface ITokenErrorResponse {
59
+ error: string;
60
+ error_description: string;
61
+ error_codes: number[];
62
+ timestamp: number;
63
+ details: unknown;
64
+ }
65
+ export declare type AuthenticateEvent = (id_token: string) => void;
66
+ export declare enum IOauth2ListenerCommand {
67
+ RESTORE_SESSION = "RestoreSession",
68
+ AUTHORIZE = "Authorize",
69
+ HANDLE_REDIRECT = "HandleRedirect",
70
+ LOGOUT = "Logout",
71
+ AUTHENTICATE_EVENT = "AuthenticateEvent",
72
+ ERROR = "Error",
73
+ LOG = "__LOG",
74
+ UPDATE_INSTRUMENT = "__UPDATE_INSTRUMENT"
75
+ }
76
+ export interface IOauth2ListenerMessage {
77
+ messageId?: number;
78
+ command: IOauth2ListenerCommand;
79
+ payload?: any;
80
+ }
81
+ export interface IOauth2ListenerMessageResponse {
82
+ messageId: number;
83
+ command: IOauth2ListenerCommand;
84
+ payload: any;
85
+ }
86
+ export declare type StsOauth2WorkerFactory = () => Worker;
87
+ export interface ISTSOAuth2WorkerOptions {
88
+ client_id: string;
89
+ scope: string;
90
+ redirect_uri: string;
91
+ audience: string;
92
+ brokerendpoint: string;
93
+ brokerport: string;
94
+ brokerapiroot: string;
95
+ authorizeendpoint: string;
96
+ authorizeport: string;
97
+ authorizeapiroot: string;
98
+ timeout: number;
99
+ }
100
+ export interface ISTSOAuth2ManagerOptions {
101
+ authenticateEvent?: AuthenticateEvent;
102
+ workerFactory?: StsOauth2WorkerFactory;
103
+ workerOptions: ISTSOAuth2WorkerOptions;
104
+ }
105
+ export interface ISTSOAuth2WorkerMessage {
106
+ workerPort: MessagePort;
107
+ options: ISTSOAuth2WorkerOptions;
108
+ }
109
+ //# sourceMappingURL=stsoauth2types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stsoauth2types.d.ts","sourceRoot":"","sources":["../src/stsoauth2types.ts"],"names":[],"mappings":"AAAA,oBAAY,4BAA4B;IACvC,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;CACf;AAED,oBAAY,4BAA4B;IACvC,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,SAAS,cAAc;CACvB;AAGD,MAAM,WAAW,iBAAiB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,4BAA4B,EAAE,CAAC;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,4BAA4B,CAAA;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,kBAAkB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,uBAAuB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAA;CACzB;AAED,oBAAY,eAAe;IAC1B,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;CAC/B;AAED,MAAM,WAAW,gCAAgC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,sBAAsB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,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A;IAErB,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IAExB,OAAO,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,wBAAwB;IACxC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,aAAa,CAAC,EAAE,sBAAsB,CAAA;IACtC,aAAa,EAAE,uBAAuB,CAAA;CACtC;AAED,MAAM,WAAW,uBAAuB;IACvC,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,uBAAuB,CAAA;CAChC"}
@@ -0,0 +1,7 @@
1
+ import { ISTSOAuth2WorkerOptions } from './stsoauth2types';
2
+ export declare class STSOAuth2Worker {
3
+ #private;
4
+ constructor(workerPort: MessagePort, options: ISTSOAuth2WorkerOptions);
5
+ SetupListener: () => void;
6
+ }
7
+ //# sourceMappingURL=stsoauth2worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stsoauth2worker.d.ts","sourceRoot":"","sources":["../src/stsoauth2worker.ts"],"names":[],"mappings":"AAkBA,OAAO,EAE0E,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAYlI,qBAAa,eAAe;;gBAUf,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB;IAoGrE,aAAa,aAoBZ;CA+ZD"}