Apache::SWIT::Security - security subsystem for Apache::SWIT


Apache-SWIT-Security documentation Contained in the Apache-SWIT-Security distribution.

Index


Code Index:

NAME

Top

Apache::SWIT::Security - security subsystem for Apache::SWIT

SYNOPSIS

Top

# to install, from command line prompt: Your-Module $ perl -MApache::SWIT::Security \ -e 'Apache::SWIT::Security::Maker->install_subsystem("Sec")

DISCLAIMER

Top

This is pre-alpha quality software. Please use it on your own risk.

DESCRIPTION

Top

This module provides security subsystem for Apache::SWIT based modules.

It does users, roles, url based security etc. For more details look at the included tests.

BUGS

Top

Much needed documentation is non-existant at the moment.

AUTHOR

Top

	Boris Sukholitko
	boriss@gmail.com

COPYRIGHT

Top

SEE ALSO

Top

Apache::SWIT


Apache-SWIT-Security documentation Contained in the Apache-SWIT-Security distribution.

use strict;
use warnings FATAL => 'all';

package Apache::SWIT::Security;
use base 'Exporter';
use Digest::MD5 qw(md5_hex);

our @EXPORT_OK = qw(Sealed_Params Hash);
our $VERSION = 0.13;

sub Sealed_Params {
	my $r = shift;
	my $s = HTML::Tested::Seal->instance;
	return map { $_ ? $s->decrypt($_) : undef }
		map { ($r->param($_) || '') } @_;
}

sub Hash {
	return md5_hex(($ENV{AS_SECURITY_SALT} // "") . shift);
}

1;