samlesa 2.15.7 → 2.16.0

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.

Potentially problematic release.


This version of samlesa might be problematic. Click here for more details.

Files changed (59) hide show
  1. package/build/index.js.map +1 -0
  2. package/build/src/api.js.map +1 -0
  3. package/build/src/binding-post.js.map +1 -0
  4. package/build/src/binding-redirect.js.map +1 -0
  5. package/build/src/binding-simplesign.js.map +1 -0
  6. package/build/src/entity-idp.js.map +1 -0
  7. package/build/src/entity-sp.js.map +1 -0
  8. package/build/src/entity.js.map +1 -0
  9. package/build/src/extractor.js.map +1 -0
  10. package/build/src/flow.js +0 -2
  11. package/build/src/flow.js.map +1 -0
  12. package/build/src/libsaml.js.map +1 -0
  13. package/build/src/metadata-idp.js.map +1 -0
  14. package/build/src/metadata-sp.js.map +1 -0
  15. package/build/src/metadata.js.map +1 -0
  16. package/build/src/types.js.map +1 -0
  17. package/build/src/urn.js.map +1 -0
  18. package/build/src/utility.js +4 -4
  19. package/build/src/utility.js.map +1 -0
  20. package/build/src/validator.js.map +1 -0
  21. package/package.json +80 -80
  22. package/types/src/flow.d.ts.map +1 -1
  23. package/build/.idea/build.iml +0 -12
  24. package/build/.idea/deployment.xml +0 -14
  25. package/build/.idea/modules.xml +0 -8
  26. package/types/api.d.ts +0 -15
  27. package/types/api.d.ts.map +0 -1
  28. package/types/binding-post.d.ts +0 -48
  29. package/types/binding-post.d.ts.map +0 -1
  30. package/types/binding-redirect.d.ts +0 -54
  31. package/types/binding-redirect.d.ts.map +0 -1
  32. package/types/binding-simplesign.d.ts +0 -41
  33. package/types/binding-simplesign.d.ts.map +0 -1
  34. package/types/entity-idp.d.ts +0 -38
  35. package/types/entity-idp.d.ts.map +0 -1
  36. package/types/entity-sp.d.ts +0 -38
  37. package/types/entity-sp.d.ts.map +0 -1
  38. package/types/entity.d.ts +0 -100
  39. package/types/entity.d.ts.map +0 -1
  40. package/types/extractor.d.ts +0 -26
  41. package/types/extractor.d.ts.map +0 -1
  42. package/types/flow.d.ts +0 -7
  43. package/types/flow.d.ts.map +0 -1
  44. package/types/libsaml.d.ts +0 -208
  45. package/types/libsaml.d.ts.map +0 -1
  46. package/types/metadata-idp.d.ts +0 -25
  47. package/types/metadata-idp.d.ts.map +0 -1
  48. package/types/metadata-sp.d.ts +0 -37
  49. package/types/metadata-sp.d.ts.map +0 -1
  50. package/types/metadata.d.ts +0 -58
  51. package/types/metadata.d.ts.map +0 -1
  52. package/types/types.d.ts +0 -128
  53. package/types/types.d.ts.map +0 -1
  54. package/types/urn.d.ts +0 -195
  55. package/types/urn.d.ts.map +0 -1
  56. package/types/utility.d.ts +0 -133
  57. package/types/utility.d.ts.map +0 -1
  58. package/types/validator.d.ts +0 -4
  59. package/types/validator.d.ts.map +0 -1
@@ -1,54 +0,0 @@
1
- import type { BindingContext } from './entity.js';
2
- import { IdentityProvider as Idp } from './entity-idp.js';
3
- import { ServiceProvider as Sp } from './entity-sp.js';
4
- export interface BuildRedirectConfig {
5
- baseUrl: string;
6
- type: string;
7
- isSigned: boolean;
8
- context: string;
9
- entitySetting: any;
10
- relayState?: string;
11
- }
12
- /**
13
- * @desc Redirect URL for login request
14
- * @param {object} entity object includes both idp and sp
15
- * @param {function} customTagReplacement used when developers have their own login response template
16
- * @return {string} redirect URL
17
- */
18
- declare function loginRequestRedirectURL(entity: {
19
- idp: Idp;
20
- sp: Sp;
21
- }, customTagReplacement?: (template: string) => BindingContext): BindingContext;
22
- /**
23
- * @desc Redirect URL for login response
24
- * @param {object} requestInfo corresponding request, used to obtain the id
25
- * @param {object} entity object includes both idp and sp
26
- * @param {object} user current logged user (e.g. req.user)
27
- * @param {String} relayState the relaystate sent by sp corresponding request
28
- * @param {function} customTagReplacement used when developers have their own login response template
29
- * @param AttributeStatement
30
- */
31
- declare function loginResponseRedirectURL(requestInfo: any, entity: any, user?: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext, AttributeStatement?: never[]): BindingContext;
32
- /**
33
- * @desc Redirect URL for logout request
34
- * @param {object} user current logged user (e.g. req.user)
35
- * @param {object} entity object includes both idp and sp
36
- * @param {function} customTagReplacement used when developers have their own login response template
37
- * @return {string} redirect URL
38
- */
39
- declare function logoutRequestRedirectURL(user: any, entity: any, relayState?: string, customTagReplacement?: (template: string, tags: object) => BindingContext): BindingContext;
40
- /**
41
- * @desc Redirect URL for logout response
42
- * @param {object} requescorresponding request, used to obtain the id
43
- * @param {object} entity object includes both idp and sp
44
- * @param {function} customTagReplacement used when developers have their own login response template
45
- */
46
- declare function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext;
47
- declare const redirectBinding: {
48
- loginRequestRedirectURL: typeof loginRequestRedirectURL;
49
- loginResponseRedirectURL: typeof loginResponseRedirectURL;
50
- logoutRequestRedirectURL: typeof logoutRequestRedirectURL;
51
- logoutResponseRedirectURL: typeof logoutResponseRedirectURL;
52
- };
53
- export default redirectBinding;
54
- //# sourceMappingURL=binding-redirect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"binding-redirect.d.ts","sourceRoot":"","sources":["../src/binding-redirect.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,gBAAgB,IAAI,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,eAAe,IAAI,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAOrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAgED;;;;;GAKG;AACH,iBAAS,uBAAuB,CAAC,MAAM,EAAE;IACvC,GAAG,EAAE,GAAG,CAAC;IACT,EAAE,EAAE,EAAE,CAAA;CACP,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAyC9E;AAED;;;;;;;;GAQG;AACH,iBAAS,wBAAwB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAC,kBAAkB,UAAI,GAAG,cAAc,CAoGxM;AAED;;;;;;GAMG;AACH,iBAAS,wBAAwB,CAAC,IAAI,KAAA,EAAE,MAAM,KAAA,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAwC9J;AAED;;;;;GAKG;AACH,iBAAS,yBAAyB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAyClK;AAED,QAAA,MAAM,eAAe;;;;;CAKpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * @file binding-simplesign.ts
3
- * @author Orange
4
- * @desc Binding-level API, declare the functions using POST SimpleSign binding
5
- */
6
- import type { BindingContext, SimpleSignComputedContext } from './entity.js';
7
- export interface BuildSimpleSignConfig {
8
- type: string;
9
- context: string;
10
- entitySetting: any;
11
- relayState?: string;
12
- }
13
- export interface BindingSimpleSignContext {
14
- id: string;
15
- context: string;
16
- signature: any;
17
- sigAlg: string;
18
- }
19
- /**
20
- * @desc Generate a base64 encoded login request
21
- * @param {string} referenceTagXPath reference uri
22
- * @param {object} entity object includes both idp and sp
23
- * @param {function} customTagReplacement used when developers have their own login response template
24
- */
25
- declare function base64LoginRequest(entity: any, customTagReplacement?: (template: string) => BindingContext): SimpleSignComputedContext;
26
- /**
27
- * @desc Generate a base64 encoded login response
28
- * @param {object} requestInfo corresponding request, used to obtain the id
29
- * @param {object} entity object includes both idp and sp
30
- * @param {object} user current logged user (e.g. req.user)
31
- * @param {string} relayState the relay state
32
- * @param {function} customTagReplacement used when developers have their own login response template
33
- * @param AttributeStatement
34
- */
35
- declare function base64LoginResponse(requestInfo: any | undefined, entity: any, user?: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext, AttributeStatement?: []): Promise<BindingSimpleSignContext>;
36
- declare const simpleSignBinding: {
37
- base64LoginRequest: typeof base64LoginRequest;
38
- base64LoginResponse: typeof base64LoginResponse;
39
- };
40
- export default simpleSignBinding;
41
- //# sourceMappingURL=binding-simplesign.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"binding-simplesign.d.ts","sourceRoot":"","sources":["../src/binding-simplesign.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAGF,OAAQ,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAO9E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AA6CD;;;;;EAKE;AACF,iBAAS,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,yBAAyB,CAkD/H;AACD;;;;;;;;GAQG;AACH,iBAAe,mBAAmB,CAAC,WAAW,EAAE,GAAG,YAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,kBAAkB,GAAC,EAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA6FtO;AAED,QAAA,MAAM,iBAAiB;;;CAGpB,CAAC;AAEJ,eAAe,iBAAiB,CAAC"}
@@ -1,38 +0,0 @@
1
- import Entity, { type ESamlHttpRequest } from './entity.js';
2
- import { ServiceProviderConstructor as ServiceProvider, IdentityProviderMetadata, type IdentityProviderSettings } from './types.js';
3
- import { type FlowResult } from './flow.js';
4
- import type { BindingContext } from './entity.js';
5
- /**
6
- * Identity provider can be configured using either metadata importing or idpSetting
7
- */
8
- export default function (props: IdentityProviderSettings): IdentityProvider;
9
- /**
10
- * Identity provider can be configured using either metadata importing or idpSetting
11
- */
12
- export declare class IdentityProvider extends Entity {
13
- entityMeta: IdentityProviderMetadata;
14
- constructor(idpSetting: IdentityProviderSettings);
15
- /**
16
- * @desc Generates the login response for developers to design their own method
17
- * @param params
18
- */
19
- createLoginResponse(params: {
20
- sp: ServiceProvider;
21
- requestInfo: Record<string, any>;
22
- binding?: string;
23
- user: Record<string, any>;
24
- customTagReplacement?: (template: string) => BindingContext;
25
- encryptThenSign?: boolean;
26
- relayState?: string;
27
- context: Record<string, any>;
28
- AttributeStatement: [];
29
- }): Promise<any>;
30
- /**
31
- * Validation of the parsed URL parameters
32
- * @param sp ServiceProvider instance
33
- * @param binding Protocol binding
34
- * @param req RequesmessageSigningOrderst
35
- */
36
- parseLoginRequest(sp: ServiceProvider, binding: string, req: ESamlHttpRequest): Promise<FlowResult>;
37
- }
38
- //# sourceMappingURL=entity-idp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-idp.d.ts","sourceRoot":"","sources":["../src/entity-idp.ts"],"names":[],"mappings":"AAYA,OAAO,MAAM,EAAE,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EACL,0BAA0B,IAAI,eAAe,EAE7C,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAO,WAAW,CAAC;AAEnD,OAAO,KAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,OAAO,WAAU,KAAK,EAAE,wBAAwB,oBAEtD;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAElC,UAAU,EAAE,wBAAwB,CAAC;gBAEjC,UAAU,EAAE,wBAAwB;IAqChD;;;OAGG;IACU,mBAAmB,CAAC,MAAM,EAAC;QACtC,EAAE,EAAE,eAAe,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1B,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,CAAC;QAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,kBAAkB,EAAC,EAAE,CAAA;KACtB;IAyCD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB;CAY9E"}
@@ -1,38 +0,0 @@
1
- /**
2
- * @file entity-sp.ts
3
- * @author tngan
4
- * @desc Declares the actions taken by service provider
5
- */
6
- import Entity from './entity.js';
7
- import type { BindingContext, PostBindingContext, ESamlHttpRequest, SimpleSignBindingContext } from './entity.js';
8
- import { IdentityProviderConstructor as IdentityProvider, ServiceProviderMetadata, type ServiceProviderSettings } from './types.js';
9
- import { type FlowResult } from './flow.js';
10
- export default function (props: ServiceProviderSettings): ServiceProvider;
11
- /**
12
- * @desc Service provider can be configured using either metadata importing or spSetting
13
- * @param {object} spSettingimport { FlowResult } from '../types/src/flow.d';
14
-
15
- */
16
- export declare class ServiceProvider extends Entity {
17
- entityMeta: ServiceProviderMetadata;
18
- /**
19
- * @desc Inherited from Entity
20
- * @param {object} spSetting setting of service provider
21
- */
22
- constructor(spSetting: ServiceProviderSettings);
23
- /**
24
- * @desc Generates the login request for developers to design their own method
25
- * @param {IdentityProvider} idp object of identity provider
26
- * @param {string} binding protocol binding
27
- * @param {function} customTagReplacement used when developers have their own login response template
28
- */
29
- createLoginRequest(idp: IdentityProvider, binding?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext | PostBindingContext | SimpleSignBindingContext;
30
- /**
31
- * @desc Validation of the parsed the URL parameters
32
- * @param {IdentityProvider} idp object of identity provider
33
- * @param {string} binding protocol binding
34
- * @param {request} req request
35
- */
36
- parseLoginResponse(idp: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
37
- }
38
- //# sourceMappingURL=entity-sp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-sp.d.ts","sourceRoot":"","sources":["../src/entity-sp.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AACF,OAAO,MAEN,MAAM,aAAa,CAAC;AACrB,OAAQ,KAAK,EAAG,cAAc,EAC5B,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EAAE,MAAK,aAAa,CAAC;AAC/C,OAAO,EACL,2BAA2B,IAAI,gBAAgB,EAC/C,uBAAuB,EACvB,KAAK,uBAAuB,EAC7B,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAO,WAAW,CAAC;AAKnD,MAAM,CAAC,OAAO,WAAU,KAAK,EAAE,uBAAuB,mBAErD;AAED;;;;EAIE;AACF,qBAAa,eAAgB,SAAQ,MAAM;IAChC,UAAU,EAAE,uBAAuB,CAAC;IAE7C;;;MAGE;gBACU,SAAS,EAAE,uBAAuB;IAS9C;;;;;MAKE;IACK,kBAAkB,CACvB,GAAG,EAAE,gBAAgB,EACrB,OAAO,SAAa,EACpB,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAC1D,cAAc,GAAG,kBAAkB,GAAE,wBAAwB;IAkChE;;;;;MAKE;IACK,kBAAkB,CAAC,GAAG,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,EAAE,gBAAgB;CAalE"}
package/types/entity.d.ts DELETED
@@ -1,100 +0,0 @@
1
- import { IdpMetadata as IdpMetadataConstructor } from './metadata-idp.js';
2
- import { SpMetadata as SpMetadataConstructor } from './metadata-sp.js';
3
- import type { MetadataIdpConstructor, MetadataSpConstructor, EntitySetting } from './types.js';
4
- import { type FlowResult } from './flow.js';
5
- export interface ESamlHttpRequest {
6
- query?: any;
7
- body?: any;
8
- octetString?: string;
9
- }
10
- export interface BindingContext {
11
- context: string;
12
- id: string;
13
- }
14
- export interface PostBindingContext extends BindingContext {
15
- relayState?: string;
16
- entityEndpoint: string;
17
- type: string;
18
- }
19
- export interface SimpleSignBindingContext extends PostBindingContext {
20
- sigAlg?: string;
21
- signature?: string;
22
- keyInfo?: string;
23
- }
24
- export interface SimpleSignComputedContext extends BindingContext {
25
- sigAlg?: string;
26
- signature?: string;
27
- }
28
- export interface ParseResult {
29
- samlContent: string;
30
- extract: any;
31
- sigAlg: string;
32
- }
33
- export type EntityConstructor = (MetadataIdpConstructor | MetadataSpConstructor) & {
34
- metadata?: string | Buffer;
35
- };
36
- export default class Entity {
37
- entitySetting: EntitySetting;
38
- entityType: string;
39
- entityMeta: IdpMetadataConstructor | SpMetadataConstructor;
40
- /**
41
- * @param entitySetting
42
- * @param entityMeta is the entity metadata, deprecated after 2.0
43
- */
44
- constructor(entitySetting: EntityConstructor, entityType: 'idp' | 'sp');
45
- /**
46
- * @desc Returns the setting of entity
47
- * @return {object}
48
- */
49
- getEntitySetting(): EntitySetting;
50
- /**
51
- * @desc Returns the xml string of entity metadata
52
- * @return {string}
53
- */
54
- getMetadata(): string;
55
- /**
56
- * @desc Exports the entity metadata into specified folder
57
- * @param {string} exportFile indicates the file name
58
- */
59
- exportMetadata(exportFile: string): void;
60
- /** * @desc Verify fields with the one specified in metadata
61
- * @param {string/[string]} field is a string or an array of string indicating the field value in SAML message
62
- * @param {string} metaField is a string indicating the same field specified in metadata
63
- * @return {boolean} True/False
64
- */
65
- verifyFields(field: string | string[], metaField: string): boolean;
66
- /** @desc Generates the logout request for developers to design their own method
67
- * @param {ServiceProvider} sp object of service provider
68
- * @param {string} binding protocol binding
69
- * @param {object} user current logged user (e.g. user)
70
- * @param {string} relayState the URL to which to redirect the user when logout is complete
71
- * @param {function} customTagReplacement used when developers have their own login response template
72
- */
73
- createLogoutRequest(targetEntity: any, binding: any, user: any, relayState?: string, customTagReplacement?: any): BindingContext | PostBindingContext;
74
- /**
75
- * @desc Generates the logout response for developers to design their own method
76
- * @param {IdentityProvider} idp object of identity provider
77
- * @param {object} requestInfo corresponding request, used to obtain the id
78
- * @param {string} relayState the URL to which to redirect the user when logout is complete.
79
- * @param {string} binding protocol binding
80
- * @param {function} customTagReplacement used when developers have their own login response template
81
- */
82
- createLogoutResponse(target: any, requestInfo: any, binding: any, relayState?: string, customTagReplacement?: any): BindingContext | PostBindingContext;
83
- /**
84
- * @desc Validation of the parsed the URL parameters
85
- * @param {IdentityProvider} idp object of identity provider
86
- * @param {string} binding protocol binding
87
- * @param {request} req request
88
- * @return {Promise}
89
- */
90
- parseLogoutRequest(from: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
91
- /**
92
- * @desc Validation of the parsed the URL parameters
93
- * @param {object} config config for the parser
94
- * @param {string} binding protocol binding
95
- * @param {request} req request
96
- * @return {Promise}
97
- */
98
- parseLogoutResponse(from: any, binding: any, request: ESamlHttpRequest): Promise<FlowResult>;
99
- }
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AQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEnC,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,sBAAsB,GAAG,qBAAqB,CAAC;IAE3D;;;MAGE;gBACU,aAAa,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,GAAG,IAAI;IAsBtE;;;MAGE;IACF,gBAAgB;IAGhB;;;MAGE;IACF,WAAW,IAAI,MAAM;IAIrB;;;MAGE;IACF,cAAc,CAAC,UAAU,EAAE,MAAM;IAIjC;;;;MAIE;IACF,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAgBlE;;;;;;MAME;IACF,mBAAmB,CAAC,YAAY,KAAA,EAAE,OAAO,KAAA,EAAE,IAAI,KAAA,EAAE,UAAU,SAAK,EAAE,oBAAoB,CAAC,KAAA,GAAG,cAAc,GAAG,kBAAkB;IAqB7H;;;;;;;MAOE;IACF,oBAAoB,CAAC,MAAM,KAAA,EAAE,WAAW,KAAA,EAAE,OAAO,KAAA,EAAE,UAAU,SAAK,EAAE,oBAAoB,CAAC,KAAA,GAAG,cAAc,GAAG,kBAAkB;IAuB/H;;;;;;MAME;IACF,kBAAkB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,EAAE,gBAAgB;IAY3D;;;;;;MAME;IACF,mBAAmB,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,EAAE,gBAAgB;CAY7D"}
@@ -1,26 +0,0 @@
1
- interface ExtractorField {
2
- key: string;
3
- localPath: string[] | string[][];
4
- attributes: string[];
5
- index?: string[];
6
- attributePath?: string[];
7
- context?: boolean;
8
- }
9
- export type ExtractorFields = ExtractorField[];
10
- export declare const loginRequestFields: ExtractorFields;
11
- export declare const loginResponseStatusFields: {
12
- key: string;
13
- localPath: string[];
14
- attributes: string[];
15
- }[];
16
- export declare const logoutResponseStatusFields: {
17
- key: string;
18
- localPath: string[];
19
- attributes: string[];
20
- }[];
21
- export declare const loginResponseFields: ((assertion: any) => ExtractorFields);
22
- export declare const logoutRequestFields: ExtractorFields;
23
- export declare const logoutResponseFields: ExtractorFields;
24
- export declare function extract(context: string, fields: any): any;
25
- export {};
26
- //# sourceMappingURL=extractor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../src/extractor.ts"],"names":[],"mappings":"AAKA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;IACjC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AA4B/C,eAAO,MAAM,kBAAkB,EAAE,eA2BhC,CAAC;AAGF,eAAO,MAAM,yBAAyB;;;;GAWrC,CAAC;AAGF,eAAO,MAAM,0BAA0B;;;;GAWtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,eAAe,CAiDrE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eA2BjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAiBlC,CAAC;AAEF,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAA,OAiM9C"}
package/types/flow.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export interface FlowResult {
2
- samlContent: string;
3
- extract: any;
4
- sigAlg?: string | null;
5
- }
6
- export declare function flow(options: any): Promise<FlowResult>;
7
- //# sourceMappingURL=flow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAC,IAAI,CAAE;CACvB;AA4ZD,wBAAgB,IAAI,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,UAAU,CAAC,CAyBjD"}
@@ -1,208 +0,0 @@
1
- import type { MetadataInterface } from './metadata.js';
2
- /**
3
- * 生成 SAML Attribute 元素(不带 XML 声明头)
4
- * @param {Array} attributeData - 属性配置数据
5
- * @returns {string} SAML Attribute XML 字符串
6
- */
7
- export interface SignatureConstructor {
8
- rawSamlMessage: string;
9
- referenceTagXPath?: string;
10
- privateKey: string;
11
- privateKeyPass?: string;
12
- signatureAlgorithm: string;
13
- signingCert: string | Buffer;
14
- isBase64Output?: boolean;
15
- signatureConfig?: any;
16
- isMessageSigned?: boolean;
17
- transformationAlgorithms?: string[];
18
- }
19
- export interface SignatureVerifierOptions {
20
- metadata?: MetadataInterface;
21
- keyFile?: string;
22
- signatureAlgorithm?: string;
23
- }
24
- export interface ExtractorResult {
25
- [key: string]: any;
26
- signature?: string | string[];
27
- issuer?: string | string[];
28
- nameID?: string;
29
- notexist?: boolean;
30
- }
31
- export interface LoginResponseAttribute {
32
- name: string;
33
- nameFormat: string;
34
- valueXsiType: string;
35
- valueTag: string;
36
- valueXmlnsXs?: string;
37
- valueXmlnsXsi?: string;
38
- type?: string | string[];
39
- }
40
- export interface LoginResponseAdditionalTemplates {
41
- attributeStatementTemplate?: AttributeStatementTemplate;
42
- attributeTemplate?: AttributeTemplate;
43
- }
44
- export interface BaseSamlTemplate {
45
- context: string;
46
- }
47
- export interface LoginResponseTemplate extends BaseSamlTemplate {
48
- attributes?: LoginResponseAttribute[];
49
- additionalTemplates?: LoginResponseAdditionalTemplates;
50
- }
51
- export interface AttributeStatementTemplate extends BaseSamlTemplate {
52
- }
53
- export interface AttributeTemplate extends BaseSamlTemplate {
54
- }
55
- export interface LoginRequestTemplate extends BaseSamlTemplate {
56
- }
57
- export interface LogoutRequestTemplate extends BaseSamlTemplate {
58
- }
59
- export interface LogoutResponseTemplate extends BaseSamlTemplate {
60
- }
61
- export type KeyUse = 'signing' | 'encryption';
62
- export interface KeyComponent {
63
- [key: string]: any;
64
- }
65
- export interface LibSamlInterface {
66
- getQueryParamByType: (type: string) => string;
67
- createXPath: (local: any, isExtractAll?: boolean) => string;
68
- replaceTagsByValue: (rawXML: string, tagValues: any) => string;
69
- attributeStatementBuilder: (attributes: LoginResponseAttribute[], attributeTemplate: AttributeTemplate, attributeStatementTemplate: AttributeStatementTemplate) => string;
70
- constructSAMLSignature: (opts: SignatureConstructor) => string;
71
- verifySignature: (xml: string, opts: SignatureVerifierOptions) => [boolean, any];
72
- createKeySection: (use: KeyUse, cert: string | Buffer) => {};
73
- constructMessageSignature: (octetString: string, key: string, passphrase?: string, isBase64?: boolean, signingAlgorithm?: string) => string;
74
- verifyMessageSignature: (metadata: any, octetString: string, signature: string | Buffer, verifyAlgorithm?: string) => boolean;
75
- getKeyInfo: (x509Certificate: string, signatureConfig?: any) => void;
76
- encryptAssertion: (sourceEntity: any, targetEntity: any, entireXML: string) => Promise<string>;
77
- decryptAssertion: (here: any, entireXML: string) => Promise<[string, any]>;
78
- getSigningScheme: (sigAlg: string) => string | null;
79
- getDigestMethod: (sigAlg: string) => string | null;
80
- nrsaAliasMapping: any;
81
- defaultLoginRequestTemplate: LoginRequestTemplate;
82
- defaultLoginResponseTemplate: LoginResponseTemplate;
83
- defaultAttributeStatementTemplate: AttributeStatementTemplate;
84
- defaultAttributeTemplate: AttributeTemplate;
85
- defaultLogoutRequestTemplate: LogoutRequestTemplate;
86
- defaultLogoutResponseTemplate: LogoutResponseTemplate;
87
- }
88
- declare const _default: {
89
- createXPath: (local: any, isExtractAll?: boolean) => string;
90
- getQueryParamByType: (type: string) => "SAMLRequest" | "SAMLResponse";
91
- defaultLoginRequestTemplate: {
92
- context: string;
93
- };
94
- defaultLoginResponseTemplate: {
95
- context: string;
96
- attributes: never[];
97
- additionalTemplates: {
98
- attributeStatementTemplate: {
99
- context: string;
100
- };
101
- attributeTemplate: {
102
- context: string;
103
- };
104
- };
105
- };
106
- defaultAttributeStatementTemplate: {
107
- context: string;
108
- };
109
- defaultAttributeTemplate: {
110
- context: string;
111
- };
112
- defaultLogoutRequestTemplate: {
113
- context: string;
114
- };
115
- defaultLogoutResponseTemplate: {
116
- context: string;
117
- };
118
- defaultAttributeValueTemplate: {
119
- context: string;
120
- };
121
- /**
122
- * @desc Replace the tag (e.g. {tag}) inside the raw XML
123
- * @param {string} rawXML raw XML string used to do keyword replacement
124
- * @param {array} tagValues tag values
125
- * @return {string}
126
- */
127
- replaceTagsByValue(rawXML: string, tagValues: Record<string, unknown>): string;
128
- /**
129
- * @desc Helper function to build the AttributeStatement tag
130
- * @param {LoginResponseAttribute} attributes an array of attribute configuration
131
- * @param {AttributeTemplate} attributeTemplate the attribute tag template to be used
132
- * @param {AttributeStatementTemplate} attributeStatementTemplate the attributeStatement tag template to be used
133
- * @return {string}
134
- */
135
- /** For Test */
136
- attributeStatementBuilder(attributeData: any[]): string;
137
- /**
138
- * @desc Construct the XML signature for POST binding
139
- * @param {string} rawSamlMessage request/response xml string
140
- * @param {string} referenceTagXPath reference uri
141
- * @param {string} privateKey declares the private key
142
- * @param {string} passphrase passphrase of the private key [optional]
143
- * @param {string|buffer} signingCert signing certificate
144
- * @param {string} signatureAlgorithm signature algorithm
145
- * @param {string[]} transformationAlgorithms canonicalization and transformation Algorithms
146
- * @return {string} base64 encoded string
147
- */
148
- constructSAMLSignature(opts: SignatureConstructor): string;
149
- /**
150
- * @desc Verify the XML signature
151
- * @param {string} xml xml
152
- * @param {SignatureVerifierOptions} opts cert declares the X509 certificate
153
- * @return {[boolean, string | null]} - A tuple where:
154
- * - The first element is `true` if the signature is valid, `false` otherwise.
155
- * - The second element is the cryptographically authenticated assertion node as a string, or `null` if not found.
156
- */
157
- verifySignature(xml: string, opts: SignatureVerifierOptions): (string | boolean)[] | (boolean | null)[];
158
- /**
159
- * @desc Helper function to create the key section in metadata (abstraction for signing and encrypt use)
160
- * @param {string} use type of certificate (e.g. signing, encrypt)
161
- * @param {string} certString declares the certificate String
162
- * @return {object} object used in xml module
163
- */
164
- createKeySection(use: KeyUse, certString: string | Buffer): KeyComponent;
165
- /**
166
- * SAML 消息签名 (符合 SAML V2.0 绑定规范)
167
- * @param octetString - 要签名的原始数据 (OCTET STRING)
168
- * @param key - PEM 格式私钥
169
- * @param passphrase - 私钥密码 (如果有加密)
170
- * @param isBase64 - 是否返回 base64 编码 (默认 true)
171
- * @param signingAlgorithm - 签名算法 (默认 'rsa-sha256')
172
- * @returns 消息签名
173
- */
174
- constructMessageSignature(octetString: string | Buffer, key: string | Buffer, passphrase?: string, isBase64?: boolean, signingAlgorithm?: string): string | Buffer;
175
- verifyMessageSignature(metadata: any, octetString: string, signature: string | Buffer, verifyAlgorithm?: string): boolean;
176
- /**
177
- * @desc Get the public key in string format
178
- * @param {string} x509Certificate certificate
179
- * @return {string} public key
180
- */
181
- getKeyInfo(x509Certificate: string, signatureConfig?: any): {
182
- getKeyInfo: () => string;
183
- getKey: () => string;
184
- };
185
- /**
186
- * @desc Encrypt the assertion section in Response
187
- * @param {Entity} sourceEntity source entity
188
- * @param {Entity} targetEntity target entity
189
- * @param {string} xml response in xml string format
190
- * @return {Promise} a promise to resolve the finalized xml
191
- */
192
- encryptAssertion(sourceEntity: any, targetEntity: any, xml?: string): Promise<string>;
193
- /**
194
- * @desc Decrypt the assertion section in Response
195
- * @param {string} type only accept SAMLResponse to proceed decryption
196
- * @param {Entity} here this entity
197
- * @param {Entity} from from the entity where the message is sent
198
- * @param {string} entireXML response in xml string format
199
- * @return {function} a promise to get back the entire xml with decrypted assertion
200
- */
201
- decryptAssertion(here: any, entireXML: string): Promise<[string, any]>;
202
- /**
203
- * @desc Check if the xml string is valid and bounded
204
- */
205
- isValidXml(input: string): Promise<any>;
206
- };
207
- export default _default;
208
- //# sourceMappingURL=libsaml.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"libsaml.d.ts","sourceRoot":"","sources":["../src/libsaml.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAiCrD;;;;GAIG;AAGH,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;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AC;IAC5C,4BAA4B,EAAE,qBAAqB,CAAC;IACpD,6BAA6B,EAAE,sBAAsB,CAAC;CACvD;;6CAoH4C,OAAO,KAAG,MAAM;gCA5GxB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmJvC;;;;;OAKG;+BACwB,MAAM,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAS9E;;;;;;OAMG;IAmCH,eAAe;6CAC0B,GAAG,EAAE,GAAG,MAAM;IAyCvD;;;;;;;;;;OAUG;iCAC0B,oBAAoB;IA+CjD;;;;;;;OAOG;yBAEkB,MAAM,QAAQ,wBAAwB;IAyL3D;;;;;OAKG;0BACmB,MAAM,cAAc,MAAM,GAAG,MAAM,GAAG,YAAY;IAuBxE;;;;;;;;OAQG;2CAGY,MAAM,GAAG,MAAM,OACvB,MAAM,GAAG,MAAM,eACP,MAAM,aACT,OAAO,qBACC,MAAM,GACvB,MAAM,GAAG,MAAM;uDA8BH,MAAM,aACR,MAAM,GAAG,MAAM,oBACR,MAAM;IAc1B;;;;OAIG;gCACyB,MAAM,oBAAmB,GAAG;;;;IAWxD;;;;;;OAMG;iEAEgD,MAAM;IAqDzD;;;;;;;OAOG;2CAC+B,MAAM;IAkCxC;;OAEG;sBACqB,MAAM;;AA4BlC,wBAAyB"}
@@ -1,25 +0,0 @@
1
- /**
2
- * @file metadata-idp.ts
3
- * @author tngan
4
- * @desc Metadata of identity provider
5
- */
6
- import Metadata, { type MetadataInterface } from './metadata.js';
7
- import type { MetadataIdpConstructor } from './types.js';
8
- export interface IdpMetadataInterface extends MetadataInterface {
9
- }
10
- export default function (meta: MetadataIdpConstructor): IdpMetadata;
11
- export declare class IdpMetadata extends Metadata {
12
- constructor(meta: MetadataIdpConstructor);
13
- /**
14
- * @desc Get the preference whether it wants a signed request
15
- * @return {boolean} WantAuthnRequestsSigned
16
- */
17
- isWantAuthnRequestsSigned(): boolean;
18
- /**
19
- * @desc Get the entity endpoint for single sign on service
20
- * @param {string} binding protocol binding (e.g. redirect, post)
21
- * @return {string/object} location
22
- */
23
- getSingleSignOnService(binding: string): string | object;
24
- }
25
- //# sourceMappingURL=metadata-idp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata-idp.d.ts","sourceRoot":"","sources":["../src/metadata-idp.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AACF,OAAO,QAAQ,EAAE,EAAE,KAAM,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAQ,KAAK,EAAsB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAM9E,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;CAE9D;AAKD,MAAM,CAAC,OAAO,WAAU,IAAI,EAAE,sBAAsB,eAEnD;AAED,qBAAa,WAAY,SAAQ,QAAQ;gBAE3B,IAAI,EAAE,sBAAsB;IA6FxC;;;MAGE;IACF,yBAAyB,IAAI,OAAO;IAQpC;;;;MAIE;IACF,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;CAUzD"}
@@ -1,37 +0,0 @@
1
- /**
2
- * @file metadata-sp.ts
3
- * @author tngan
4
- * @desc Metadata of service provider
5
- */
6
- import Metadata, { type MetadataInterface } from './metadata.js';
7
- import type { MetadataSpConstructor } from './types.js';
8
- export interface SpMetadataInterface extends MetadataInterface {
9
- }
10
- export default function (meta: MetadataSpConstructor): SpMetadata;
11
- /**
12
- * @desc SP Metadata is for creating Service Provider, provides a set of API to manage the actions in SP.
13
- */
14
- export declare class SpMetadata extends Metadata {
15
- /**
16
- * @param {object/string} meta (either xml string or configuration in object)
17
- * @return {object} prototypes including public functions
18
- */
19
- constructor(meta: MetadataSpConstructor);
20
- /**
21
- * @desc Get the preference whether it wants a signed assertion response
22
- * @return {boolean} Wantassertionssigned
23
- */
24
- isWantAssertionsSigned(): boolean;
25
- /**
26
- * @desc Get the preference whether it signs request
27
- * @return {boolean} Authnrequestssigned
28
- */
29
- isAuthnRequestSigned(): boolean;
30
- /**
31
- * @desc Get the entity endpoint for assertion consumer service
32
- * @param {string} binding protocol binding (e.g. redirect, post)
33
- * @return {string/[string]} URL of endpoint(s)
34
- */
35
- getAssertionConsumerService(binding: string): string | string[];
36
- }
37
- //# sourceMappingURL=metadata-sp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metadata-sp.d.ts","sourceRoot":"","sources":["../src/metadata-sp.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AACF,OAAO,QAAQ,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAE/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAMxD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;CAE7D;AAcD,MAAM,CAAC,OAAO,WAAU,IAAI,EAAE,qBAAqB,cAElD;AAED;;EAEE;AACF,qBAAa,UAAW,SAAQ,QAAQ;IAEtC;;;MAGE;gBACU,IAAI,EAAE,qBAAqB;IA2LvC;;;MAGE;IACK,sBAAsB,IAAI,OAAO;IAGxC;;;MAGE;IACK,oBAAoB,IAAI,OAAO;IAGtC;;;;MAIE;IACK,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE;CAoBvE"}