0.7.2 • Published 8 years ago

fxa-jwtool v0.7.2

Weekly downloads
26
License
MPL 2.0
Repository
github
Last release
8 years ago

fxa-jwtool

A module for creating and verifying JWTs used by Firefox Accounts.

Example

var JWTool = require('fxa-jwtool')

var secretKey = JWTool.JWK.fromFile(
  'priv.pem',
  {
    jku: 'https://api.accounts.firefox.com/.well-known/public-keys',
    kid: 'dev-1'
  }
)

var encodedJWT = secretKey.sign({ sub: 'hello world' })

var trustedJKUs = [
  'https://api.accounts.firefox.com/.well-known/public-keys'
]

var jwtool = new JWTool(trustedJKUs)

var message = jwtool.verify(encodedJWT)

console.log(message) // { sub: "hello world" }
0.7.2

8 years ago

0.7.1

9 years ago

0.7.0

9 years ago

0.6.0

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago