1.0.6 • Published 2 years ago

@j2inn/scram v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

TypeScript client SCRAM authentication library

This library is used by clients wanting to authenticate with servers that use SCRAM (Salted Challenge Response Authentication Mechanism).

For more information on SCRAM, please see the specification.

Installation

npm install @j2inn/scram

Use

import authenticate from '@j2inn/scram'

...

async function onAuthenticate(username: string, password: string): void {
  await authenticate({
    username,
    password,
    uri: new URL('/auth', window.location.href)
  })
}

An alternative fetch parameter can be specified if this library is used in a NodeJS environment...

import fetch from 'node-fetch'
import authenticate from '@j2inn/scram'

...

async function onAuthenticate(username: string, password: string, uri: string): void {
  await authenticate({
    username,
    password,
    fetch,
    uri
  })
}

Links

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-beta.1

2 years ago