Adventures installing an Octoblu Endo

Install Yarn, to get node.js npm etc.
Make sure git is updated.
npm Install generator-endo, and endo-doctor
npm install localtunnel

Creating an Endo

Install yo and the generator

npm install -g yo generator-endo
Create a new project and run the generator

Note that the project directory name must start with endo-

mkdir endo-github
cd endo-github
yo endo
Setting up the Oauth Device with Octoblu

An Oauth device must be registered with Octoblu. After the device has been created, use the Credentials: generate (and download) link to pull down a meshblu.json. Save that meshblu.json to the root of your endo directory (This file should not be checked in, and has been added to the project's .gitignore)

Use endo-doctor to finish configuring the device.

Modify the passport configuration

The passport configuration is available in src/api-strategy. It's purpose is to map the API oauth profile to some required endo values in the onAuthorization function.

The callback passed in to the onAuthorization function expects a user object as its second parameter. The user object will be encrypted using the service's private key and stored on a credentials device that only the API service will have access to.

The properties listed are all required. However, the developer can add whatever additional properties they'd like. Keep in mind that every attribute that is not under the secrets key may be made available users authenticated by the API. In other words, if a user uses Oauth to authenicate the endo service as Twitter user @sqrtofsaturn, they may get access to all of the properties in the user object that are not under the secrets key.

If you wish to have an API that doesn't require authentication, we recommend using passport-endo-passthru. It will use the user's Meshblu UUID to identify the Credentials Device.

For endo-azure use case:
npm install -g yo generator-endo
mkdir endo-github
cd endo-github
yo endo
npm install azure

do i need to install azure-cli globally?
npm install -g azure-cli

Powered by Drupal