All Projects → civicteam → npm-civic-sip-api

civicteam / npm-civic-sip-api

Licence: MIT license
Node.js client library for the Civic Secure Identity Platform (SIP).

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to npm-civic-sip-api

drachtio-siprec-recording-server
SIPREC recording server based on drachtio and rtpengine
Stars: ✭ 58 (+132%)
Mutual labels:  sip
sems-yeti
YETI application for SEMS core
Stars: ✭ 15 (-40%)
Mutual labels:  sip
aws-secure-websockets
Secure web socket implementation using AWS products and serverless framework
Stars: ✭ 49 (+96%)
Mutual labels:  secure
alkemio
START HERE! Cross project collaboration and shared documentation.
Stars: ✭ 22 (-12%)
Mutual labels:  identity
generate-secure-pillar
Salt Secure Pillar Tool
Stars: ✭ 30 (+20%)
Mutual labels:  secure
AspNetCoreBackChannelLogout
ASP.NET Core Back-Channel Logout for Hybrid Clients, Redis, Key Vault, Azure
Stars: ✭ 17 (-32%)
Mutual labels:  identity
opentok-rtc
OpenTok demo application
Stars: ✭ 97 (+288%)
Mutual labels:  sip
netlify-gated-sites
How to create Single Sign On flows with role based access controls & functions
Stars: ✭ 21 (-16%)
Mutual labels:  identity
Mask-Aware-Face-Recognition-SDK-iOS
Fast, Accurate, Mask-Aware Face Recognition SDK with Liveness Detection
Stars: ✭ 113 (+352%)
Mutual labels:  identity
ms-identity-mobile-apple-swift-objc
An iOS sample in Swift that authenticates Microsoft Account and Azure AD users and calls the Graph API using OAuth 2.0
Stars: ✭ 61 (+144%)
Mutual labels:  identity
keystore-ultimate
The ultimate solution for keystore manipulation in Android
Stars: ✭ 30 (+20%)
Mutual labels:  secure
bookshelf-secure-password
A Bookshelf.js plugin for handling secure passwords
Stars: ✭ 24 (-4%)
Mutual labels:  secure
camunda-cloud-helm
Camunda Platform 8 Self-Managed Helm charts
Stars: ✭ 41 (+64%)
Mutual labels:  identity
auth
A GitHub Action for authenticating to Google Cloud.
Stars: ✭ 567 (+2168%)
Mutual labels:  identity
WeIdentity
基于区块链的符合W3C DID和Verifiable Credential规范的分布式身份解决方案
Stars: ✭ 1,063 (+4152%)
Mutual labels:  identity
secure-media
Store private media securely in WordPress.
Stars: ✭ 22 (-12%)
Mutual labels:  secure
My-Azure-AD-B2C-use-cases
Recopilation of Azure AD B2C use cases I use to find in customers, or are requested by peers
Stars: ✭ 23 (-8%)
Mutual labels:  identity
APICorePayLots
Web API designed in Asp.NET Core 3.1, using Dapper and Entity Framework Core, Repository Pattern, Identity
Stars: ✭ 13 (-48%)
Mutual labels:  identity
safenotes
SafeNotes a complete self-hosting secrets sharing app
Stars: ✭ 25 (+0%)
Mutual labels:  secure
blockstack-browser
The Blockstack Browser
Stars: ✭ 1,130 (+4420%)
Mutual labels:  identity

NPM version NPM downloads node version

Node.js wrapper for the Civic hosted SIP API. For best results, be sure that you're using the latest version.

Please see docs.civic.com for a more details.

Installation

civic-sip-api can be installed from npm:

npm install civic-sip-api --save

Basic Usage

const civicSip = require('civic-sip-api');

const civicClient = civicSip.newClient({
    appId: 'ABC123',
    appSecret: APP_SECRET,
    prvKey: PRV_KEY,
});

civicClient.exchangeCode(jwtToken)
    .then((userData) => {
        // store user data and userId as appropriate
        console.log('userData = ', JSON.stringify(userData, null, 4));
    }).catch((error) => {
        console.log(error);
    });

Example of data returned for a ScopeRequest of BASIC_SIGNUP

userData =  {
    "data": [
        {
            "label": "contact.personal.email",
            "value": "[email protected]",
            "isValid": true,
            "isOwner": true
        },
        {
            "label": "contact.personal.phoneNumber",
            "value": "+1 5556187380",
            "isValid": true,
            "isOwner": true
        }
    ],
    "userId": "c6d5795f8a059ez5ad29a33a60f8b402a172c3e0bbe50fd230ae8e0303609b42"
}

Proxy Usage

There is basic proxy support. The server address and port is set as a url.

rejectUnauthorized Setting this to false is optional and can be used when testing in development and needing to use a self signed cerificate. We do not recommend setting this to false in a production environment as it will compromise security.

const civicSip = require('civic-sip-api');

const civicClient = civicSip.newClient({
    appId: 'ABC123',
    appSecret: APP_SECRET,
    prvKey: PRV_KEY,
    proxy: {
      url: 'http://10.0.0.6:8080',
      rejectUnauthorized: false, // Do not make false in production
    },
});

civicClient.exchangeCode(jwtToken)
    .then((userData) => {
        // store user data and userId as appropriate
        console.log('userData = ', JSON.stringify(userData, null, 4));
    }).catch((error) => {
        console.log(error);
    });

Copyright © 2018 Civic.com

Released under the MIT License, which can be found in the repository in LICENSE.txt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].