@better-auth/sso 1.5.0-beta.13 → 1.5.0-beta.15

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.
@@ -1,5 +1,5 @@
1
1
  /* cspell:ignore xenc */
2
- import { afterEach, describe, expect, it, vi } from "vitest";
2
+ import { describe, expect, it, vi } from "vitest";
3
3
  import * as alg from "./algorithms";
4
4
 
5
5
  const encryptedAssertionXml = `
@@ -41,10 +41,6 @@ const plainAssertionXml = `
41
41
  `;
42
42
 
43
43
  describe("validateSAMLAlgorithms", () => {
44
- afterEach(() => {
45
- vi.restoreAllMocks();
46
- });
47
-
48
44
  describe("signature validation", () => {
49
45
  it("should accept secure signature algorithms", () => {
50
46
  expect(() =>
@@ -205,10 +201,6 @@ describe("algorithm constants", () => {
205
201
  });
206
202
 
207
203
  describe("validateConfigAlgorithms", () => {
208
- afterEach(() => {
209
- vi.restoreAllMocks();
210
- });
211
-
212
204
  describe("signature algorithm validation", () => {
213
205
  it("should accept secure signature algorithms", () => {
214
206
  expect(() =>
@@ -0,0 +1,11 @@
1
+ import { defineErrorCodes } from "@better-auth/core/utils/error-codes";
2
+
3
+ export const SAML_ERROR_CODES = defineErrorCodes({
4
+ // SLO errors
5
+ SINGLE_LOGOUT_NOT_ENABLED: "Single Logout is not enabled",
6
+ INVALID_LOGOUT_RESPONSE: "Invalid LogoutResponse",
7
+ INVALID_LOGOUT_REQUEST: "Invalid LogoutRequest",
8
+ LOGOUT_FAILED_AT_IDP: "Logout failed at IdP",
9
+ IDP_SLO_NOT_SUPPORTED: "IdP does not support Single Logout Service",
10
+ SAML_PROVIDER_NOT_FOUND: "SAML provider not found",
11
+ });