Result:
found more than 567 distributions - search limited to the first 2001 files matching your query ( run in 0.423 )


AnyEvent-InfluxDB

 view release on metacpan or  search on metacpan

lib/AnyEvent/InfluxDB.pm  view on Meta::CPAN

The required C<on_response> code reference is executed with the raw response
data and headers as parameters.

=head1 CAVEATS

Following the optimistic nature of InfluxDB this modules does not validate any
arguments. Also quoting and escaping special characters is to be done by the
user of this library.

=head1 AUTHOR

 view all matches for this distribution


AnyEvent-Net-Curl-Queued

 view release on metacpan or  search on metacpan

lib/AnyEvent/Net/Curl/Queued/Easy.pm  view on Meta::CPAN

        verbose             => 1,
    );

Complete list of options: L<http://curl.haxx.se/libcurl/c/curl_easy_setopt.html>

If C<CURLOPT_POSTFIELDS> is a C<HashRef> or looks like a valid JSON (validates via L<JSON>),
it is encoded as UTF-8 and C<Content-Type: application/json; charset=utf-8> header is set automatically.

=head2 getinfo(VAR_NAME [, VAR_NAME])

Extends L<Net::Curl::Easy> C<getinfo()> so it is able to get several variables at once;

 view all matches for this distribution


AnyEvent-Pg-Pool-Multiserver

 view release on metacpan or  search on metacpan

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN


use Carp qw( croak carp );
use AnyEvent;
use AnyEvent::Pg::Pool;
use Future;
use Params::Validate qw( validate_with );

use fields qw(
  pool
  local
);

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN

  my $class  = shift;
  my $params = {@_};

  my $self = fields::new( $class );

  $params = $self->_validate_new( $params );

  my $pool = {};

  foreach my $server ( @{ $params->{servers} } ) {
    my $dbh = AnyEvent::Pg::Pool->new(

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN

  $self->{local} = $params->{local};

  return $self;
}

sub _validate_new {
  my __PACKAGE__ $self = shift;
  my $params = shift;

  $params = validate_with(
    params => $params,
    spec => {
      servers => 1,
      local   => 1,
    },

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN


sub selectall_arrayref {
  my __PACKAGE__ $self = shift;
  my $params = {@_};

  $params = $self->_validate_selectall_arrayref( $params );

  my @futures = ();

  my @pool = ();
  if ( defined $params->{server_id} ) {

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN

  } );

  return;
}

sub _validate_selectall_arrayref {
  my __PACKAGE__ $self = shift;
  my $params = shift;

  $params = validate_with(
    params => $params,
    spec => {
      query     => 1,
      args      => 0,
      cb        => 1,

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN


sub selectrow_hashref {
  my __PACKAGE__ $self = shift;
  my $params = {@_};

  $params = $self->_validate_selectrow_hashref( $params );

  my $future = $self->_get_future_push_query(
    query     => $params->{query},
    args      => $params->{args},
    server    => $self->{pool}{ $params->{server_id} },

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN

  } );

  return;
}

sub _validate_selectrow_hashref {
  my __PACKAGE__ $self = shift;
  my $params = shift;

  $params = validate_with(
    params => $params,
    spec => {
      query     => 1,
      args      => 0,
      cb        => 1,

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN


sub selectrow_array {
  my __PACKAGE__ $self = shift;
  my $params = {@_};

  $params = $self->_validate_selectrow_array( $params );

  my $future = $self->_get_future_push_query(
    query     => $params->{query},
    args      => $params->{args},
    server    => $self->{pool}{ $params->{server_id} },

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN

  } );

  return;
}

sub _validate_selectrow_array {
  my __PACKAGE__ $self = shift;
  my $params = shift;

  $params = validate_with(
    params => $params,
    spec => {
      query     => 1,
      args      => 0,
      cb        => 1,

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN


sub do {
  my __PACKAGE__ $self = shift;
  my $params = {@_};

  $params = $self->_validate_do( $params );

  my $future = $self->_get_future_push_query(
    query     => $params->{query},
    args      => $params->{args},
    server    => $self->{pool}{ $params->{server_id} },

lib/AnyEvent/Pg/Pool/Multiserver.pm  view on Meta::CPAN

  } );

  return;
}

sub _validate_do {
  my __PACKAGE__ $self = shift;
  my $params = shift;

  $params = validate_with(
    params => $params,
    spec => {
      query     => 1,
      args      => 0,
      cb        => 1,

 view all matches for this distribution


AnyEvent-PgRecvlogical

 view release on metacpan or  search on metacpan

lib/AnyEvent/PgRecvlogical.pm  view on Meta::CPAN

        $_->{Driver}->{Name} eq 'Pg'
          and $_->{pg_server_version} >= PG_MIN_VERSION
          and $_->{Name} =~ /replication=/;
    },
    message => sub {
        my $parent_check = (InstanceOf ['DBI::db'])->validate($_);
        return $parent_check if $parent_check;
        return "$_ is not a DBD::Pg handle" unless $_->{Driver}->{Name} eq 'Pg';
        return "$_ is connected to an old postgres version ($_->{pg_server_version} < 9.4.0)"
          unless $_->{pg_server_version} >= PG_MIN_VERSION;
        return "$_ is not a replication connection: $_->{Name}" unless $_->{Name} =~ /replication=/;

 view all matches for this distribution


AnyEvent-Processor

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution


AnyEvent-REST-Server

 view release on metacpan or  search on metacpan

lib/AnyEvent/REST/Server.pm  view on Meta::CPAN

    my ($self, $id, $code, $custom_header, $body) = @_;

    my $HTTP_EOL = "\r\n";

    my $header = {
        'Cache-Control' => 'max-age=0, no-cache, must-revalidate, proxy-revalidate, private',
        'Pragma' => 'no-cache',
        'Content-Type' => 'application/octet-stream',
        %$custom_header,
        'Content-Length' => length($body),
        'Server' => $self->{name},

 view all matches for this distribution


AnyEvent-RabbitMQ

 view release on metacpan or  search on metacpan

share/fixed_amqp0-8.xml  view on Meta::CPAN

      method.  If set to zero, the delivery tag refers to a single
      message.  If the multiple field is 1, and the delivery tag is zero,
      tells the server to acknowledge all outstanding mesages.
    </doc>
    <doc name = "rule" test = "amq_basic_20">
      The server MUST validate that a non-zero delivery-tag refers to an
      delivered message, and raise a channel exception if this is not the
      case.
    </doc>
  </field>
</method>

share/fixed_amqp0-8.xml  view on Meta::CPAN

      method.  If set to zero, the delivery tag refers to a single
      message.  If the multiple field is 1, and the delivery tag is zero,
      tells the server to acknowledge all outstanding mesages.
    </doc>
    <doc name = "rule">
      The server MUST validate that a non-zero delivery-tag refers to an
      delivered message, and raise a channel exception if this is not the
      case.
    </doc>
  </field>
</method>

 view all matches for this distribution


AnyEvent-SMTP

 view release on metacpan or  search on metacpan

lib/AnyEvent/SMTP/Server.pm  view on Meta::CPAN

    
    use AnyEvent::SMTP::Server;
    
    my $server = AnyEvent::SMTP::Server->new(
        port => 2525,
        mail_validate => sub {
            my ($m,$addr) = @_;
            if ($good) { return 1 } else { return 0, 513, 'Bad sender.' }
        },
        rcpt_validate => sub {
            my ($m,$addr) = @_;
            if ($good) { return 1 } else { return 0, 513, 'Bad recipient.' }
        },
        data_validate => sub {
            my ($m,$data) = @_;
            my $size = length $data;
            if ($size > $max_email_size) {
                return 0, 552, 'REJECTED: message size limit exceeded';
            } else {

lib/AnyEvent/SMTP/Server.pm  view on Meta::CPAN

				@addrs = map { $_->address } Mail::Address->parse($from);
				@addrs == 1 or return $con->reply('501 Usage: MAIL FROM:<mail addr>');
			} else {
				@addrs = ('');
			}
			if ($self->{mail_validate}) {
				my ($res,$err,$errstr) = $self->{mail_validate}->($con->{m}, $addrs[0]);
				$res or return $con->reply("$err $errstr");
			}
			$con->{m}{from} = $addrs[0];
			$con->ok;
		},

lib/AnyEvent/SMTP/Server.pm  view on Meta::CPAN

			my $to = join ' ',@args;
			$to =~ s{^to:}{}i or return $con->reply('501 Usage: RCPT TO:<mail addr>');
			defined $con->{m}{from} or return $con->reply("503 Error: need MAIL command");
			my @addrs = map { $_->address } Mail::Address->parse($to);
			@addrs or return $con->reply('501 Usage: RCPT TO:<mail addr>');
			if ($self->{rcpt_validate}) {
				my ($res,$err,$errstr) = $self->{rcpt_validate}->($con->{m}, $addrs[0]);
				$res or return $con->reply("$err $errstr");
			}
			push @{ $con->{m}{to} ||= [] }, $addrs[0];
			$con->ok;
		},

lib/AnyEvent/SMTP/Server.pm  view on Meta::CPAN

			defined $con->{m}{from} or return $con->reply("503 Error: need MAIL command");
			$con->{m}{to}   or return $con->reply("554 Error: need RCPT command");
			$con->reply("354 End data with <CR><LF>.<CR><LF>");
			$con->data(cb => sub {
				my $data = shift;
				if ($self->{data_validate}) {
					my ($res,$err,$errstr) = $self->{data_validate}->($con->{m}, $data);
					$res or return $con->reply("$err $errstr");
				}
				$con->{m}{data} = $data;
				local $s->{event_failed} = 0;
				local $s->{current_con} = $con;

 view all matches for this distribution


AnyEvent-Task

 view release on metacpan or  search on metacpan

t/setup-errors.t  view on Meta::CPAN


use Test::More tests => 2;


## The point of this test is to verify that exceptions thrown in
## setup callbacks are propagated to the client. It also validates
## that by default workers are restarted on setup errors.


my $attempt = 0;

 view all matches for this distribution


AnyEvent-UWSGI

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

 view all matches for this distribution


AnyEvent-WebSocket-Server

 view release on metacpan or  search on metacpan

lib/AnyEvent/WebSocket/Server.pm  view on Meta::CPAN

=over

=item C<handshake> => CODE (optional)

A subroutine reference to customize the WebSocket handshake process.
You can use this option to validate and preprocess the handshake request and customize the handshake response.

For each request, the handshake code is called like

    ($response, @other_results) = $handshake->($request, $default_response)

lib/AnyEvent/WebSocket/Server.pm  view on Meta::CPAN


=item C<validator> => CODE (optional)

B<< This option is only for backward compatibility. Use C<handshake> option instead. If C<handshake> option is specified, this option is ignored. >>

A subroutine reference to validate the incoming WebSocket request.
If omitted, it accepts the request.

The validator is called like

    @other_results = $validator->($request)

 view all matches for this distribution


AnyEvent-XMPP-Ext-HTML

 view release on metacpan or  search on metacpan

lib/AnyEvent/XMPP/Ext/HTML.pm  view on Meta::CPAN


Initialize the extension.  This does not need to be called externally.

=head1 CAVEATS

HTML messages are not validated nor escaped, so it is your responsibility to
use valid XHTML-IM tags and to close them properly.

=head1 AUTHOR

Charles McGarvey <ccm@cpan.org>

 view all matches for this distribution


AnyEvent-XSPromises

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

uvoffuni_to_utf8_flags||5.019004|
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
valid_utf8_to_uvchr||5.015009|
valid_utf8_to_uvuni||5.015009|
validate_proto|||
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vform||5.006000|

 view all matches for this distribution


AnyEvent-YACurl

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

utilize|||
uvchr_to_utf8_flags||5.007003|
uvchr_to_utf8|||
uvuni_to_utf8_flags||5.007003|
uvuni_to_utf8||5.007001|
validate_suid|||
varname|||
vcmp||5.009000|
vcroak||5.006000|
vdeb||5.007003|
vform||5.006000|

 view all matches for this distribution


AnyEvent-ZeroMQ

 view release on metacpan or  search on metacpan

t/types.t  view on Meta::CPAN

    },
);

sub endpoint {
    my $in = shift;
    return Endpoint()->validate($in) ? 0 : 1;
}

runtests;

 view all matches for this distribution


AnyMerchant

 view release on metacpan or  search on metacpan

lib/AnyMerchant.pm  view on Meta::CPAN

=head2 gateway

    my $gateway = AnyMerchant->gateway('Balanced', password => 'abc123');

This is a static factory method that creates an AnyMerchant::Gateway::* object,
validates its interface, and returns it.
In the above example, an AnyMerchant::Gateway::Balanced object is returned.

=head1 AUTHOR

Naveed Massjouni <naveedm9@gmail.com>

 view all matches for this distribution


AnyMongo

 view release on metacpan or  search on metacpan

lib/AnyMongo/Collection.pm  view on Meta::CPAN

    }

    return $obj->{n};
}

sub validate {
    my ($self, $scan_data) = @_;
    $scan_data = 0 unless defined $scan_data;
    my $obj = $self->_database->run_command({ validate => $self->name });
}

sub drop_indexes {
    my ($self) = @_;
    return $self->drop_index('*');

 view all matches for this distribution


Apache-ASP

 view release on metacpan or  search on metacpan

ASP.pm  view on Meta::CPAN

  PerlSetVar HTTPOnlySession 1

=item ParanoidSession

default 0.  When true, stores the user-agent header of the browser 
that creates the session and validates this against the session cookie presented.
If this check fails, the session is killed, with the rationale that 
there is a hacking attempt underway.

This config option was implemented to be a smooth upgrade, as
you can turn it off and on, without disrupting current sessions.  

ASP.pm  view on Meta::CPAN

   + removed IsChanged() INTERNAL API since compiling of scripts
     is now handled by CompileInclude() which does this functionality already
   + removed unnecessary decomp of IncludesChanged() INTERNAL API, which was along
     critical code path
   + do not call INTERNAL SearchDirs() API when compiling base script
     since we have already validated its path earlier
   + Use stat(_) type shortcut for stat() & -X calls where possible
   + Moved @INC initilization up to handler() & consolidated with $INCDir lib
   + removed useless Apache::ASP::Collection::DESTROY
   + removed useless Apache::ASP::Server::DESTROY
   + removed useless Apache::ASP::GlobalASA::DESTROY

 view all matches for this distribution


Apache-AntiSpam-JavaScript

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

       - code cleanup (regex uses /i)
       - expanded JavaScript code for commandline validator

0.02  Fre Apr 30 18:22:37 CEST 2004
       - code cleanup
       - expanded JavaScript code to have this validate against http://validator.w3.org/

0.01  Fri Oct 24 13:25:48 CEST 2003
	- original version; created by h2xs 1.20 with options
		-AXc -n Apache::AntiSpam::JavaScript

 view all matches for this distribution


Apache-AppSamurai

 view release on metacpan or  search on metacpan

lib/Apache/AppSamurai/AuthBase.pm  view on Meta::CPAN


This is called by Apache::AppSamurai to perform the authentication check.
It is called with an object reference and takes the username and password
as scalar arguments.

The username is validated using L</CheckInputUser()>, and then the password
is validated using L</CheckInputPass()>.  (If either of those fail,
an error is added and 0 is returned.)

After validation, L</Initialize()> is called if the C<< $self->{init} >>
flag has not been set.  (Note - Apache::AppSamurai calls C<Initialize()>
separately.  This functionality is added as a fail safe, or for testing.)

lib/Apache/AppSamurai/AuthBase.pm  view on Meta::CPAN

C<Authenticate()> should not generally need to be overridden.

=head2 CheckInputUser()

Is called with an object ref and expects a scalar username as its only
argument.  If successful, the validated username is returned.  In case of
a failure or violation, C<undef> is returned.

C<CheckInputUser()> uses settings out of C<< $self->{conf} >> as follows:

=over 4

lib/Apache/AppSamurai/AuthBase.pm  view on Meta::CPAN

If I<UserLc> is 1, the username is converted to all lower case.  (Note - 
I<UserUc> takes precedence if both are set.)

=back

If all conditions are met, the validated and cleaned username is returned.

C<CheckInputUser()> should not generally need to be overridden unless an
authentication module needs more extensive filtering.

=head2 CheckInputPass()

Is called with an object ref and expects a scalar password as its only
argument.  If successful, the validated password is returned.  In case of
a failure or violation, C<undef> is returned.

Note - "password" is used in the descriptions below.  This equates the
whatever data, (password, passphrase, PIN, whatever), will be passed as
an authentication credential to the authentication module.

lib/Apache/AppSamurai/AuthBase.pm  view on Meta::CPAN

Once again, avoid limiting the maximum password length as much as safely
possible.

=back

If all conditions are met, the validated and cleaned password is returned.

C<CheckInputPass()> should not generally need to be overridden unless an
authentication module needs more extensive filtering.

=head2 AddError()

 view all matches for this distribution


Apache-AuthCAS

 view release on metacpan or  search on metacpan

lib/Apache/AuthCAS.pm  view on Meta::CPAN

my $DB_ERROR_CODE = "Database Service Error";
my $PGT_ERROR_CODE = "CAS Proxy Service Error";
my $INVALID_ST_ERROR_CODE = "Invalid Service Ticket";
my $INVALID_PGT_ERROR_CODE = "Invalid Proxy Granting Ticket";
my $MISSING_NETID_ERROR_CODE = "CAS failed to return NetID";
my $CAS_CONNECT_ERROR_CODE = "CAS couldn't validate service ticket";
# the URL a client is redirected to after logging in
my $SERVICE="";
# the service proxy tickets will be granted for
my $PROXY_SERVICE="";
# the host name of the CAS server

lib/Apache/AuthCAS.pm  view on Meta::CPAN

my $DEFAULT_CAS_LOGOUT_URI="/cas/logout";
my $CAS_LOGOUT_URI=$DEFAULT_CAS_LOGOUT_URI;
# CAS proxy URI
my $DEFAULT_CAS_PROXY_URI="/cas/proxy";
my $CAS_PROXY_URI=$DEFAULT_CAS_PROXY_URI;
# CAS proxy validate URI
my $DEFAULT_CAS_PROXY_VALIDATE_URI="/cas/proxyValidate";
my $CAS_PROXY_VALIDATE_URI=$DEFAULT_CAS_PROXY_VALIDATE_URI;
# CAS service validate URI
my $DEFAULT_CAS_SERVICE_VALIDATE_URI="/cas/serviceValidate";
my $CAS_SERVICE_VALIDATE_URI=$DEFAULT_CAS_SERVICE_VALIDATE_URI;
# parameter used to pass in PGTIOU
my $PGT_IOU_PARAM = "pgtIou";
# parameter used to pass in PGT

lib/Apache/AuthCAS.pm  view on Meta::CPAN

	# note: not an else if, because we may find an invalid session id and
	#       fallback to ticket

	# if we have a service ticket
	if (($sid eq "") and ($ticket ne "")) {
		# validate service ticket through CAS, since no valid cookie was found
		my %properties = $self->validate_service_ticket($r, $ticket, $PROXY_SERVICE ?"1":"0");
		if ($properties{'error'}) {
			# error occurred validating service ticket
			return $self->redirect($r, $ERROR_URL, $properties{'error'});
		} else {
			Apache->warn("$$: CAS: authenticate(): valid service ticket '$ticket'") unless ($LOG_LEVEL < $LOG_DEBUG);

lib/Apache/AuthCAS.pm  view on Meta::CPAN

	}
}

# params
#     apache request object
#     ticket to be validated
#     1 or 0, whether we need proxy tickets
# returns a hash with keys on success
# 	  'user', 'pgtiou'
# NULL on failure
sub validate_service_ticket($$) {
	my $self = shift;
	my $r = shift;
	my $ticket = shift;
	my $proxy = shift;

	Apache->warn("$$: CAS: validate_service_ticket(): validating service ticket '$ticket' through CAS") unless ($LOG_LEVEL < $LOG_DEBUG);
	my %properties;

	my $service;
	if ($SERVICE eq "") {
		# use the current URL as the service

lib/Apache/AuthCAS.pm  view on Meta::CPAN

	} else {
		# use the static entry point into this service
		$service = $self->urlEncode($SERVICE);
	}

	Apache->warn("$$: CAS: validate_service_ticket(): requesting validation for service: '$service'") unless ($LOG_LEVEL < $LOG_DEBUG);
	my $tmp;
	# FIXME - diff urls for proxy vs. none?
	if ($proxy) {
		$tmp = $CAS_PROXY_VALIDATE_URI . "?service=$service&ticket=$ticket&pgtUrl=$service";
	} else {
		$tmp = $CAS_SERVICE_VALIDATE_URI . "?service=$service&ticket=$ticket";
	}

	Apache->warn("$$: CAS: validate_service_ticket(): request URL: '$tmp'") unless ($LOG_LEVEL < $LOG_DEBUG);

	if ($LOG_LEVEL >= $LOG_INSANE) {
		$Net::SSLeay::trace = 3;  # 0=no debugging, 1=ciphers, 2=trace, 3=dump data
	} else {
		$Net::SSLeay::trace = 0;  # 0=no debugging, 1=ciphers, 2=trace, 3=dump data

lib/Apache/AuthCAS.pm  view on Meta::CPAN


	my ($page, $response, %reply_headers) = Net::SSLeay::get_https($CAS_HOST, $CAS_PORT, $tmp);

	# if we had some type of connection problem
	if (!defined($page)) {
		Apache->warn("$$: CAS: validate_service_ticket(): error validating service");
		$properties{'error'} = $CAS_CONNECT_ERROR_CODE;
		return %properties;
	}

	Apache->warn("$$: CAS: validate_service_ticket(): page: $page") unless ($LOG_LEVEL < $LOG_INSANE);
	Apache->warn("$$: CAS: validate_service_ticket(): response: $response") unless ($LOG_LEVEL < $LOG_INSANE);

	# FIXME - add a check for a 404 error/other errors
	if ($page =~ /<cas:user>([^<]+)<\/cas:user>/) {
		my $user = $1;
		chomp $user;
		Apache->warn("$$: CAS: validate_service_ticket(): valid service ticket, user '$user' authenticated") unless ($LOG_LEVEL < $LOG_DEBUG);
		$properties{'user'} = $user;
	
		# only try to get PGTIOU if we are doing proxy stuff
		if ($proxy) {
			if ($page =~ /<cas:proxyGrantingTicket>([^<]+)<\/cas:proxyGrantingTicket>/) {
				Apache->warn("$$: CAS: validate_service_ticket(): got pgt='$1' for user='$user'") unless ($LOG_LEVEL < $LOG_DEBUG);
				if ($1 ne "") {
					$properties{'pgtiou'} = $1;
				} else {
					Apache->warn("$$: CAS: validate_service_ticket(): empty PGT in response from CAS") unless ($LOG_LEVEL < $LOG_ERROR);
				}
			} else {
				Apache->warn("$$: CAS: validate_service_ticket(): no PGT in response from CAS") unless ($LOG_LEVEL < $LOG_ERROR);
				$properties{'error'} = $PGT_ERROR_CODE;
				return %properties;
			}
		}
	} else {
		Apache->warn("$$: CAS: validate_service_ticket(): invalid service ticket, user denied access") unless ($LOG_LEVEL < $LOG_DEBUG);
		$properties{'error'} = $INVALID_ST_ERROR_CODE;
		return %properties;
	}

	return %properties;

lib/Apache/AuthCAS.pm  view on Meta::CPAN


    # not currently able to override through Apache configuration:
    #   CAS login URI
    #   CAS logout URI
    #   CAS proxy URI
    #   CAS proxy validate URI
    #   CAS service validate URI
    #   parameter used to pass in PGTIOU
    #   parameter used to pass in PGT
    #   session cleanup threshold
    #   basic authentication emulation

 view all matches for this distribution


Apache-AuthCASSimple

 view release on metacpan or  search on metacpan

lib/Apache/AuthCASSimple.pm  view on Meta::CPAN

  }


  # Validate the ticket we received
  if ($args{ticket}=~/^PT/) {
      my $r = $cas->proxy_validate( $requested_url, $args{ticket} );
        if( $r->is_success() ) {
            $user=$r->user();
            $log->warn(__PACKAGE__.": Validate PT on CAS Proxy server. ".join ",", $r->proxies());
        };
  }
  else {
      my $r = $cas->service_validate( $requested_url, $args{ticket} );
      if ( $r->is_success() ) {
        $user = $r->user();
      }
  }

  unless ($user) {
    $log->warn(__PACKAGE__.": Unable to validate ticket ".$args{ticket}." on CAS server.");
    $r->err_header_out("Location" => $login_url);
    return REDIRECT;
    #return FORBIDDEN;
  }

  $log->info(__PACKAGE__.": Ticket ".$args{ticket}." succesfully validated.");

  if ( $user ) {
   $r->connection->user($user);

   $log->info(__PACKAGE__.": New session ".$r->uri() ."--".$r->args());

 view all matches for this distribution


Apache-AuthCookieDBI

 view release on metacpan or  search on metacpan

AuthCookieDBI.pm  view on Meta::CPAN


The file that contains the secret key (on the first line of the file).  This
is required and has no default value.  This key should be owned and only
readable by root.  It is read at server startup time.  The key should be long
and fairly random.  If you want, you can change it and restart the server,
(maybe daily), which will invalidate all prior-issued tickets.

This directive MUST be set before the PerlModule line that loads this module,
because the secret key file is read immediately (at server start time).  This
is so you can have it owned and only readable by root even though Apache
then changes to another user.

 view all matches for this distribution


Apache-AuthCookieDBIRadius

 view release on metacpan or  search on metacpan

AuthCookieDBIRadius.pm  view on Meta::CPAN

	#<WhatEverDBI_SecretKeyFile>
	#The file that contains the secret key (on the first line of the file).  This
	#is required and has no default value.  This key should be owned and only
	#readable by root.  It is read at server startup time.
	#The key should be long and fairly random.  If you want, you
	#can change it and restart the server, (maybe daily), which will invalidate
	#all prior-issued tickets.

	unless ( $c{ DBI_secretkeyfile } = _dir_config_var $r, 'DBI_SecretKeyFile' )
	{
		_log_not_set $r, 'DBI_SecretKeyFile';

AuthCookieDBIRadius.pm  view on Meta::CPAN


The file that contains the secret key (on the first line of the file).  This
is required and has no default value.  This key should be owned and only
readable by root.  It is read at server startup time.
The key should be long and fairly random.  If you want, you
can change it and restart the server, (maybe daily), which will invalidate
all prior-issued tickets.

=item C<WhatEverDBI_EncryptionType>

What kind of encryption to use to prevent the user from looking at the fields

 view all matches for this distribution


Apache-AuthCookieLDAP

 view release on metacpan or  search on metacpan

AuthCookieLDAP.pm  view on Meta::CPAN


The file that contains the secret key (on the first line of the file).  This
is required and has no default value.  This key should be owned and only
readable by root.  It is read at server startup time.
The key should be long and fairly random.  If you want, you
can change it and restart the server, (maybe daily), which will invalidate
all prior-issued tickets.

=cut

	unless (

 view all matches for this distribution


Apache-AuthCookieNTLM

 view release on metacpan or  search on metacpan

lib/Apache/AuthCookieNTLM.pm  view on Meta::CPAN


# Private method to set the cookie
sub set_cookie {
	my ($self, $conf) = @_;
	
	# Must have the user name to validate check_cookie()
	$cookie_values->{'username'} = $self->{'username'};
	$cookie_values->{'userdomain'} = $self->{'userdomain'};

	while( my ($name, $value) = each %{$conf}) {
		$cookie_values->{$name} = $value;

 view all matches for this distribution


Apache-AuthCookiePAM

 view release on metacpan or  search on metacpan

AuthCookiePAM.pm  view on Meta::CPAN


The file that contains the secret key (on the first line of the file).  This
is required and has no default value.  This key should be owned and only
readable by root.  It is read at server startup time.  The key should be long
and fairly random.  If you want, you can change it and restart the server,
(maybe daily), which will invalidate all prior-issued tickets.

This directive MUST be set before the PerlModule line that loads this module,
because the secret key file is read immediately (at server start time).  This
is so you can have it owned and only readable by root even though Apache
then changes to another user.

 view all matches for this distribution


Apache-AuthCookieURL

 view release on metacpan or  search on metacpan

AuthCookieURL.pm  view on Meta::CPAN

    </Files>

    # Note: If protecting the entire web site (from root down) then
    # the action *must* be C</LOGIN> as the module looks for this string.

    # better to just invalidate the session, of course
    <Files LOGOUT>
         AuthType Apache::AuthCookieURLHandler
         PerlSetVar WhateverLogoutURI /
         AuthName Whatever
         SetHandler perl-script

AuthCookieURL.pm  view on Meta::CPAN

a drop-in replacement for Apache::AuthCookie you may wish to install and test with Ken's
Apache::AuthCookie before trying AuthCookieURL.

Basically, this module allows you to catch any unauthenticated access and redirect to a
login script that you define.  The login script posts credentials (e.g. username and password)
and your module can then validate and provide a session key.  The session key is sent in a cookie,
and also in a munged URL and a redirect is issued and the process starts all over.

Typically, you will write your own module that will override methods in Apache::AuthCookieURL.
These methods are described completely in Ken's Apache::AuthCookie.  Your methods will be used
to generate and validate session keys.  You can use Apache::AuthCookieURL without overriding
its methods and then AuthCookieURL can be used as a simple session manager.

With this module you should be able to enable session management for an entire site
using E<lt>Location /E<gt>, and then allow access to, say, the images directory, and also require
password access to other locations.  One issue at this point is that the session key is

AuthCookieURL.pm  view on Meta::CPAN

Another method is to return a session key that is really an error code and generate
messages based on that returned session (error) code.

=item * authen_ses_key()

This method's job is to validate and convert a session key into a username and return it.
AuthCookieURL places the returned value into $ENV{REMOTE_USER}.

=back

=head1 CONFIGURATION SETTINGS

 view all matches for this distribution


Apache-AuthDigest

 view release on metacpan or  search on metacpan

AuthzDigest.pm  view on Meta::CPAN

    # Likewise if the user requirement was specified and
    # we match based on what we already know.
    return OK if lc($directive) eq 'user' && grep { $_ eq $user } @list;
  }

  # if we get here we couldn't validate the user
  $log->error("Apache::AuthzDigest - user '", $r->user,
              "' not allowed");

  $r->note_digest_auth_failure;
  return AUTH_REQUIRED;

 view all matches for this distribution


Apache-AuthTicket

 view release on metacpan or  search on metacpan

lib/Apache/AuthTicket/Base.pm  view on Meta::CPAN


=head2 delete_ticket

 $self->delete_ticket($r)

Invalidates the ticket by expiring the cookie and deletes the hash from the database

=head2 save_hash

 $self->save_hash($hash)

 view all matches for this distribution


( run in 0.423 second using v1.01-cache-2.11-cpan-a5abf4f5562 )