• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    oAuth (gallery-oauth) on cdn

    Last Updated: 08/20/10
    + 3 -

    Dav Glass

    See 9 more by this user.

    Created: 07/29/10
    Last CDN Push: 11/9/12
    Build Tag: gallery-2012.11.09-01-41
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.1.2
    Free for use.

    This simple oAuth module will allow you to create a signed url to use with a 2-Legged oAuth web service.

    It also modifies YQL, if it's on the page, and adds in support for key and secret config options.

    • Tags:
    • davglass
    • jsonp
    • yql
    • oauth
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Please don't use this key in your web app, it's only here for the example.

    Code Sample

    <script src="http://yui.yahooapis.com/3.1.2/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.11.09-01-41'
    }).use('gallery-oauth', function(Y) {
     
        //Make sure the oAuth libs are available on the page
        Y.oAuth.ready(function() {
     
            //Using with YQL
             Y.YQL('select title,abstract from search.news where query="election"', function() {
                  console.log('success: ', arguments);
             }, {
                  key: 'dj0yJmk9Q9WVdrOVJGSlJRelpHTlRJbWNHbzlNelF6TlRjMk9EWXkmcz1jb25zdW1lcnNlY3JldCZ4PWMw',
                  secret: 'f6cbasdfsadfas68d25da294a584b541ff29da599a3f53db76',
                  base: '://query.yahooapis.com/v1/yql?'
             });
     
             //Using with JSONP
            Y.jsonp('mywebservice.com/?', {
                on: {
                    success: function() {
                        console.log('success: ', arguments);
                    }
                },
                format: function(url, proxy) {
                    var finalURL = url + 'callback=' + proxy;
                    return Y.oAuth.signURL("dj0yJmk9SXNaaTF2JGSlJRelpHTlRJbWNHbzlNelF6TlRjMk9EWXkmcz1jb25zdW1lcnNlY3JldCZ4PWMw", "5da294a584b5asdfasd41ff29da599a3f53db76", finalURL);
                }
            });
     
        });
     
     
    });

    Forum Posts

    Subject Author Date
    General oAuth Concepts - Web page authentication Mark 10/19/10
    Re: General oAuth Concepts - Web page authentication Dav Glass 10/19/10
    Re: General oAuth Concepts - Web page authentication Mark 10/19/10
    YQL 2-Legged oAuth 502 Bad Gateway for sha1.js Roman Stachura 10/28/10
    Re: YQL 2-Legged oAuth 502 Bad Gateway for sha1.js Dav Glass 10/28/10
    Doing POST requests with OAuth Jeremy Baker 09/24/12
    Re: Doing POST requests with OAuth Dav Glass 09/24/12
    Re: Doing POST requests with OAuth Jeremy Baker 09/24/12
    Re: Doing POST requests with OAuth Dav Glass 09/24/12
    Re: Doing POST requests with OAuth Jeremy Baker 09/24/12

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info