Public
Like
saml-helper
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
index.ts
https://mthadley--a9b5b48a375111f082549e149126039e.web.val.run
A web-based tool for debugging SAML responses. Paste in a URL containing a SAML response to decode and analyze the assertions, with optional signature verification.
- URL Parsing: Extract SAML responses from URLs (supports both
SAMLResponse
andRelayState
parameters) - Base64 Decoding: Automatically decode base64-encoded SAML responses
- XML Parsing: Parse and display SAML XML in a readable format
- Assertion Analysis: Extract and display all assertions with their attributes
- Signature Verification: Optional signature verification using provided certificates
- User-friendly UI: Clean interface with syntax highlighting and collapsible sections
├── backend/
│ ├── index.ts # Main Hono server
│ └── routes/
│ └── saml.ts # SAML processing endpoints
├── frontend/
│ ├── index.html # Main HTML template
│ ├── components/
│ │ ├── App.tsx # Main React component
│ │ ├── SamlDecoder.tsx # SAML decoding interface
│ │ └── AssertionViewer.tsx # Assertion display component
│ └── index.tsx # Frontend entry point
├── shared/
│ ├── types.ts # Shared TypeScript types
│ └── utils.ts # Shared utility functions
└── README.md
- Navigate to the application
- Paste a URL containing a SAML response in the input field
- Click "Decode SAML Response" to parse and display the response
- Optionally provide a certificate for signature verification
- View the decoded assertions and their attributes
GET /
- Serves the main applicationPOST /api/saml/decode
- Decodes SAML response from URLPOST /api/saml/verify
- Verifies SAML response signature
The application uses:
- Backend: Hono framework with TypeScript
- Frontend: React with TypeScript and TailwindCSS
- XML Processing: DOMParser for XML parsing
- Crypto: Web Crypto API for signature verification