loopback-component-satellizer
A loopback module for satellizer
Last updated 4 years ago by jdrouet .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install loopback-component-satellizer 
SYNC missed versions from official npm registry.

loopback-satellizer

Join the chat at https://gitter.im/moooink/loopback-component-satellizer

Build Status

Stories in Ready

How to use it

Example explorer

## Install the component

npm install --save loopback-component-satellizer

Configuration for facebook

In your loopback component-config.json file, add your configuration like this

"loopback-component-satellizer": {
  "facebook": {
    "model": "Account",
    "credentials": {
      "public": "this_is_a_client_id",
      "private": "this_is_a_private_key"
    },
    "version": "v2.3",
    "fields": ["email"],
    "uri": "/facebook",
    "mapping": {
      "id": "facebook",
      "email": "email",
      "first_name": "firstName",
      "last_name": "lastName",
      "gender": "gender"
    }
  }
}

Add the ACLs to allow (or not) the access to the API

"acls": [
  {
    "accessType": "EXECUTE",
    "principalType": "ROLE",
    "principalId": "$everyone",
    "permission": "ALLOW",
    "property": "facebook"
  },

Then configure satellizer in the client and take care of the conflicts between the satellizer authorization token and the loopback authorization token.

Configuration for Google+

In your loopback component-config.json file, load the component

"loopback-component-satellizer": {
  "google": {
    "model": "Account",
    "credentials": {
      "public": "this_is_a_client_id",
      "private": "this_is_a_private_key"
    },
    "uri": "/google",
    "mapping": {
      "sub": "google",
      "email": "email",
      "given_name": "firstName",
      "family_name": "lastName",
      "gender": "gender"
    }
  }
}

Add the ACLs to allow (or not) the access to the API

"acls": [
  {
    "accessType": "EXECUTE",
    "principalType": "ROLE",
    "principalId": "$everyone",
    "permission": "ALLOW",
    "property": "google"
  },

Then configure satellizer in the client and take care of the conflicts between the satellizer authorization token and the loopback authorization token.

Current Tags

  • 2.0.2                                ...           latest (4 years ago)

13 Versions

  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |