| 1 | package OpenID::Lite::SessionHandlers; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | ▶ | use OpenID::Lite::Constants::SessionType qw(:all); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use OpenID::Lite::SessionHandler::NoEncryption; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 0 | ▶ | use OpenID::Lite::SessionHandler::DH::SHA1; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 10 | use OpenID::Lite::SessionHandler::DH::SHA256; | ||
| 11 | |||
| 12 | # dispatch table | ||
| 13 | my %handlers = ( | ||
| 14 | NO_ENCRYPTION() => OpenID::Lite::SessionHandler::NoEncryption->new, | ||
| 15 | DH_SHA1() => OpenID::Lite::SessionHandler::DH::SHA1->new, | ||
| 16 | DH_SHA256() => OpenID::Lite::SessionHandler::DH::SHA256->new, | ||
| 17 | ); | ||
| 18 | |||
| 19 | sub select_session { | ||
| 20 | my ( $class, $type ) = @_; | ||
| 21 | return $handlers{$type}; | ||
| 22 | } | ||
| 23 | |||
| 24 | 1; | ||
| 25 | |||