NAME

Authen::NZRealMe::Asserts - a collection of assertion functions for data safety

DESCRIPTION

The functions exported by this module are intended to allow code to assert things about supplied data values. If the assertion is valid then the function will simply return, otherwise an exception will be thrown.

Note: It is unfortunate that the word 'assertion' is used to describe both a thing you are assuming is true and a key element of SAML. This module is an implementation of the former within a set of modules that implement the latter.

SYNOPSIS

  use Authen::NZRealMe::Asserts  qw(assert_is_base64);

  assert_is_base64($post_param, '$args{saml_response}');

EXPORTED FUNCTIONS

assert_is_base64( $value, $description )

Checks that the supplied $value contains only valid characters for a Base64-encoded value. If invalid characters are found, an exception will be thrown. The exception message will include $description to aid in identifying where the bad data came from.