module

CrystalSaml::Utils

Instance methods

base64_decode(encoded : String) : String

Base64 decode (for HTTP-POST binding -- no deflation).

Source
base64_encode(data : String) : String

Base64 encode (for HTTP-POST binding -- no deflation).

Source
build_redirect_url(base_url : String, params : Hash(String, String)) : String

Build redirect URL with query parameters.

Source
decode_and_inflate(encoded : String) : String

Base64 decode + inflate (for HTTP-Redirect binding).

Source
deflate_and_encode(xml : String) : String

Deflate + Base64 encode (for HTTP-Redirect binding).

Source
fingerprint(cert_pem : String, algorithm : String = "sha256") : String

Compute certificate fingerprint.

Source
format_cert(cert : String) : String

Ensure PEM formatting with proper headers.

Source
format_private_key(key : String) : String

Ensure PEM formatting for private key.

Source
parse_timestamp(str : String) : Time

Parse an ISO 8601 timestamp.

Source
timestamp(time : Time = Time.utc) : String

ISO 8601 timestamp for SAML (UTC, no fractional seconds).

Source
url_decode(str : String) : String

URL-decode a string.

Source
url_encode(str : String) : String

URL-encode a string.

Source
uuid

Generate a unique ID for SAML requests (prefixed with underscore per spec).

Source