Net::Google::FederatedLogin - Google Federated Login module - see http://code.google.com/apis/accounts/docs/OpenID.html
version 0.8.0
Sending user to be authenticated:
my $claimed = 'example@gmail.com'; # or, where example.com is a Google Apps domain # 'example.com' (bare domain) # or 'user@example.com' (email address) # or 'http://example.com/openid?id=[id]' (already known id) my $g = Net::Google::FederatedLogin->new(claimed_id => $claimed, return_to => 'https://example.com/auth'); my $auth_url = $g->get_auth_url();
Verifying the user was correctly authenticated:
my $g = Net::Google::FederatedLogin->new(cgi => $cgi, return_to => 'https://example.com/auth'); my $id = $g->verify_auth(); # $id is the verified identity, or false if it wasn't verified (eg by the user handcrafting the url, or disallowing access)
Required for "get_auth_url": The email address, or an OpenID URL of the identity to be checked.
Optional field that is used to populate the openid.realm parameter. If not provided the parameter will not be used (as opposed to being calculated from the "return_to"" value).
The useragent internally used for communications that the module needs to do. If not provided, a new LWP::UserAgent will be instantiated.
Required for "get_auth_url" and "verify_auth": The URL the user should be returned to after verifying their identity.
Required for "verify_auth": A CGI-like object (same param() method behaviour) that is used to access the parameters that assert the identity has been verified. May optionally be replaced by "cgi_params".
Required for "verify_auth" unless "cgi" is supplied: A hashref containing the cgi parameters for verifying the identity.
Hashref of Net::Google::FederatedLogin::Extension objects (keyed off the extension type URI).
Gets the URL to send the user to where they can verify their identity.
Gets the unadorned OpenID authentication URL (like "get_auth_url", but doesn't contain values specific to this request (return_to, mode etc))
Checks if the user has been validated based on the parameters in the "cgi" object, and checks that these parameters do come from the correct OpenID provider (rather than having been hand-crafted to appear to validate the identity). If the id is successfully verified, it is returned (otherwise a false value is returned).
Retrieve a single Net::Google::FederatedLogin::Extension object, based on the type URI provided. This method is most likely to be useful for handling the response to an OpenID request.
Save an extension into the list of extensions for this login object
Glenn Fowler <cebjyre@cpan.org>
This software is copyright (c) 2014 by Glenn Fowler.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::Google::FederatedLogin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Google::FederatedLogin
CPAN shell
perl -MCPAN -e shell install Net::Google::FederatedLogin
For more information on module installation, please visit the detailed CPAN module installation guide.