New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mm-services-authentication

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mm-services-authentication

Establishes trust between two MicroMinion nodes

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
2
Created
Source

mm-services-authentication

Service to manage trust-establishment protocol between two MicroMinion nodes

This service runs as a regular MicroMinion service and provides an out-of-band acquired security code to a remote node. The remote node will confirm this security code when correct (or send error when incorrect).

Use cases include:

  • Scanning of QR code with publicKey and security code of other node embedded into it
  • Manual entering of shortened publicKey and security code in application
  • Emailing or sending publicKey and security code through other mechanism with link that opens application for processing

Function calls

startSession()

Starts a new authentication session (only one can exist at the same time). This is to ensure that authentication can only happen when both parties put themselves in authentication mode. (e.g., by going to 'add a friend' screen of an app)

startSession generates a new security token.

extendSession()

Every authentication session expires after 10 seconds and needs to be manually extended. Maximum time for an authentication session is 5 minutes.

getToken()

Retrieves current security token as string.

authenticate(publicKey, securityToken)

Authenticate by providing security token and publicKey of remote node. This function call will send AUTH request to remote node.

event: authResult(err, result)

Generates an event with two parameters: err and result.

If err is set, an authentication error occured.

If result is set, it contains the publicKey of the remote node that we succesfully established trust with. This can be the result of either a AUTH request we received or a AUTH_RESULT request

Messaging API

Published messages

authentication.auth

authentication.authResult

Keywords

trust

FAQs

Package last updated on 06 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts