diff --git a/src/lib/examples.test.ts b/src/lib/examples.test.ts index 1c789f0..7bb5f04 100644 --- a/src/lib/examples.test.ts +++ b/src/lib/examples.test.ts @@ -104,14 +104,6 @@ describe('EXAMPLES', () => { expect(decodeSaml(url!.payload()).summary.binding).toBe('redirect'); }); - it('POST binding example uses post binding', () => { - const post = EXAMPLES.find( - (e) => e.category === 'Query string' && e.label.includes('POST') - ); - expect(post).toBeDefined(); - expect(decodeSaml(post!.payload()).summary.binding).toBe('post'); - }); - it('MFA SAMLResponse has REFEDS MFA authn context', () => { const mfa = EXAMPLES.find( (e) => e.category === 'SAMLResponse' && e.label.includes('MFA') diff --git a/src/lib/examples.ts b/src/lib/examples.ts index 0307eac..1ff598f 100644 --- a/src/lib/examples.ts +++ b/src/lib/examples.ts @@ -37,15 +37,6 @@ function encodeRedirectBinding(xml: string): string { return encodeURIComponent(btoa(binary)); } -function encodePostBinding(xml: string): string { - const bytes = new TextEncoder().encode(xml); - let binary = ''; - for (let i = 0; i < bytes.length; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); -} - function b64url(obj: object): string { return btoa(JSON.stringify(obj)) .replace(/=/g, '') @@ -229,11 +220,6 @@ export const EXAMPLES: Example[] = [ payload: () => `SAMLRequest=${encodeRedirectBinding(samlRequest())}&RelayState=%2Fdashboard`, }, - { - label: 'POST binding form value', - category: 'Query string', - payload: () => `SAMLResponse=${encodeURIComponent(encodePostBinding(samlResponse()))}`, - }, { label: 'IdP redirect binding URL', category: 'Full URL',