forked from Mirrors/keyoxide-web
Add ariadne-identity-proof header
This commit is contained in:
parent
ab1542c7cf
commit
8629033702
2 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
- h-card markup to profile pages (thanks to [caesar](https://codeberg.org/caesar) [PR#130](https://codeberg.org/keyoxide/keyoxide-web/pulls/130))
|
- h-card markup to profile pages (thanks to [caesar](https://codeberg.org/caesar) [PR#130](https://codeberg.org/keyoxide/keyoxide-web/pulls/130))
|
||||||
|
- `ariadne-identity-proof` header to profile pages
|
||||||
### Fixed
|
### Fixed
|
||||||
- Keybase profiles (thanks to [gonz0](https://codeberg.org/gonz0))
|
- Keybase profiles (thanks to [gonz0](https://codeberg.org/gonz0))
|
||||||
|
|
||||||
|
|
|
@ -41,30 +41,35 @@ router.get('/sig', (req, res) => {
|
||||||
router.post('/sig', bodyParser, async (req, res) => {
|
router.post('/sig', bodyParser, async (req, res) => {
|
||||||
const data = await generateSignatureProfile(req.body.signature)
|
const data = await generateSignatureProfile(req.body.signature)
|
||||||
const title = utils.generatePageTitle('profile', data)
|
const title = utils.generatePageTitle('profile', data)
|
||||||
|
res.set('ariadne-identity-proof', data.keyData.openpgp4fpr)
|
||||||
res.render('profile', { title: title, data: data, isSignature: true, signature: req.body.signature })
|
res.render('profile', { title: title, data: data, isSignature: true, signature: req.body.signature })
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/wkd/:id', async (req, res) => {
|
router.get('/wkd/:id', async (req, res) => {
|
||||||
const data = await generateWKDProfile(req.params.id)
|
const data = await generateWKDProfile(req.params.id)
|
||||||
const title = utils.generatePageTitle('profile', data)
|
const title = utils.generatePageTitle('profile', data)
|
||||||
|
res.set('ariadne-identity-proof', data.keyData.openpgp4fpr)
|
||||||
res.render('profile', { title: title, data: data })
|
res.render('profile', { title: title, data: data })
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/hkp/:id', async (req, res) => {
|
router.get('/hkp/:id', async (req, res) => {
|
||||||
const data = await generateHKPProfile(req.params.id)
|
const data = await generateHKPProfile(req.params.id)
|
||||||
const title = utils.generatePageTitle('profile', data)
|
const title = utils.generatePageTitle('profile', data)
|
||||||
|
res.set('ariadne-identity-proof', data.keyData.openpgp4fpr)
|
||||||
res.render('profile', { title: title, data: data })
|
res.render('profile', { title: title, data: data })
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/hkp/:server/:id', async (req, res) => {
|
router.get('/hkp/:server/:id', async (req, res) => {
|
||||||
const data = await generateHKPProfile(req.params.id, req.params.server)
|
const data = await generateHKPProfile(req.params.id, req.params.server)
|
||||||
const title = utils.generatePageTitle('profile', data)
|
const title = utils.generatePageTitle('profile', data)
|
||||||
|
res.set('ariadne-identity-proof', data.keyData.openpgp4fpr)
|
||||||
res.render('profile', { title: title, data: data })
|
res.render('profile', { title: title, data: data })
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/keybase/:username/:fingerprint', async (req, res) => {
|
router.get('/keybase/:username/:fingerprint', async (req, res) => {
|
||||||
const data = await generateKeybaseProfile(req.params.username, req.params.fingerprint)
|
const data = await generateKeybaseProfile(req.params.username, req.params.fingerprint)
|
||||||
const title = utils.generatePageTitle('profile', data)
|
const title = utils.generatePageTitle('profile', data)
|
||||||
|
res.set('ariadne-identity-proof', data.keyData.openpgp4fpr)
|
||||||
res.render('profile', { title: title, data: data })
|
res.render('profile', { title: title, data: data })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -76,6 +81,7 @@ router.get('/:id', async (req, res) => {
|
||||||
data = await generateHKPProfile(req.params.id)
|
data = await generateHKPProfile(req.params.id)
|
||||||
}
|
}
|
||||||
const title = utils.generatePageTitle('profile', data)
|
const title = utils.generatePageTitle('profile', data)
|
||||||
|
res.set('ariadne-identity-proof', data.keyData.openpgp4fpr)
|
||||||
res.render('profile', { title: title, data: data })
|
res.render('profile', { title: title, data: data })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue