0.1.0 • Published 5 months ago

css-authn v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

css-authn

GitHub License NPM Version NPM Type Definitions

Utilities to authenticate to Community Solid Server via its API

Supported versions are 6.x and 7.x.

This package is based on Automating authentication with Client Credentials v6 and v7.

Usage

import { v6, v7 } from 'css-authn'
// or import { createAccount, getAuthenticatedFetch } from 'css-authn/dist/7.x'

// the methods return a Promise, so you can wrap them in async function, and await them...
// get authenticated fetch
const authenticatedFetch = await v7.getAuthenticatedFetch({
  email: 'email@example',
  password: 'password',
  provider: 'https://solidserver.example',
  webId: 'https://solidserver.example/person/profile/card#me' // (optional) if there are multiple webIds associated with the account, you need to specify which one to authenticate with
  fetch, // (optional) you can also provide your own fetch compatible with native Node fetch
})

// in version 7, there's also a method to create account and pod
await v7.createAccount({
  username: 'username',
  password: 'password',
  email: 'email@example.com',
  provider: 'https://solidserver.example',
  fetch, // (optional) you can also provide your own fetch compatible with native Node fetch
})
0.1.0

5 months ago

0.0.16

1 year ago

0.0.15-alpha.3

1 year ago

0.0.15-alpha.1

1 year ago

0.0.15-alpha.2

1 year ago

0.0.15-alpha.0

1 year ago

0.0.16-alpha.0

1 year ago

0.0.15

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago