ersmo / backbone.oauth

For the internal use to get access_token

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backbone.OAuth

For the ers internal use to sign in the offical api.

Backbone.OAuthRouter

Auto finish oauth2 authentication process to get the access_token.

var router = Backbone.OAuthRouter.extend({
  oauth: {
    baseUrl: 'http://api_address',
    clientId: 'your app id'
  }
}
});

Backbone.AccessView

Auto decide show it or not depend on the user's permission

var view = Backbone.AccessView.extend({
  render: function() {
    return this;
  }
})

Backbone.accessTokenSync

sync server with the access_token automatically

var collection = Backbone.Collection.extend({
  sync: Backbone.accessTokenSync
})

Finally

This lib will provide a window.me object represent the logined user.

About

For the internal use to get access_token


Languages

Language:JavaScript 96.6%Language:PHP 3.4%