NAME
Auth::Login - Authorization Framework for wxPerl - Loggin In
SYNOPSIS
use Auth::Backend::SQL;
use Auth;
use Auth::Login;
use DBI;
use Lang::SQL;
use Lang;
package testApp;
use base 'Wx::App';
sub OnInit {
my $dbname="zclass";
my $host="localhost";
my $user="zclass";
my $pass="";
my $dsn="dbi:Pg:dbname=$dbname;host=$host";
Lang::init(new Lang::SQL("dbi:Pg:dbname=$dbname;host=$host",$user,$pass));
my $backend=Auth::Backend::SQL->new($dsn,$user,$pass);
my $auth=Auth->new($backend);
my $login=Auth::Login->new($auth,"test application");
my $ticket=$login->login();
$ticket->log();
$ticket=Auth::Ticket->new(ADMIN => 1);
$ticket->log();
$auth->create_account("admin","test",$ticket);
print "login with admin, pass=test\n";
$ticket=$login->login();
$ticket->log();
$login->Destroy;
return 0;
}
package main;
my $a= new testApp;
$a->MainLoop();
ABSTRACT
'Auth::Login' is part of the authorization framework that can be used in conjunction with wxPerl. It provides the gui part for logging in.
DESCRIPTION
new(Auth object, title [,parent])
--> Auth::Login
This method initializes the Login dialog and returns an Auth::Login object.
login
--> Auth::Ticket
Shows a modal dialog that can be used to log into something. Returns a ticket. If the user presses the Cancel button, an invalid ticket.
Internationalization
This module uses '_T' functions for internationalization of text strings used in this module. It has been programmed to use the 'Lang' framework.
SEE ALSO
http://wxperl.sf.net, Lang framework, Auth framework, Auth::Ticket, Auth::Backend::SQL.
AUTHOR
Hans Oesterholt-Dijkema <oesterhol@cpan.org>
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under LGPL terms.