18 Apr 2021 23:37:18 UTC
- Distribution: Authen-NZRealMe
- Module version: 1.23
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Issues (0)
- Testers (16 / 0 / 0)
- KwaliteeBus factor: 2
- % Coverage
- License: perl_5
- Perl: v5.14.0
- Activity24 month
- Download (165.52KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionAJM Andrew Maguireand 1 contributors
- Andrew Maguire
Authen::NZRealMe::TokenGenerator - generate SAML ID strings
This class is responsible for generating random ID tokens such as:
Although the methods are described below, the preferred way to use this class is via the ServiceProvider:
$sp->generate_saml_id( args );
Any arguments provided will be ignored if
strong_tokenis used (see below) or will be passed to
weak_tokenfor the fallback implementation.
Constructor. Should not be called directly. Instead, call:
Generates and returns a hex-encoded random token (guaranteed to start with a letter) using
strong_tokenif possible and
On systems where the device /dev/urandom is available, it will be used. This method will read 20 bytes from the random device and return a hex-encoded representation of those bytes.
Otherwise, returns undef.
Will be called if
strong_tokenis not able to find a strong source of random data. As this method uses Perl's built-in
randfunction, which is not a cryptographically strong source of randomness, its use should be avoided.
If your platform does not provide /dev/urandom, you are advised to use the
Authen::NZRealMe->register_classmethod to provide an alternative implementation for
See Authen::NZRealMe for documentation index.
Copyright (c) 2014-2022 Enrolment Services, New Zealand Electoral Commission
Written by Grant McLean <email@example.com>
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install Authen::NZRealMe, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Authen::NZRealMe
For more information on module installation, please visit the detailed CPAN module installation guide.