GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Apache::AuthTicket::Base(3) User Contributed Perl Documentation Apache::AuthTicket::Base(3)

Apache::AuthTicket::Base - Common methods for all Apache::AuthTicket versions.

version 0.94

 # This module is internal to Apache::AuthTicket.  you should never use this
 # module directly.

This module is a base class providing common methods for "Apache::AuthTicket" and "Apache2::AuthTicket".

 Apache2::AuthTicket->configure(AuthName =>
    TicketUserTable => 'users:user_name:pass',
    TicketLoginHandler => '/login',
    ...
 );

This sets configuration values for a given AuthName. This is an alternative to using PerlSetVar's to specify all of the configuration settings.

 my $ok = $self->parse_ticket($ticket_string)

Verify the ticket string. If the ticket is invalid or tampered, the "AuthTicketReason" subprocess_env setting will be set to one of the following:

  • malformed_ticket

    Ticket does not contain the required fields

  • invalid_hash

    Ticket hash is not found in the database

  • expired_ticket

    Ticket has expired

  • missing_secret

    Secret that signed this ticket was not found

  • idle_timeout

    Ticket idle timeout exceeded

  • tampered_hash

    Ticket has been tampered with. The checksum does not match the checksum in the ticket

Get the "SQL::Abstract" object.

 my $value = $self->get_config($name)

Get a configuration value, or its default value if the setting is not configured.

 my $result = $self->make_login_screen($r, $action, $destination)

Print out the login screen html, and return an Apache status code.

Get the database handle

 my $dbh = $self->dbi_connect

Returns a new connection to the database

 my $ok = $self->check_credentials($username, $password)

Return "true" if the credentials are valid

 my ($value, $version) = $self->fetch_secret;
 my ($value) = $self->fetch_secret($version)

Return the secret and version of the secret. if the "version" argument is present, return that specific version of the secret instead of the most recent one.

Returns the version of the current (most-recent) secret

 my $string = $self->make_ticket($username)

Creates a ticket string for the given username

 my $data = $self->serialize_ticket($hashref)

Encode the hashref in a format suitable for sending in a HTTP cookie

 my $hashref = $self->unserialize_ticket($data)

Decode cookie data into hashref. This is the opposite of serialize_ticket()

 my $hashref = $self->new_ticket_for($username)

Creates new ticket hashref for the given username. You could overload this to append extra fields to the ticket.

 $self->delete_ticket($r)

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

 $self->save_hash($hash)

save the hash value/checksum in the database

 $self->delete_hash($hash)

Remove the given hash from the database.

 my $ok = $self->is_hash_valid($hash)

Return "true" if the given hash is in the local database

 my $hash = $self->hash_for(@values)

Compute a hash for the given values

 my $agent = $self->user_agent

Get the request client's user agent string

 my $ok = $self->compare_password($style, $entered, $actual)

Check a password and return "true" if "entered" matches "actual". "style" specifys what type of password is in "actual", and is one of the following:

  • crypt

    standard UNIX "crypt()" value

  • cleartext

    plain text password

  • md5

    MD5 hash of password

 my $val = $self->str_config_value($name)

Get a configuration value. This converts things like yes,on,true to 1, and no,off,false to 0. Multiple "name" values may be given and the first defined value will be returned. If no config value is defined matching any of the given "name"'s, then "undef" is returned.

 my ($name, $hash_col, $timestamp_col) = $self->ticket_table

Unpacks the config value "TicketTable" into its components.

 my ($name, $hash_col, $timestamp_col) = $self->ticket_table

Unpacks the config value "TicketUserTable" into its components.

 my ($name, $hash_col, $timestamp_col) = $self->ticket_table

Unpacks the config value "TicketSecretTable" into its components.

 $class->push_handler($name => sub { ... });

Subclass Must Implement This. Push the given subroutine as a mod_perl handler

 $self->set_user($username)

Subclass Must Implement This. Set the username for this request.

 my $const = $self->apache_const($name)

Subclass Must Implement This. Return the given apache constant.

The development version is on github at <http://github.com/mschout/apache-authticket> and may be cloned from <git://github.com/mschout/apache-authticket.git>

Please report any bugs or feature requests to bug-apache-authticket@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=Apache-AuthTicket

Michael Schout <mschout@cpan.org>

This software is copyright (c) 2000 by Michael Schout.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2017-07-28 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.