- or download this
my $bc = Authen::Bitcard->new;
$bc->token($assigned_bitcard_token);
$bc->info_optional([qw(name username email)]);
$bc->expires( 86400*30 );
$bc->key_cache($bitcard_pubkey_cache);
- or download this
print $cgi->p("Hi there...");
print $cgi->p("Please ", $cgi->a({ href=>$bc->login_url({r=>$cgi->u
+rl}) }, "login") . ".");
- or download this
$ses->expire("+1y"); # most of the session lasts forever
...
$ses->expire( user => "+1h" ); # this means every hour we'll verif
+y(bc_data)
}
- or download this
use Net::OpenID::Consumer;
use Digest::SHA1 qw(sha1);
...
use DBM::Deep;
use URI; # for port parsing
use Time::HiRes qw(time);
- or download this
my $nonce_pattern = q(%s%d%d%s my secret code words here) . $0;
my $nonce = $ses->param("nonce")
|| sha1(sprintf($nonce_pattern, time, (stat $0)[9], -s _, $clai
+m));
- or download this
my $ua = LWPx::ParanoidAgent->new;
...
return 1;
});
- or download this
my $csr = Net::OpenID::Consumer->new(
consumer_secret => $nonce,
...
ua => $ua,
required_root => $this_domain,
cache => Cache::File->new(cache_root=>"$session_director
+y/csr.cache/"));
- or download this
if ( $claim and not $cgi->param("checked") ) {
if( my $ci = $csr->claimed_identity($claim) ) {
...
}
}
- or download this
elsif( my $setup_url = $csr->user_setup_url ) {
# We only get here if we're not already logged into myopenid...
...
exit 0;
}
- or download this
elsif( (my $vfid = $csr->verified_identity) or (my $user = $ses->param
+("user")) ) {
my $dbm = DBM::Deep->new(file=>$dbm_file, locking => 1, autoflush
+=> 1);
...
exit 0;
}