INNER CODE UNIT · JavaScript

keys

vestauth/vestauth · src/server/index.js:103

  const keys = jwks.map(j => j.value)

  return res.json({ keys })
})

app.post('/whoami', async (req, res) => {
  try {
    const url = `${req.protocol}://${req.get('host')}${req.originalUrl}`
    const attrs = {
      httpMethod: req.method,
      uri: url,
      headers: req.headers,
      serverHostname: HOSTNAME
    }
    const agent = await new WhoamiService(attrs).run()

    const json = new WhoamiSerializer({ agent }).run()
    res.json(json)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…