Adds a temporary route for checking Personal Access Tokens work
This commit is contained in:
parent
7fd226f3ad
commit
27ea1c1e1b
1 changed files with 6 additions and 0 deletions
|
@ -100,6 +100,12 @@ app.use('/api', requestsOfTypeJSON(), sessions);
|
||||||
app.use('/api', requestsOfTypeJSON(), files);
|
app.use('/api', requestsOfTypeJSON(), files);
|
||||||
app.use('/api', requestsOfTypeJSON(), projects);
|
app.use('/api', requestsOfTypeJSON(), projects);
|
||||||
app.use('/api', requestsOfTypeJSON(), aws);
|
app.use('/api', requestsOfTypeJSON(), aws);
|
||||||
|
|
||||||
|
// This is a temporary way to test access via Personal Access Tokens
|
||||||
|
// Sending a valid username:<personal-access-token> combination will
|
||||||
|
// return the user's information.
|
||||||
|
app.get('/api/auth/access-check', passport.authenticate('basic', { session: false }), (req, res) => res.json(req.user));
|
||||||
|
|
||||||
app.use(assetRoutes);
|
app.use(assetRoutes);
|
||||||
// this is supposed to be TEMPORARY -- until i figure out
|
// this is supposed to be TEMPORARY -- until i figure out
|
||||||
// isomorphic rendering
|
// isomorphic rendering
|
||||||
|
|
Loading…
Reference in a new issue