@niledatabase/server 3.0.0-alpha.37 → 3.0.0-alpha.39

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.
@@ -1401,7 +1401,7 @@ function _request() {
1401
1401
  return _request.apply(this, arguments);
1402
1402
  }
1403
1403
 
1404
- var key$8 = 'ME';
1404
+ var key$9 = 'ME';
1405
1405
  /**
1406
1406
  * @swagger
1407
1407
  * /api/me:
@@ -1452,16 +1452,16 @@ function _GET$4() {
1452
1452
  }));
1453
1453
  return _GET$4.apply(this, arguments);
1454
1454
  }
1455
- function route$b(_x4, _x5) {
1456
- return _route$b.apply(this, arguments);
1455
+ function route$c(_x4, _x5) {
1456
+ return _route$c.apply(this, arguments);
1457
1457
  }
1458
- function _route$b() {
1459
- _route$b = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request, config) {
1458
+ function _route$c() {
1459
+ _route$c = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(request, config) {
1460
1460
  var url;
1461
1461
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1462
1462
  while (1) switch (_context2.prev = _context2.next) {
1463
1463
  case 0:
1464
- url = apiRoutes(config)[key$8];
1464
+ url = apiRoutes(config)[key$9];
1465
1465
  _context2.t0 = request.method;
1466
1466
  _context2.next = _context2.t0 === 'GET' ? 4 : 7;
1467
1467
  break;
@@ -1482,10 +1482,10 @@ function _route$b() {
1482
1482
  }
1483
1483
  }, _callee2);
1484
1484
  }));
1485
- return _route$b.apply(this, arguments);
1485
+ return _route$c.apply(this, arguments);
1486
1486
  }
1487
- function matches$b(configRoutes, request) {
1488
- return urlMatches(request.url, configRoutes[key$8]);
1487
+ function matches$c(configRoutes, request) {
1488
+ return urlMatches(request.url, configRoutes[key$9]);
1489
1489
  }
1490
1490
 
1491
1491
  function auth(_x, _x2) {
@@ -2023,19 +2023,19 @@ function _PUT$2() {
2023
2023
  return _PUT$2.apply(this, arguments);
2024
2024
  }
2025
2025
 
2026
- var key$7 = 'USERS';
2027
- function route$a(_x, _x2) {
2028
- return _route$a.apply(this, arguments);
2026
+ var key$8 = 'USERS';
2027
+ function route$b(_x, _x2) {
2028
+ return _route$b.apply(this, arguments);
2029
2029
  }
2030
- function _route$a() {
2031
- _route$a = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request, config) {
2030
+ function _route$b() {
2031
+ _route$b = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request, config) {
2032
2032
  var _Logger, info, session;
2033
2033
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2034
2034
  while (1) switch (_context.prev = _context.next) {
2035
2035
  case 0:
2036
2036
  _Logger = Logger(_extends({}, config, {
2037
2037
  debug: config.debug
2038
- }), "[ROUTES][" + key$7 + "]"), info = _Logger.info;
2038
+ }), "[ROUTES][" + key$8 + "]"), info = _Logger.info;
2039
2039
  _context.next = 3;
2040
2040
  return auth(request, config);
2041
2041
  case 3:
@@ -2074,10 +2074,10 @@ function _route$a() {
2074
2074
  }
2075
2075
  }, _callee);
2076
2076
  }));
2077
- return _route$a.apply(this, arguments);
2077
+ return _route$b.apply(this, arguments);
2078
2078
  }
2079
- function matches$a(configRoutes, request) {
2080
- return urlMatches(request.url, configRoutes[key$7]);
2079
+ function matches$b(configRoutes, request) {
2080
+ return urlMatches(request.url, configRoutes[key$8]);
2081
2081
  }
2082
2082
 
2083
2083
  /**
@@ -2312,19 +2312,19 @@ function _PUT$1() {
2312
2312
  return _PUT$1.apply(this, arguments);
2313
2313
  }
2314
2314
 
2315
- var key$6 = 'TENANT_USERS';
2316
- function route$9(_x, _x2) {
2317
- return _route$9.apply(this, arguments);
2315
+ var key$7 = 'TENANT_USERS';
2316
+ function route$a(_x, _x2) {
2317
+ return _route$a.apply(this, arguments);
2318
2318
  }
2319
- function _route$9() {
2320
- _route$9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request, config) {
2319
+ function _route$a() {
2320
+ _route$a = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request, config) {
2321
2321
  var _Logger, info, session, yurl, _yurl$pathname$split$, tenantId;
2322
2322
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2323
2323
  while (1) switch (_context.prev = _context.next) {
2324
2324
  case 0:
2325
2325
  _Logger = Logger(_extends({}, config, {
2326
2326
  debug: config.debug
2327
- }), "[ROUTES][" + key$6 + "]"), info = _Logger.info;
2327
+ }), "[ROUTES][" + key$7 + "]"), info = _Logger.info;
2328
2328
  _context.next = 3;
2329
2329
  return auth(request, config);
2330
2330
  case 3:
@@ -2390,17 +2390,17 @@ function _route$9() {
2390
2390
  }
2391
2391
  }, _callee);
2392
2392
  }));
2393
- return _route$9.apply(this, arguments);
2393
+ return _route$a.apply(this, arguments);
2394
2394
  }
2395
- function matches$9(configRoutes, request) {
2395
+ function matches$a(configRoutes, request) {
2396
2396
  var url = new URL(request.url);
2397
2397
  var _url$pathname$split$r = url.pathname.split('/').reverse(),
2398
2398
  userId = _url$pathname$split$r[0],
2399
2399
  possibleTenantId = _url$pathname$split$r[1],
2400
2400
  tenantId = _url$pathname$split$r[2];
2401
- var route = configRoutes[key$6].replace('{tenantId}', tenantId).replace('{userId}', userId);
2401
+ var route = configRoutes[key$7].replace('{tenantId}', tenantId).replace('{userId}', userId);
2402
2402
  if (userId === 'users') {
2403
- route = configRoutes[key$6].replace('{tenantId}', possibleTenantId);
2403
+ route = configRoutes[key$7].replace('{tenantId}', possibleTenantId);
2404
2404
  }
2405
2405
  return urlMatches(request.url, route);
2406
2406
  }
@@ -2735,19 +2735,19 @@ function isUUID(value) {
2735
2735
  var regex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5|7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
2736
2736
  return regex.test(value);
2737
2737
  }
2738
- var key$5 = 'TENANTS';
2739
- function route$8(_x, _x2) {
2740
- return _route$8.apply(this, arguments);
2738
+ var key$6 = 'TENANTS';
2739
+ function route$9(_x, _x2) {
2740
+ return _route$9.apply(this, arguments);
2741
2741
  }
2742
- function _route$8() {
2743
- _route$8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request, config) {
2742
+ function _route$9() {
2743
+ _route$9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request, config) {
2744
2744
  var _Logger, info, session, _request$url$split$re, possibleTenantId;
2745
2745
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2746
2746
  while (1) switch (_context.prev = _context.next) {
2747
2747
  case 0:
2748
2748
  _Logger = Logger(_extends({}, config, {
2749
2749
  debug: config.debug
2750
- }), "[ROUTES][" + key$5 + "]"), info = _Logger.info;
2750
+ }), "[ROUTES][" + key$6 + "]"), info = _Logger.info;
2751
2751
  _context.next = 3;
2752
2752
  return auth(request, config);
2753
2753
  case 3:
@@ -2814,10 +2814,10 @@ function _route$8() {
2814
2814
  }
2815
2815
  }, _callee);
2816
2816
  }));
2817
- return _route$8.apply(this, arguments);
2817
+ return _route$9.apply(this, arguments);
2818
2818
  }
2819
- function matches$8(configRoutes, request) {
2820
- return urlMatches(request.url, configRoutes[key$5]);
2819
+ function matches$9(configRoutes, request) {
2820
+ return urlMatches(request.url, configRoutes[key$6]);
2821
2821
  }
2822
2822
 
2823
2823
  var proxyRoutes = function proxyRoutes(config) {
@@ -2828,21 +2828,22 @@ var proxyRoutes = function proxyRoutes(config) {
2828
2828
  CSRF: makeRestUrl(config, '/auth/csrf'),
2829
2829
  CALLBACK: makeRestUrl(config, '/auth/callback'),
2830
2830
  SIGNOUT: makeRestUrl(config, '/auth/signout'),
2831
- ERROR: makeRestUrl(config, '/auth/error')
2831
+ ERROR: makeRestUrl(config, '/auth/error'),
2832
+ VERIFY_REQUEST: makeRestUrl(config, '/auth/verify-request')
2832
2833
  };
2833
2834
  };
2834
2835
 
2835
- var key$4 = 'SIGNIN';
2836
- function route$7(_x, _x2) {
2837
- return _route$7.apply(this, arguments);
2836
+ var key$5 = 'SIGNIN';
2837
+ function route$8(_x, _x2) {
2838
+ return _route$8.apply(this, arguments);
2838
2839
  }
2839
- function _route$7() {
2840
- _route$7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2840
+ function _route$8() {
2841
+ _route$8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2841
2842
  var url, init, _URL$pathname$split$r, provider, passThroughUrl, params, res;
2842
2843
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2843
2844
  while (1) switch (_context.prev = _context.next) {
2844
2845
  case 0:
2845
- url = proxyRoutes(config)[key$4];
2846
+ url = proxyRoutes(config)[key$5];
2846
2847
  init = {
2847
2848
  method: req.method,
2848
2849
  headers: req.headers
@@ -2852,7 +2853,7 @@ function _route$7() {
2852
2853
  init.body = req.clone().body;
2853
2854
  }
2854
2855
  _URL$pathname$split$r = new URL(req.url).pathname.split('/').reverse(), provider = _URL$pathname$split$r[0];
2855
- url = proxyRoutes(config)[key$4] + "/" + provider;
2856
+ url = proxyRoutes(config)[key$5] + "/" + provider;
2856
2857
  }
2857
2858
  passThroughUrl = new URL(req.url);
2858
2859
  params = new URLSearchParams(passThroughUrl.search);
@@ -2870,17 +2871,17 @@ function _route$7() {
2870
2871
  }
2871
2872
  }, _callee);
2872
2873
  }));
2873
- return _route$7.apply(this, arguments);
2874
+ return _route$8.apply(this, arguments);
2874
2875
  }
2875
- function matches$7(configRoutes, request) {
2876
- return urlMatches(request.url, configRoutes[key$4]);
2876
+ function matches$8(configRoutes, request) {
2877
+ return urlMatches(request.url, configRoutes[key$5]);
2877
2878
  }
2878
2879
 
2879
- function route$6(_x, _x2) {
2880
- return _route$6.apply(this, arguments);
2880
+ function route$7(_x, _x2) {
2881
+ return _route$7.apply(this, arguments);
2881
2882
  }
2882
- function _route$6() {
2883
- _route$6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2883
+ function _route$7() {
2884
+ _route$7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2884
2885
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2885
2886
  while (1) switch (_context.prev = _context.next) {
2886
2887
  case 0:
@@ -2894,17 +2895,17 @@ function _route$6() {
2894
2895
  }
2895
2896
  }, _callee);
2896
2897
  }));
2897
- return _route$6.apply(this, arguments);
2898
+ return _route$7.apply(this, arguments);
2898
2899
  }
2899
- function matches$6(configRoutes, request) {
2900
+ function matches$7(configRoutes, request) {
2900
2901
  return urlMatches(request.url, configRoutes.SESSION);
2901
2902
  }
2902
2903
 
2903
- function route$5(_x, _x2) {
2904
- return _route$5.apply(this, arguments);
2904
+ function route$6(_x, _x2) {
2905
+ return _route$6.apply(this, arguments);
2905
2906
  }
2906
- function _route$5() {
2907
- _route$5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2907
+ function _route$6() {
2908
+ _route$6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2908
2909
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2909
2910
  while (1) switch (_context.prev = _context.next) {
2910
2911
  case 0:
@@ -2918,17 +2919,17 @@ function _route$5() {
2918
2919
  }
2919
2920
  }, _callee);
2920
2921
  }));
2921
- return _route$5.apply(this, arguments);
2922
+ return _route$6.apply(this, arguments);
2922
2923
  }
2923
- function matches$5(configRoutes, request) {
2924
+ function matches$6(configRoutes, request) {
2924
2925
  return urlMatches(request.url, configRoutes.PROVIDERS);
2925
2926
  }
2926
2927
 
2927
- function route$4(_x, _x2) {
2928
- return _route$4.apply(this, arguments);
2928
+ function route$5(_x, _x2) {
2929
+ return _route$5.apply(this, arguments);
2929
2930
  }
2930
- function _route$4() {
2931
- _route$4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2931
+ function _route$5() {
2932
+ _route$5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
2932
2933
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2933
2934
  while (1) switch (_context.prev = _context.next) {
2934
2935
  case 0:
@@ -2942,25 +2943,25 @@ function _route$4() {
2942
2943
  }
2943
2944
  }, _callee);
2944
2945
  }));
2945
- return _route$4.apply(this, arguments);
2946
+ return _route$5.apply(this, arguments);
2946
2947
  }
2947
- function matches$4(configRoutes, request) {
2948
+ function matches$5(configRoutes, request) {
2948
2949
  return urlMatches(request.url, configRoutes.CSRF);
2949
2950
  }
2950
2951
 
2951
- var key$3 = 'CALLBACK';
2952
- function route$3(_x, _x2) {
2953
- return _route$3.apply(this, arguments);
2952
+ var key$4 = 'CALLBACK';
2953
+ function route$4(_x, _x2) {
2954
+ return _route$4.apply(this, arguments);
2954
2955
  }
2955
- function _route$3() {
2956
- _route$3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request$1, config) {
2956
+ function _route$4() {
2957
+ _route$4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request$1, config) {
2957
2958
  var _Logger, error, _URL$pathname$split$r, provider, passThroughUrl, params, url, res, location;
2958
2959
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2959
2960
  while (1) switch (_context.prev = _context.next) {
2960
2961
  case 0:
2961
2962
  _Logger = Logger(_extends({}, config, {
2962
2963
  debug: config.debug
2963
- }), "[ROUTES][" + key$3 + "]"), error = _Logger.error;
2964
+ }), "[ROUTES][" + key$4 + "]"), error = _Logger.error;
2964
2965
  _URL$pathname$split$r = new URL(request$1.url).pathname.split('/').reverse(), provider = _URL$pathname$split$r[0];
2965
2966
  passThroughUrl = new URL(request$1.url);
2966
2967
  params = new URLSearchParams(passThroughUrl.search);
@@ -2994,30 +2995,30 @@ function _route$3() {
2994
2995
  }
2995
2996
  }, _callee);
2996
2997
  }));
2997
- return _route$3.apply(this, arguments);
2998
+ return _route$4.apply(this, arguments);
2998
2999
  }
2999
- function matches$3(configRoutes, request) {
3000
+ function matches$4(configRoutes, request) {
3000
3001
  return urlMatches(request.url, configRoutes.CALLBACK);
3001
3002
  }
3002
3003
 
3003
- var key$2 = 'SIGNOUT';
3004
- function route$2(_x, _x2) {
3005
- return _route$2.apply(this, arguments);
3004
+ var key$3 = 'SIGNOUT';
3005
+ function route$3(_x, _x2) {
3006
+ return _route$3.apply(this, arguments);
3006
3007
  }
3007
- function _route$2() {
3008
- _route$2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request$1, config) {
3008
+ function _route$3() {
3009
+ _route$3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(request$1, config) {
3009
3010
  var url, init, _URL$pathname$split$r, provider, res;
3010
3011
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3011
3012
  while (1) switch (_context.prev = _context.next) {
3012
3013
  case 0:
3013
- url = proxyRoutes(config)[key$2];
3014
+ url = proxyRoutes(config)[key$3];
3014
3015
  init = {
3015
3016
  method: request$1.method
3016
3017
  };
3017
3018
  if (request$1.method === 'POST') {
3018
3019
  init.body = request$1.body;
3019
3020
  _URL$pathname$split$r = new URL(request$1.url).pathname.split('/').reverse(), provider = _URL$pathname$split$r[0];
3020
- url = proxyRoutes(config)[key$2] + "/" + provider;
3021
+ url = proxyRoutes(config)[key$3] + "/" + provider;
3021
3022
  }
3022
3023
  _context.next = 5;
3023
3024
  return request(url, _extends({}, init, {
@@ -3032,13 +3033,38 @@ function _route$2() {
3032
3033
  }
3033
3034
  }, _callee);
3034
3035
  }));
3036
+ return _route$3.apply(this, arguments);
3037
+ }
3038
+ function matches$3(configRoutes, request) {
3039
+ return urlMatches(request.url, configRoutes[key$3]);
3040
+ }
3041
+
3042
+ var key$2 = 'ERROR';
3043
+ function route$2(_x, _x2) {
3044
+ return _route$2.apply(this, arguments);
3045
+ }
3046
+ function _route$2() {
3047
+ _route$2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(req, config) {
3048
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3049
+ while (1) switch (_context.prev = _context.next) {
3050
+ case 0:
3051
+ return _context.abrupt("return", request(proxyRoutes(config)[key$2], {
3052
+ method: req.method,
3053
+ request: req
3054
+ }, config));
3055
+ case 1:
3056
+ case "end":
3057
+ return _context.stop();
3058
+ }
3059
+ }, _callee);
3060
+ }));
3035
3061
  return _route$2.apply(this, arguments);
3036
3062
  }
3037
3063
  function matches$2(configRoutes, request) {
3038
3064
  return urlMatches(request.url, configRoutes[key$2]);
3039
3065
  }
3040
3066
 
3041
- var key$1 = 'ERROR';
3067
+ var key$1 = 'VERIFY_REQUEST';
3042
3068
  function route$1(_x, _x2) {
3043
3069
  return _route$1.apply(this, arguments);
3044
3070
  }
@@ -3072,88 +3098,95 @@ function GETTER(configRoutes, config) {
3072
3098
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3073
3099
  while (1) switch (_context.prev = _context.next) {
3074
3100
  case 0:
3075
- if (!matches$b(configRoutes, req)) {
3101
+ if (!matches$c(configRoutes, req)) {
3076
3102
  _context.next = 3;
3077
3103
  break;
3078
3104
  }
3079
3105
  info('matches me');
3080
- return _context.abrupt("return", route$b(req, config));
3106
+ return _context.abrupt("return", route$c(req, config));
3081
3107
  case 3:
3082
- if (!matches$9(configRoutes, req)) {
3108
+ if (!matches$a(configRoutes, req)) {
3083
3109
  _context.next = 6;
3084
3110
  break;
3085
3111
  }
3086
3112
  info('matches tenant users');
3087
- return _context.abrupt("return", route$9(req, config));
3113
+ return _context.abrupt("return", route$a(req, config));
3088
3114
  case 6:
3089
- if (!matches$a(configRoutes, req)) {
3115
+ if (!matches$b(configRoutes, req)) {
3090
3116
  _context.next = 9;
3091
3117
  break;
3092
3118
  }
3093
3119
  info('matches users');
3094
- return _context.abrupt("return", route$a(req, config));
3120
+ return _context.abrupt("return", route$b(req, config));
3095
3121
  case 9:
3096
- if (!matches$8(configRoutes, req)) {
3122
+ if (!matches$9(configRoutes, req)) {
3097
3123
  _context.next = 12;
3098
3124
  break;
3099
3125
  }
3100
3126
  info('matches tenants');
3101
- return _context.abrupt("return", route$8(req, config));
3127
+ return _context.abrupt("return", route$9(req, config));
3102
3128
  case 12:
3103
- if (!matches$6(configRoutes, req)) {
3129
+ if (!matches$7(configRoutes, req)) {
3104
3130
  _context.next = 15;
3105
3131
  break;
3106
3132
  }
3107
3133
  info('matches session');
3108
- return _context.abrupt("return", route$6(req, config));
3134
+ return _context.abrupt("return", route$7(req, config));
3109
3135
  case 15:
3110
- if (!matches$7(configRoutes, req)) {
3136
+ if (!matches$8(configRoutes, req)) {
3111
3137
  _context.next = 18;
3112
3138
  break;
3113
3139
  }
3114
3140
  info('matches signin');
3115
- return _context.abrupt("return", route$7(req, config));
3141
+ return _context.abrupt("return", route$8(req, config));
3116
3142
  case 18:
3117
- if (!matches$5(configRoutes, req)) {
3143
+ if (!matches$6(configRoutes, req)) {
3118
3144
  _context.next = 21;
3119
3145
  break;
3120
3146
  }
3121
3147
  info('matches providers');
3122
- return _context.abrupt("return", route$5(req, config));
3148
+ return _context.abrupt("return", route$6(req, config));
3123
3149
  case 21:
3124
- if (!matches$4(configRoutes, req)) {
3150
+ if (!matches$5(configRoutes, req)) {
3125
3151
  _context.next = 24;
3126
3152
  break;
3127
3153
  }
3128
3154
  info('matches csrf');
3129
- return _context.abrupt("return", route$4(req, config));
3155
+ return _context.abrupt("return", route$5(req, config));
3130
3156
  case 24:
3131
- if (!matches$3(configRoutes, req)) {
3157
+ if (!matches$4(configRoutes, req)) {
3132
3158
  _context.next = 27;
3133
3159
  break;
3134
3160
  }
3135
3161
  info('matches callback');
3136
- return _context.abrupt("return", route$3(req, config));
3162
+ return _context.abrupt("return", route$4(req, config));
3137
3163
  case 27:
3138
- if (!matches$2(configRoutes, req)) {
3164
+ if (!matches$3(configRoutes, req)) {
3139
3165
  _context.next = 30;
3140
3166
  break;
3141
3167
  }
3142
3168
  info('matches signout');
3143
- return _context.abrupt("return", route$2(req, config));
3169
+ return _context.abrupt("return", route$3(req, config));
3144
3170
  case 30:
3145
3171
  if (!matches$1(configRoutes, req)) {
3146
3172
  _context.next = 33;
3147
3173
  break;
3148
3174
  }
3149
- info('matches error');
3175
+ info('matches verify-request');
3150
3176
  return _context.abrupt("return", route$1(req, config));
3151
3177
  case 33:
3178
+ if (!matches$2(configRoutes, req)) {
3179
+ _context.next = 36;
3180
+ break;
3181
+ }
3182
+ info('matches error');
3183
+ return _context.abrupt("return", route$2(req, config));
3184
+ case 36:
3152
3185
  warn('No GET routes matched');
3153
3186
  return _context.abrupt("return", new Response(null, {
3154
3187
  status: 404
3155
3188
  }));
3156
- case 35:
3189
+ case 38:
3157
3190
  case "end":
3158
3191
  return _context.stop();
3159
3192
  }
@@ -3297,12 +3330,12 @@ function POSTER(configRoutes, config) {
3297
3330
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3298
3331
  while (1) switch (_context.prev = _context.next) {
3299
3332
  case 0:
3300
- if (!matches$9(configRoutes, req)) {
3333
+ if (!matches$a(configRoutes, req)) {
3301
3334
  _context.next = 3;
3302
3335
  break;
3303
3336
  }
3304
3337
  info('matches tenant users');
3305
- return _context.abrupt("return", route$9(req, config));
3338
+ return _context.abrupt("return", route$a(req, config));
3306
3339
  case 3:
3307
3340
  if (!matches(configRoutes, req)) {
3308
3341
  _context.next = 6;
@@ -3311,61 +3344,61 @@ function POSTER(configRoutes, config) {
3311
3344
  info('matches signup');
3312
3345
  return _context.abrupt("return", route(req, config));
3313
3346
  case 6:
3314
- if (!matches$a(configRoutes, req)) {
3347
+ if (!matches$b(configRoutes, req)) {
3315
3348
  _context.next = 9;
3316
3349
  break;
3317
3350
  }
3318
3351
  info('matches users');
3319
- return _context.abrupt("return", route$a(req, config));
3352
+ return _context.abrupt("return", route$b(req, config));
3320
3353
  case 9:
3321
- if (!matches$8(configRoutes, req)) {
3354
+ if (!matches$9(configRoutes, req)) {
3322
3355
  _context.next = 12;
3323
3356
  break;
3324
3357
  }
3325
3358
  info('matches tenants');
3326
- return _context.abrupt("return", route$8(req, config));
3359
+ return _context.abrupt("return", route$9(req, config));
3327
3360
  case 12:
3328
- if (!matches$6(configRoutes, req)) {
3361
+ if (!matches$7(configRoutes, req)) {
3329
3362
  _context.next = 15;
3330
3363
  break;
3331
3364
  }
3332
3365
  info('matches session');
3333
- return _context.abrupt("return", route$6(req, config));
3366
+ return _context.abrupt("return", route$7(req, config));
3334
3367
  case 15:
3335
- if (!matches$7(configRoutes, req)) {
3368
+ if (!matches$8(configRoutes, req)) {
3336
3369
  _context.next = 18;
3337
3370
  break;
3338
3371
  }
3339
3372
  info('matches signin');
3340
- return _context.abrupt("return", route$7(req, config));
3373
+ return _context.abrupt("return", route$8(req, config));
3341
3374
  case 18:
3342
- if (!matches$5(configRoutes, req)) {
3375
+ if (!matches$6(configRoutes, req)) {
3343
3376
  _context.next = 21;
3344
3377
  break;
3345
3378
  }
3346
3379
  info('matches providers');
3347
- return _context.abrupt("return", route$5(req, config));
3380
+ return _context.abrupt("return", route$6(req, config));
3348
3381
  case 21:
3349
- if (!matches$4(configRoutes, req)) {
3382
+ if (!matches$5(configRoutes, req)) {
3350
3383
  _context.next = 24;
3351
3384
  break;
3352
3385
  }
3353
3386
  info('matches csrf');
3354
- return _context.abrupt("return", route$4(req, config));
3387
+ return _context.abrupt("return", route$5(req, config));
3355
3388
  case 24:
3356
- if (!matches$3(configRoutes, req)) {
3389
+ if (!matches$4(configRoutes, req)) {
3357
3390
  _context.next = 27;
3358
3391
  break;
3359
3392
  }
3360
3393
  info('matches callback');
3361
- return _context.abrupt("return", route$3(req, config));
3394
+ return _context.abrupt("return", route$4(req, config));
3362
3395
  case 27:
3363
- if (!matches$2(configRoutes, req)) {
3396
+ if (!matches$3(configRoutes, req)) {
3364
3397
  _context.next = 30;
3365
3398
  break;
3366
3399
  }
3367
3400
  info('matches signout');
3368
- return _context.abrupt("return", route$2(req, config));
3401
+ return _context.abrupt("return", route$3(req, config));
3369
3402
  case 30:
3370
3403
  warn('No POST routes matched');
3371
3404
  return _context.abrupt("return", new Response(null, {
@@ -3393,19 +3426,19 @@ function DELETER(configRoutes, config) {
3393
3426
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3394
3427
  while (1) switch (_context.prev = _context.next) {
3395
3428
  case 0:
3396
- if (!matches$9(configRoutes, req)) {
3429
+ if (!matches$a(configRoutes, req)) {
3397
3430
  _context.next = 3;
3398
3431
  break;
3399
3432
  }
3400
3433
  info('matches tenant users');
3401
- return _context.abrupt("return", route$9(req, config));
3434
+ return _context.abrupt("return", route$a(req, config));
3402
3435
  case 3:
3403
- if (!matches$8(configRoutes, req)) {
3436
+ if (!matches$9(configRoutes, req)) {
3404
3437
  _context.next = 6;
3405
3438
  break;
3406
3439
  }
3407
3440
  info('matches tenants');
3408
- return _context.abrupt("return", route$8(req, config));
3441
+ return _context.abrupt("return", route$9(req, config));
3409
3442
  case 6:
3410
3443
  warn('No DELETE routes matched');
3411
3444
  return _context.abrupt("return", new Response(null, {
@@ -3433,26 +3466,26 @@ function PUTER(configRoutes, config) {
3433
3466
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3434
3467
  while (1) switch (_context.prev = _context.next) {
3435
3468
  case 0:
3436
- if (!matches$9(configRoutes, req)) {
3469
+ if (!matches$a(configRoutes, req)) {
3437
3470
  _context.next = 3;
3438
3471
  break;
3439
3472
  }
3440
3473
  info('matches tenant users');
3441
- return _context.abrupt("return", route$9(req, config));
3474
+ return _context.abrupt("return", route$a(req, config));
3442
3475
  case 3:
3443
- if (!matches$a(configRoutes, req)) {
3476
+ if (!matches$b(configRoutes, req)) {
3444
3477
  _context.next = 6;
3445
3478
  break;
3446
3479
  }
3447
3480
  info('matches users');
3448
- return _context.abrupt("return", route$a(req, config));
3481
+ return _context.abrupt("return", route$b(req, config));
3449
3482
  case 6:
3450
- if (!matches$8(configRoutes, req)) {
3483
+ if (!matches$9(configRoutes, req)) {
3451
3484
  _context.next = 9;
3452
3485
  break;
3453
3486
  }
3454
3487
  info('matches tenants');
3455
- return _context.abrupt("return", route$8(req, config));
3488
+ return _context.abrupt("return", route$9(req, config));
3456
3489
  case 9:
3457
3490
  warn('No PUT routes matched');
3458
3491
  return _context.abrupt("return", new Response(null, {
@@ -3496,6 +3529,7 @@ var appRoutes = function appRoutes(prefix) {
3496
3529
  CALLBACK: prefix + "/auth/callback",
3497
3530
  SIGNOUT: prefix + "/auth/signout",
3498
3531
  ERROR: prefix + "/auth/error",
3532
+ VERIFY_REQUEST: prefix + "/auth/verify-request",
3499
3533
  ME: prefix + "/me",
3500
3534
  USERS: prefix + "/users",
3501
3535
  TENANTS: prefix + "/tenants",