Hello.js JavaScript 的 OAuth 框架

程序名称:Hello.js

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

Hello.js 介绍

Hello.js 是一个客户端 JavaScript 框架,用于实现 OAuth2 认证。支持现有多个 OAuth 服务。

示例代码:

hello.init({ 
    facebook : FACEBOOK_CLIENT_ID,
    windows  : WINDOWS_CLIENT_ID,
    google   : GOOGLE_CLIENT_ID
},{redirect_uri:'redirect.html'});

hello.on('auth.login', function(auth){

    // call user information, for the given network
    hello( auth.network ).api( '/me' ).then( function(r){
        // Inject it into the container
        var label = document.getElementById( "profile_"+ auth.network );
        if(!label){
            label = document.createElement('div');
            label.id = "profile_"+auth.network;
            document.getElementById('profile').appendChild(label);
        }
        label.innerHTML = '<img src="'+ r.thumbnail +'" /> Hey '+r.name;
    });
});

Hello.js 官网

http://adodson.com/hello.js/

相关编程语言

MuPlayer 是一款跨平台、轻量级的音频播放解决方案,...
OS FLV 是一个 开源和可嵌入网页的flv播放器。 这个...
DewPlayer音乐播放器,样式很简单,而且很实用.播放器...
JW FLV MEDIA PLAYER是一个开源的在网页上使用的Fla...
Speakker 是一个基于 Web 浏览器的音乐播放器,只提...
Player Framework 是一个开源的支持 HTML5 的视频播...