Askr documentation
Generated API snapshot

@askrjs/auth/saml

Exports from the declarations published in @askrjs/auth. Signatures reflect the published artifact.

Exports

This entrypoint publishes 8 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

createSamlServiceProvidertype

createSamlServiceProvider: (options: SamlServiceProviderOptions) => SamlServiceProvider

Create a SAML service provider for metadata, login requests, and response validation.

SamlPrincipaltype

SamlPrincipal: any

Principal claims extracted from a validated SAML assertion.

saml
SAML issuer, subject, session, and attributes.

SamlRequestStoretype

SamlRequestStore: any

Persistence contract for pending SAML requests.

save
Persist a pending authentication request.
get
Load a pending authentication request.
consume
Consume a pending request exactly once.

SamlServiceProvidertype

SamlServiceProvider: any

SAML service-provider operations.

metadata
Render SAML metadata XML.
createAuthnRequest
Create a signed authentication request.
validateResponse
Validate an encoded SAML response.

SamlServiceProviderOptionstype

SamlServiceProviderOptions: any

Service-provider metadata, identity-provider details, and validation policy.

entityId
Service-provider entity ID.
acsUrl
Assertion-consumer service URL.
idp
Identity-provider entity ID, SSO URL, and signing certificates.
requestStore
Store for pending authentication requests.
signRequests
Optional request-signing key pair.
decryptAssertions
Optional assertion-decryption key pair.
requireSignedResponse
Require a valid XML signature on responses.
requestTtlSeconds
Pending-request lifetime in seconds.
maxAssertionAgeSeconds
Maximum assertion age in seconds.
clockSkewSeconds
Allowed clock skew in seconds.
clock
Clock returning Unix time in milliseconds.

SamlStoredRequesttype

SamlStoredRequest: any

Pending SAML authentication request retained for callback validation.

id
Request identifier.
createdAt
Creation time in Unix milliseconds.
expiresAt
Expiration time in Unix milliseconds.
relayState
Optional relay state returned by the identity provider.

SamlValidationErrortype

SamlValidationError: typeof SamlValidationError

Error raised when a SAML response fails validation.

code
Error category used for programmatic handling.

SamlValidationErrorCodetype

SamlValidationErrorCode: "malformed-response" | "unsupported-algorithm" | "invalid-signature" | "invalid-claim" | "unknown-request" | "replayed-response" | "idp-error"

Stable failure codes for SAML validation.