implemented PKCE auth (#921)
* implemented PKCE auth * removed node-jose * added PKCE tests
This commit is contained in:
parent
20528eb0d1
commit
7ccf462bf8
18 changed files with 331 additions and 263 deletions
|
@ -6,7 +6,6 @@ const config = require('../config');
|
|||
const auth = require('../middleware/auth');
|
||||
const language = require('../middleware/language');
|
||||
const pages = require('./pages');
|
||||
const fxa = require('./fxa');
|
||||
const filelist = require('./filelist');
|
||||
|
||||
const IS_DEV = config.env === 'development';
|
||||
|
@ -34,6 +33,8 @@ module.exports = function(app) {
|
|||
'wss://*.dev.lcip.org',
|
||||
'wss://*.mozaws.net',
|
||||
'wss://send.firefox.com',
|
||||
'https://*.dev.lcip.org',
|
||||
'https://*.accounts.firefox.com',
|
||||
'https://sentry.prod.mozaws.net',
|
||||
'https://www.google-analytics.com'
|
||||
],
|
||||
|
@ -80,8 +81,7 @@ module.exports = function(app) {
|
|||
);
|
||||
app.get(`/api/exists/:id${ID_REGEX}`, require('./exists'));
|
||||
app.get(`/api/metadata/:id${ID_REGEX}`, auth.hmac, require('./metadata'));
|
||||
app.get('/api/fxa/login', fxa.login);
|
||||
app.get('/api/fxa/oauth', fxa.oauth);
|
||||
app.get('/api/fxa/oauth', pages.blank);
|
||||
app.get('/api/filelist', auth.fxa, filelist.get);
|
||||
app.post('/api/filelist', auth.fxa, filelist.post);
|
||||
app.post('/api/upload', auth.fxa, require('./upload'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue