
WebService::Windows::LiveID::Auth - Perl implementation of Windows Live ID Web Authentication 1.0

version 0.01

use WebService::Windows::LiveID::Auth;
my $appid = '00163FFF80003203';
my $secret_key = 'ApplicationKey123';
my $appctx = 'zigorou';
my $auth = WebService::Windows::LiveID::Auth->new({
appid => $appid,
secret_key => $secret_key
});
local $\ = "\n";
print $auth->control_url; ### SignIn, SignOut links page by LiveID. Set this page url to iframe's src attribute.
print $auth->sign_in_url; ### SignIn page
print $auth->sign_out_url; ### SignOut page
In the request to "ReturnURL",
use CGI;
use WebService::Windows::LiveID::Auth;
my $q = CGI->new;
my $appid = '00163FFF80003203';
my $secret_key = 'ApplicationKey123';
my $appctx = 'zigorou';
my $auth = WebService::Windows::LiveID::Auth->new({
appid => $appid,
secret_key => $secret_key
});
my $user = eval { $auth->process_token($q->param("stoken"), $appctx); };
print $q->header;
unless ($@) {
print "<p>Login sucsess.</p>\n";
print "<p>uid: " . $user->uid . "</p>";
}
else {
print "<p>Login failed.</p>";
}

Constructor. $arguments must be HASH reference.
## Constructor parameter sample.
$arguments = {
appid => '00163FFF80003203', ## required
secret_key => 'ApplicationKey123', ## required
algorithm => 'wsignin1.0' ## optional
};
Process and validate stoken value. If the authentication is sucsess, then this method will return WebService::Windows::LiveID::Auth::User object. On fail, return undef value.
Return control url as URI::http object. $query parameter is optional, It must be HASH reference.
## query parameter sample
$query = {
appctx => "zigorou",
style => "font-family: Times Roman;"
};
Or
$query = {
appctx => "zigorou",
style => {
"font-family" => "Verdana",
"color" => "Grey"
}
}
The "style" property allows SCALAR and HASH reference.
Return sign-in url as URI::http object. $query parameter is optional, It must be HASH reference.
## query parameter sample
$query = {
appctx => "zigorou"
};
Return sign-out url as URI::http object.
Application ID
Algorithm name
Secret key
Signature key.
Encryption key


Toru Yamaguchi, <zigorou@cpan.org>

Please report any bugs or feature requests to bug-webservice-windows-liveid-auth@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Copyright 2007 Toru Yamaguchi, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.