GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Yahoo::BBAuth(3) User Contributed Perl Documentation Yahoo::BBAuth(3)

Yahoo::BBAuth - Perl interface to the Yahoo! Browser-Based Authentication.

      my $bbauth = Yahoo::BBAuth->new(
          appid  => $appid,
          secret => $secret,
      );
      # Get your appid and secret by registering your application here:
      # https://developer.yahoo.com/wsregapp/index.php
      # Create an authentication link
      printf '<a href="%s">Click here to authorize</a>', $bbauth->auth_url; 
      # You can include some application data or return a user hash using optional params:
      printf '<a href="%s">Click here to authorize</a>', $bbauth->auth_url(
          send_userhash  => '1',
          appdata => 'someappdata',
          );  
      # After the user authenticates successfully, Yahoo returns the user to the page you
      # dictated when you signed up. To verify whether authentication succeeded, you need to
      # validate the signature:
      if (!$bbauth->validate_sig()) {
      print '<h2>Authentication Failed. Error is: </h2>'.$bbauth->{sig_validation_error};
      exit(0);
      }
      # You can then make an authenticated web service call on behalf of the user
      # For Yahoo! Mail:
      my $json = $bbauth->make_jsonrpc_call('ListFolders', [{}] );
      if (!$json) {
            print '<h2>Web services call failed. Error is:</h2> '. $bbauth->{access_credentials_error};
            exit(0);
      }
      # For Yahoo! Photos:
      my $url = 'http://photos.yahooapis.com/V3.0/listAlbums?';
      my $xml = $bbauth->auth_ws_get_call($url);
      if (!$xml) {
          print '<h2>Web services call failed. Error is:</h2> '. $bbauth->{access_credentials_error};
          exit(0);
      }

This module priovides an Object Oriented interface for Yahoo! Browser-Based Authentication.

This module is ported from the official PHP class which is located on this page: http://developer.yahoo.com/php

Returns an instance of this module. You must set the your application id and shared secret.

Create the Login URL used to fetch authentication credentials. This is the first step in the browser authentication process.

You can set the %param to send_userhash and appdata if you need(optional).

The appdata typically a session id that Yahoo will transfer to the target application upon successful authentication.

If send_userhash set, the send_userhash=1 request will be appended to the request URL so that the userhash will be returned by Yahoo! after successful authentication.

Validates the signature returned by Yahoo's browser authentication services.

Returns false if the sig is invalid. Returns 0 if any error occurs. If 0 is returned, $self->sig_validation_error should contain a string describing the error.

Make an authenticated web services call using HTTP GET. Returns response if successful, a string is returned containing the web service response which might be XML, JSON, or some other type of text. If an error occurs, 0 is returned, and the error is stored in $self->access_credentials_error.

Make an authenticated web services call using HTTP POST.

Make an authenticated web services JSON-RPC call.

The error message when validate_sig fails.

The error message when auth_ws_get_call or auth_ws_post_call fail.

appid
secret
userhash
appdata
timeout
token
WSSID
cookie

  Jiro Nishiguchi <jiro@cpan.org>
  Jason Levitt <jlevitt@yahoo-inc.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

http://developer.yahoo.com/auth/
2007-03-28 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.