Module esaml_util

Utility functions.

Description

Utility functions

Function Index

check_dupe_ets/2Checks for a duplicate assertion using ETS tables in memory on all available nodes.
convert_fingerprints/1Converts various ascii hex/base64 fingerprint formats to binary.
datetime_to_saml/1Converts a calendar:datetime() into SAML time string.
load_certificate/1
load_certificate_chain/1Loads certificate chain from a file on disk (or ETS memory cache).
load_metadata/1Reads IDP metadata from a URL (or ETS memory cache).
load_metadata/2Reads IDP metadata from a URL (or ETS memory cache) and validates the signature.
load_private_key/1Loads a private key from a file on disk (or ETS memory cache).
saml_to_datetime/1Converts a SAML time string into a calendar:datetime().
unique_id/0

Function Details

check_dupe_ets/2

check_dupe_ets(A::esaml:assertion(), Digest::binary()) -> ok | {error, duplicate_assertion}

Checks for a duplicate assertion using ETS tables in memory on all available nodes.

This is a helper to be used as a DuplicateFun with esaml_sp:validate_assertion/3. If you aren't using standard erlang distribution for your app, you probably don't want to use this.

convert_fingerprints/1

convert_fingerprints(FPs::[string() | binary()]) -> [binary()]

Converts various ascii hex/base64 fingerprint formats to binary

datetime_to_saml/1

datetime_to_saml(Time::calendar:datetime()) -> esaml:datetime()

Converts a calendar:datetime() into SAML time string

load_certificate/1

load_certificate(Path::string()) -> binary()

load_certificate_chain/1

load_certificate_chain(Path::string()) -> [binary()]

Loads certificate chain from a file on disk (or ETS memory cache)

load_metadata/1

load_metadata(Url::string()) -> esaml:idp_metadata()

Reads IDP metadata from a URL (or ETS memory cache)

load_metadata/2

load_metadata(Url::string(), Fingerprints::[string() | binary()]) -> esaml:idp_metadata()

Reads IDP metadata from a URL (or ETS memory cache) and validates the signature

load_private_key/1

load_private_key(Path::string()) -> #'RSAPrivateKey'{}

Loads a private key from a file on disk (or ETS memory cache)

saml_to_datetime/1

saml_to_datetime(Stamp::esaml:datetime()) -> calendar:datetime()

Converts a SAML time string into a calendar:datetime()

Inverse of datetime_to_saml/1

unique_id/0

unique_id() -> any()


Generated by EDoc