User Tools

Site Tools


en:public:developer:template_system:tags:authentication:yahoo_oauth1callback

<#yahoo_oauth1callback>

This function check the yahoo OAuth 1.0 authentification (http://developer.yahoo.com/oauth/guide/oauth-accesstoken.html), if success login the user or register him. Typically, the website open a popup to an url like /authentication/yahoo_oauth1authorization/ that will show to the end user the yahoo autorization dialog. after the user accept to share his profile, the url ”oauth_callback” (by default /authentication/yahoo_oauth1callback/) that contain this function (<#yahoo_oauth1callback>) will be called. The function itself will be responsible to login or create (and login) the user and the template of this function will be responsible to close the popup and reload the parent document

Parameters

Name Mandatory Default Description
template No Used to build the content of the result
oauth_consumer_key Yes Consumer Key provided to you when you signed up (https://developer.apps.yahoo.com/projects).
oauth_signature Yes The Consumer Secret that was issued to the application (https://developer.apps.yahoo.com/projects)
oauth_callback No /authentication/yahoo_oauth1callback/ The URI registered with the application

Example

<#{yahoo_oauth1callback oauth_consumer_key="..." oauth_signature="..." oauth_callback="...">
  <#{template>
    <script type="text/javascript">
    //<![CDATA[
    (function(){
      window.opener.location = window.opener.location;
      window.close();
    })();
    //]]>
    </script>
  <#}template>    
<#}yahoo_oauth1callback>
en/public/developer/template_system/tags/authentication/yahoo_oauth1callback.txt · Last modified: 2013/04/10 19:33 by svanderclock