@steedos/service-api 2.5.0-beta.30 → 2.5.0-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +8 -2
  2. package/package.json +6 -6
package/index.js CHANGED
@@ -238,7 +238,10 @@ module.exports = {
238
238
  * @param {IncomingRequest} req
239
239
  * @returns {Promise}
240
240
  */
241
- async authenticate(ctx, route, req, res) {
241
+ async authenticate(ctx, route, req, res, alias) {
242
+ if(alias.authentication === false){
243
+ return null;
244
+ }
242
245
  let user = await steedosAuth.auth(req, res);
243
246
  if (user && user.userId) {
244
247
  return user;
@@ -255,7 +258,10 @@ module.exports = {
255
258
  * @param {IncomingRequest} req
256
259
  * @returns {Promise}
257
260
  */
258
- async authorize(ctx, route, req, res) {
261
+ async authorize(ctx, route, req, res, alias) {
262
+ if(alias.authorization === false){
263
+ return ;
264
+ }
259
265
  // Get the authenticated user.
260
266
  const user = ctx.meta.user;
261
267
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@steedos/service-api",
3
- "version": "2.5.0-beta.30",
3
+ "version": "2.5.0-beta.33",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
- "@steedos/auth": "2.5.0-beta.30",
8
- "@steedos/router": "2.5.0-beta.30",
9
- "@steedos/service-object-graphql": "2.5.0-beta.30",
10
- "@steedos/service-ui": "2.5.0-beta.30",
7
+ "@steedos/auth": "2.5.0-beta.33",
8
+ "@steedos/router": "2.5.0-beta.33",
9
+ "@steedos/service-object-graphql": "2.5.0-beta.33",
10
+ "@steedos/service-ui": "2.5.0-beta.33",
11
11
  "graphql": "^15.8.0",
12
12
  "graphql-iso-date": "^3.6.1",
13
13
  "graphql-type-json": "^0.3.2",
@@ -19,5 +19,5 @@
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
22
- "gitHead": "d33d736a3009ecfe57981d03d7062e52eaf27609"
22
+ "gitHead": "370c9eaa707a6932f3eb12fb3d711e679bcd2484"
23
23
  }