1.0.3 • Published 8 years ago

kuzzle-plugin-auth-github v1.0.3

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
8 years ago

Build Status

logo

Plugin Github Authentication

This plugin provides a authentication with passportjs github strategy.

Manifest

This plugin doesn't need any right.

Configuration

You can override the configuration in your config/customPlugins.json file in Kuzzle:

NameDefault valueTypeDescription
persist{}ObjectAttributes you want to persist if the user doesn't exist
scope[]ArrayList of attributes which requires rights to get
profiledefaultArrayProfile of the new persisted user
clientIDStringGithub clientID
clientSecretStringGithub secret
callbackUrlStringGithub callback url

Here is an example of a configuration:

  "kuzzle-plugin-auth-github": {
    "version": "1.0.0",
    "activated": true,
    "name": "kuzzle-plugin-auth-github",
    "defaultConfig": {
      "persist": {}
    },
    "customConfig": {
      "persist": [
        "login",
        "avatar_url",
        "name",
        "email"
      ],
      "scope": [
        "user:email",
        "user:avatar_url"
      ],
      "defaultProfile": "default",
      "clientID": "<your-client-id>",
      "clientSecret": "<your-client-secret>",
      "callbackUrl": "http://host:7511/api/1.0/_login/github"
    }
  }

Usage

Just send following data to the auth controller:

{"body":{
  "strategy": "github",
  "username": "<username>"
}}

See Kuzzle API Documentation for more details about Kuzzle authentication mechanism.

How to create a plugin

See Kuzzle documentation about plugin for more information about how to create your own plugin.

About Kuzzle

For UI and linked objects developers, Kuzzle is an open-source solution that handles all the data management (CRUD, real-time storage, search, high-level features, etc).

Kuzzle features are accessible through a secured API. It can be used through a large choice of protocols such as REST, Websocket or Message Queuing protocols.