|
NAMEApache::AuthTicket::Base - Common methods for all Apache::AuthTicket versions.VERSIONversion 0.94SYNOPSIS# This module is internal to Apache::AuthTicket. you should never use this # module directly. DESCRIPTIONThis module is a base class providing common methods for "Apache::AuthTicket" and "Apache2::AuthTicket".METHODSconfigureApache2::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. parse_ticketmy $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:
sqlGet the "SQL::Abstract" object.get_configmy $value = $self->get_config($name) Get a configuration value, or its default value if the setting is not configured. make_login_screenmy $result = $self->make_login_screen($r, $action, $destination) Print out the login screen html, and return an Apache status code. dbhGet the database handledbi_connectmy $dbh = $self->dbi_connect Returns a new connection to the database check_credentialsmy $ok = $self->check_credentials($username, $password) Return "true" if the credentials are valid fetch_secretmy ($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. secret_versionReturns the version of the current (most-recent) secretmake_ticketmy $string = $self->make_ticket($username) Creates a ticket string for the given username serialize_ticketmy $data = $self->serialize_ticket($hashref) Encode the hashref in a format suitable for sending in a HTTP cookie unserialize_ticketmy $hashref = $self->unserialize_ticket($data) Decode cookie data into hashref. This is the opposite of serialize_ticket() new_ticket_formy $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. delete_ticket$self->delete_ticket($r) Invalidates the ticket by expiring the cookie and deletes the hash from the database save_hash$self->save_hash($hash) save the hash value/checksum in the database delete_hash$self->delete_hash($hash) Remove the given hash from the database. is_hash_validmy $ok = $self->is_hash_valid($hash) Return "true" if the given hash is in the local database hash_formy $hash = $self->hash_for(@values) Compute a hash for the given values user_agentmy $agent = $self->user_agent Get the request client's user agent string compare_passwordmy $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:
str_config_valuemy $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. ticket_tablemy ($name, $hash_col, $timestamp_col) = $self->ticket_table Unpacks the config value "TicketTable" into its components. user_tablemy ($name, $hash_col, $timestamp_col) = $self->ticket_table Unpacks the config value "TicketUserTable" into its components. secret_tablemy ($name, $hash_col, $timestamp_col) = $self->ticket_table Unpacks the config value "TicketSecretTable" into its components. push_handler$class->push_handler($name => sub { ... }); Subclass Must Implement This. Push the given subroutine as a mod_perl handler set_user$self->set_user($username) Subclass Must Implement This. Set the username for this request. apache_constmy $const = $self->apache_const($name) Subclass Must Implement This. Return the given apache constant. SOURCEThe development version is on github at <http://github.com/mschout/apache-authticket> and may be cloned from <git://github.com/mschout/apache-authticket.git>BUGSPlease 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-AuthTicketAUTHORMichael Schout <mschout@cpan.org>COPYRIGHT AND LICENSEThis 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.
Visit the GSP FreeBSD Man Page Interface. |