You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
290 B
JavaScript
11 lines
290 B
JavaScript
"use strict";
|
|
|
|
const errors = require("../errors");
|
|
|
|
module.exports = function requireAccessToken(req, res, next) {
|
|
if (req.matrixAccessToken == null) {
|
|
throw new errors.UnauthorizedError("An access token is required, but none was provided", {
|
|
errorCode: "M_MISSING_TOKEN"
|
|
});
|
|
}
|
|
}; |