@authhero/saml 0.5.18 → 0.6.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.
package/dist/core.d.ts CHANGED
@@ -21,6 +21,23 @@ declare const samlRequestSchema: z.ZodObject<{
21
21
  "@_Version": z.ZodString;
22
22
  }, z.core.$strip>;
23
23
  }, z.core.$strip>;
24
+ declare const samlLogoutRequestSchema: z.ZodObject<{
25
+ "samlp:LogoutRequest": z.ZodObject<{
26
+ "saml:Issuer": z.ZodObject<{
27
+ "#text": z.ZodString;
28
+ "@_xmlns:saml": z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ "saml:NameID": z.ZodOptional<z.ZodObject<{
31
+ "#text": z.ZodString;
32
+ }, z.core.$strip>>;
33
+ "samlp:SessionIndex": z.ZodOptional<z.ZodObject<{
34
+ "#text": z.ZodString;
35
+ }, z.core.$strip>>;
36
+ "@_ID": z.ZodString;
37
+ "@_Version": z.ZodOptional<z.ZodString>;
38
+ "@_Destination": z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>;
40
+ }, z.core.$strip>;
24
41
  declare const samlMetadataResponseSchema: z.ZodArray<z.ZodObject<{
25
42
  ":@": z.ZodObject<{
26
43
  "@_xmlns": z.ZodString;
@@ -486,6 +503,36 @@ declare function parseSamlRequestQuery(samlRequestQuery: string): Promise<{
486
503
  "@_ProtocolBinding"?: string | undefined;
487
504
  };
488
505
  }>;
506
+ declare function parseSamlLogoutRequestQuery(samlRequestQuery: string): Promise<{
507
+ "samlp:LogoutRequest": {
508
+ "saml:Issuer": {
509
+ "#text": string;
510
+ "@_xmlns:saml"?: string | undefined;
511
+ };
512
+ "@_ID": string;
513
+ "saml:NameID"?: {
514
+ "#text": string;
515
+ } | undefined;
516
+ "samlp:SessionIndex"?: {
517
+ "#text": string;
518
+ } | undefined;
519
+ "@_Version"?: string | undefined;
520
+ "@_Destination"?: string | undefined;
521
+ };
522
+ }>;
523
+ interface SAMLLogoutResponseParams {
524
+ issuer: string;
525
+ destination: string;
526
+ inResponseTo?: string;
527
+ success: boolean;
528
+ /** Only used when `success` is false. */
529
+ statusMessage?: string;
530
+ }
531
+ /**
532
+ * Builds an unsigned, HTTP-Redirect-encoded (raw deflate + base64) SAML
533
+ * LogoutResponse, ready to be URL-encoded into the `SAMLResponse` query param.
534
+ */
535
+ declare function createSamlLogoutResponse(params: SAMLLogoutResponseParams): Promise<string>;
489
536
  declare function createSamlMetadata(samlMetadataParams: SAMLMetadataParams): string;
490
537
  declare function createSamlResponse(samlResponseParams: SAMLResponseParams, signer?: SamlSigner): Promise<string>;
491
538
 
@@ -499,5 +546,5 @@ declare class HttpSamlSigner implements SamlSigner {
499
546
  signSAML(xmlContent: string, privateKey: string, publicCert: string): Promise<string>;
500
547
  }
501
548
 
502
- export { HttpSamlSigner, createSamlMetadata, createSamlResponse, dsSignatureSchema, inflateDecompress, inflateRaw, parseSamlRequestQuery, samlIssuerSchema, samlMetadataResponseSchema, samlRequestSchema, samlResponseJsonSchema };
503
- export type { DSIGSignature, SAMLMetadataParams, SAMLMetadataResponse, SAMLResponseJSON, SAMLResponseParams, SamlSigner };
549
+ export { HttpSamlSigner, createSamlLogoutResponse, createSamlMetadata, createSamlResponse, dsSignatureSchema, inflateDecompress, inflateRaw, parseSamlLogoutRequestQuery, parseSamlRequestQuery, samlIssuerSchema, samlLogoutRequestSchema, samlMetadataResponseSchema, samlRequestSchema, samlResponseJsonSchema };
550
+ export type { DSIGSignature, SAMLLogoutResponseParams, SAMLMetadataParams, SAMLMetadataResponse, SAMLResponseJSON, SAMLResponseParams, SamlSigner };