1.1.2 • Published 4 years ago

base64url-xplatform v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Base64Url Cross-Platform

A cross-platform implementation of base64 URL, with typescript definitions included.

Usage

Install via NPM and require in your project. There is also an ESM export, for use with browser or Deno.

const { Base64Url } = require('base64url-xplatform')
const header = { alg: 'RS256' }
const claimsSet = {
  iss: 'iss',
  sub: 'sub',
  aud: 'aud',
  exp: Math.floor(Date.now() / 1000) + 60 * 5
}
const encodedJWTHeader = Base64Url.encode(JSON.stringify(header))
const encodedJWTClaimsSet = Base64Url.encode(JSON.stringify(claimsSet))
const existingString = encodedJWTHeader + '.' + encodedJWTClaimsSet
1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago