matlab-proxy 0.15.1__tar.gz → 0.16.0__tar.gz

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.

Potentially problematic release.


This version of matlab-proxy might be problematic. Click here for more details.

Files changed (166) hide show
  1. {matlab-proxy-0.15.1/matlab_proxy.egg-info → matlab-proxy-0.16.0}/PKG-INFO +1 -1
  2. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/actionCreators/index.js +2 -1
  3. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/App.spec.js +12 -11
  4. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/index.js +4 -3
  5. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/constants.js +1 -0
  6. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/app_state.py +9 -6
  7. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/constants.py +1 -0
  8. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/settings.py +7 -4
  9. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/token_auth.py +19 -5
  10. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0/matlab_proxy.egg-info}/PKG-INFO +1 -1
  11. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/setup.py +1 -1
  12. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/integration_tests_with_license/test_http_end_points.py +4 -4
  13. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/integration_tests_without_license/conftest.py +4 -3
  14. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_app.py +1 -1
  15. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_app_state.py +8 -4
  16. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_constants.py +2 -1
  17. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/test_token_auth.py +23 -9
  18. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/LICENSE.md +0 -0
  19. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/MANIFEST.in +0 -0
  20. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/README.md +0 -0
  21. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/.eslintrc.json +0 -0
  22. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/.gitignore +0 -0
  23. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/README.md +0 -0
  24. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/package-lock.json +0 -0
  25. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/package.json +0 -0
  26. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/public/favicon.ico +0 -0
  27. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/public/index.html +0 -0
  28. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/public/manifest.json +0 -0
  29. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/public/robots.txt +0 -0
  30. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/actionCreators/actionCreators.spec.js +0 -0
  31. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/actions/index.js +0 -0
  32. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/css/bootstrap.min.css +0 -0
  33. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/css/site7.min.css +0 -0
  34. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.eot +0 -0
  35. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.svg +0 -0
  36. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.ttf +0 -0
  37. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff +0 -0
  38. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff2 +0 -0
  39. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks-eps.svg +0 -0
  40. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks-eps.ttf +0 -0
  41. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks-eps.woff +0 -0
  42. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks-pictograms.svg +0 -0
  43. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks-pictograms.ttf +0 -0
  44. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks-pictograms.woff +0 -0
  45. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks.svg +0 -0
  46. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks.ttf +0 -0
  47. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/fonts/mathworks.woff +0 -0
  48. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/images/bug_reports/workaround.gif +0 -0
  49. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/images/responsive/global/ico-header-account-hover.svg +0 -0
  50. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/images/responsive/global/ico-header-account.svg +0 -0
  51. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/images/responsive/global/ico-header-contact-hover.svg +0 -0
  52. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/images/responsive/global/ico-header-contact.svg +0 -0
  53. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/3p/images/responsive/global/ico-sprite.png +0 -0
  54. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/App.css +0 -0
  55. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/App/MATLAB-env-blur.png +0 -0
  56. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Confirmation/Confirmation.spec.js +0 -0
  57. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Confirmation/index.js +0 -0
  58. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/Controls.css +0 -0
  59. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/Controls.spec.js +0 -0
  60. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/feedback.svg +0 -0
  61. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/help.svg +0 -0
  62. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/index.js +0 -0
  63. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/restart.svg +0 -0
  64. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/sign-out.svg +0 -0
  65. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/start.svg +0 -0
  66. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/stop.svg +0 -0
  67. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Controls/terminate.svg +0 -0
  68. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/EntitlementSelector/EntitlementSelector.spec.js +0 -0
  69. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/EntitlementSelector/index.js +0 -0
  70. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Error/Error.css +0 -0
  71. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Error/Error.spec.js +0 -0
  72. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Error/index.js +0 -0
  73. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Help/Help.css +0 -0
  74. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Help/Help.spec.js +0 -0
  75. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Help/index.js +0 -0
  76. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Information/Information.css +0 -0
  77. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Information/Information.spec.js +0 -0
  78. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Information/index.js +0 -0
  79. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/ExistingLicense.css +0 -0
  80. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/ExistingLicense.js +0 -0
  81. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/LicenseGatherer.spec.js +0 -0
  82. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/LicensingGatherer.css +0 -0
  83. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/MHLM.js +0 -0
  84. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/NLM.js +0 -0
  85. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/LicensingGatherer/index.js +0 -0
  86. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/MatlabJsd/MatlabJsd.css +0 -0
  87. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/MatlabJsd/MatlabJsd.spec.js +0 -0
  88. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/MatlabJsd/index.js +0 -0
  89. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Overlay/Overlay.css +0 -0
  90. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Overlay/Overlay.spec.js +0 -0
  91. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/Overlay/index.js +0 -0
  92. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/OverlayTrigger.css +0 -0
  93. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/OverlayTrigger.spec.js +0 -0
  94. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/ResizeOverlayTrigger.spec.js +0 -0
  95. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/arrow.svg +0 -0
  96. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/gripper.svg +0 -0
  97. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/index.js +0 -0
  98. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/trigger-error.svg +0 -0
  99. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/components/OverlayTrigger/trigger-ok.svg +0 -0
  100. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/index.css +0 -0
  101. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/index.js +0 -0
  102. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/jest.config.json +0 -0
  103. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/logo.svg +0 -0
  104. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/reducers/index.js +0 -0
  105. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/reducers/reducers.spec.js +0 -0
  106. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/selectors/index.js +0 -0
  107. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/selectors/selectors.spec.js +0 -0
  108. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/serviceWorker.js +0 -0
  109. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/setupTests.js +0 -0
  110. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/test/utils/react-test.js +0 -0
  111. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/gui/src/test/utils/state.js +0 -0
  112. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/__init__.py +0 -0
  113. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/app.py +0 -0
  114. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/default_configuration.py +0 -0
  115. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/devel.py +0 -0
  116. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/icons/matlab.svg +0 -0
  117. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/matlab/startup.m +0 -0
  118. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/__init__.py +0 -0
  119. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/event_loop.py +0 -0
  120. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/list_servers.py +0 -0
  121. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mw.py +0 -0
  122. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/__init__.py +0 -0
  123. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/custom_http_headers.py +0 -0
  124. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/download.py +0 -0
  125. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/embedded_connector/__init__.py +0 -0
  126. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/embedded_connector/helpers.py +0 -0
  127. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/embedded_connector/request.py +0 -0
  128. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/environment_variables.py +0 -0
  129. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/exceptions.py +0 -0
  130. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/logger.py +0 -0
  131. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/mwi/validators.py +0 -0
  132. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/system.py +0 -0
  133. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy/util/windows.py +0 -0
  134. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy.egg-info/SOURCES.txt +0 -0
  135. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy.egg-info/dependency_links.txt +0 -0
  136. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy.egg-info/entry_points.txt +0 -0
  137. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy.egg-info/not-zip-safe +0 -0
  138. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy.egg-info/requires.txt +0 -0
  139. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/matlab_proxy.egg-info/top_level.txt +0 -0
  140. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/setup.cfg +0 -0
  141. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/__init__.py +0 -0
  142. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/integration_tests_with_license/__init__.py +0 -0
  143. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/integration_tests_with_license/conftest.py +0 -0
  144. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/integration_tests_without_license/__init__.py +0 -0
  145. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +0 -0
  146. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/utils/__init__.py +0 -0
  147. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/utils/integration_tests_utils.py +0 -0
  148. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/integration/utils/licensing.py +0 -0
  149. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/__init__.py +0 -0
  150. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/conftest.py +0 -0
  151. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_ddux.py +0 -0
  152. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_devel.py +0 -0
  153. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_non_dev_mode.py +0 -0
  154. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/test_settings.py +0 -0
  155. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/__init__.py +0 -0
  156. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/__init__.py +0 -0
  157. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/embedded_connector/__init__.py +0 -0
  158. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/embedded_connector/test_helpers.py +0 -0
  159. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/embedded_connector/test_request.py +0 -0
  160. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/test_custom_http_headers.py +0 -0
  161. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/test_logger.py +0 -0
  162. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/mwi/test_validators.py +0 -0
  163. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/test_mw.py +0 -0
  164. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/unit/util/test_util.py +0 -0
  165. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/utils/__init__.py +0 -0
  166. {matlab-proxy-0.15.1 → matlab-proxy-0.16.0}/tests/utils/logging_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: matlab-proxy
3
- Version: 0.15.1
3
+ Version: 0.16.0
4
4
  Summary: Python® package enables you to launch MATLAB® and access it from a web browser.
5
5
  Home-page: https://github.com/mathworks/matlab-proxy/
6
6
  Author: The MathWorks, Inc.
@@ -35,6 +35,7 @@ import {
35
35
  selectIsAuthenticated
36
36
  } from '../selectors';
37
37
  import sha256 from 'crypto-js/sha256';
38
+ import { MWI_AUTH_TOKEN_NAME_FOR_HTTP } from '../constants';
38
39
 
39
40
  export function setAuthStatus (authentication) {
40
41
  return {
@@ -296,7 +297,7 @@ export function updateAuthStatus (token) {
296
297
  const options = {
297
298
  method: 'POST',
298
299
  headers: {
299
- mwi_auth_token: tokenHash
300
+ [MWI_AUTH_TOKEN_NAME_FOR_HTTP]: tokenHash
300
301
  }
301
302
  };
302
303
  const response = await fetchWithTimeout(dispatch, './authenticate', options, 15000);
@@ -7,6 +7,7 @@ import App from './index';
7
7
  import * as actionCreators from '../../actionCreators';
8
8
  import state from '../../test/utils/state';
9
9
  import { MAX_REQUEST_FAIL_COUNT } from '../../constants';
10
+ import { MWI_AUTH_TOKEN_NAME_FOR_HTTP } from '../../constants';
10
11
 
11
12
  const _ = require('lodash');
12
13
 
@@ -47,7 +48,7 @@ describe('App Component', () => {
47
48
  });
48
49
 
49
50
  it('should render overlayTrigger (after closing the tutorial)', () => {
50
- // Hide the tutorial before rendering the component.
51
+ // Hide the tutorial before rendering the component.
51
52
  initialState.tutorialHidden = true;
52
53
  initialState.overlayVisibility = false;
53
54
 
@@ -64,7 +65,7 @@ describe('App Component', () => {
64
65
  });
65
66
 
66
67
  it('should render LicensingGatherer component within the App component when no licensing is provided and user is authenticated', () => {
67
- // Set lincensingInfo to empty object.
68
+ // Set licensingInfo to empty object.
68
69
  initialState.overlayVisibility = true;
69
70
  initialState.serverStatus.licensingInfo = {};
70
71
  initialState.authentication.enabled = true;
@@ -79,7 +80,7 @@ describe('App Component', () => {
79
80
  });
80
81
 
81
82
  it('should render LicensingGatherer component within the App component when no licensing is provided and authentication is disabled', () => {
82
- // Set lincensingInfo to empty object.
83
+ // Set licensingInfo to empty object.
83
84
  initialState.overlayVisibility = true;
84
85
  initialState.serverStatus.licensingInfo = {};
85
86
  initialState.authentication.enabled = false;
@@ -93,7 +94,7 @@ describe('App Component', () => {
93
94
  });
94
95
 
95
96
  it('should render Information Component within App Component after licensing is provided and user is authenticated', () => {
96
- // Hide the tutorial and make the overlay visible.
97
+ // Hide the tutorial and make the overlay visible.
97
98
  initialState.tutorialHidden = true;
98
99
  initialState.overlayVisibility = true;
99
100
 
@@ -112,7 +113,7 @@ describe('App Component', () => {
112
113
  });
113
114
 
114
115
  it('should render Information Component within App Component after licensing is provided and auth is not enabled', () => {
115
- // Hide the tutorial and make the overlay visible.
116
+ // Hide the tutorial and make the overlay visible.
116
117
  initialState.tutorialHidden = true;
117
118
  initialState.overlayVisibility = true;
118
119
 
@@ -131,7 +132,7 @@ describe('App Component', () => {
131
132
  });
132
133
 
133
134
  it('should display integration terminated error', () => {
134
- // Hide the tutorial, make the overlay visible and set fetchFailCount to MAX_REQUEST_FAIL_COUNT
135
+ // Hide the tutorial, make the overlay visible and set fetchFailCount to MAX_REQUEST_FAIL_COUNT
135
136
  initialState.tutorialHidden = true;
136
137
  initialState.overlayVisibility = true;
137
138
  initialState.serverStatus.fetchFailCount = MAX_REQUEST_FAIL_COUNT;
@@ -173,7 +174,7 @@ describe('App Component', () => {
173
174
  });
174
175
 
175
176
  it('should display Confirmation component ', () => {
176
- // Hide the tutorial and make the overlay visible
177
+ // Hide the tutorial and make the overlay visible
177
178
  initialState.tutorialHidden = true;
178
179
  initialState.overlayVisibility = true;
179
180
 
@@ -196,7 +197,7 @@ describe('App Component', () => {
196
197
  });
197
198
 
198
199
  it('should display Help Component', () => {
199
- // Hide the tutorial and make the overlay visible
200
+ // Hide the tutorial and make the overlay visible
200
201
  initialState.tutorialHidden = true;
201
202
  initialState.overlayVisibility = true;
202
203
 
@@ -230,9 +231,9 @@ describe('App Component', () => {
230
231
 
231
232
  const tokenInQuery = '12345';
232
233
  it.each([
233
- [`?mwi_auth_token=${tokenInQuery}&test1=1&test2=2`, tokenInQuery],
234
- [`?test1=1&mwi_auth_token=${tokenInQuery}&test2=2`, tokenInQuery],
235
- [`?test1=1&test2=2&mwi_auth_token=${tokenInQuery}`, tokenInQuery]
234
+ [`?${MWI_AUTH_TOKEN_NAME_FOR_HTTP}=${tokenInQuery}&test1=1&test2=2`, tokenInQuery],
235
+ [`?test1=1&${MWI_AUTH_TOKEN_NAME_FOR_HTTP}=${tokenInQuery}&test2=2`, tokenInQuery],
236
+ [`?test1=1&test2=2&${MWI_AUTH_TOKEN_NAME_FOR_HTTP}=${tokenInQuery}`, tokenInQuery]
236
237
  ])("should pick the token correctly when the query parameters are '%s'", (queryParams, expectedToken) => {
237
238
  const url = 'http://localhost.com:5555';
238
239
  const mockUpdateAuthStatus = jest.spyOn(actionCreators, 'updateAuthStatus');
@@ -43,6 +43,7 @@ import {
43
43
  } from '../../actionCreators';
44
44
  import blurredBackground from './MATLAB-env-blur.png';
45
45
  import EntitlementSelector from '../EntitlementSelector';
46
+ import { MWI_AUTH_TOKEN_NAME_FOR_HTTP } from '../../constants';
46
47
 
47
48
  function App () {
48
49
  const dispatch = useDispatch();
@@ -165,10 +166,10 @@ function App () {
165
166
  cancel={endSession}
166
167
  title='MATLAB is currently open in another window'
167
168
  cancelButton={wasEverActive ? ('Cancel') : ('Continue in existing window')}
168
- confirmButton = {wasEverActive ? ('Confirm') : ('Continue in this window')}>
169
+ confirmButton={wasEverActive ? ('Confirm') : ('Continue in this window')}>
169
170
  {wasEverActive
170
171
  ? 'You have been disconnected because MATLAB is open in another window. Click on Confirm to continue using MATLAB here.'
171
- : <div>MATLAB is open in another window and cannot be opened in a second window or tab at the same time.<br></br>Would you like to continue in this window?</div> }
172
+ : <div>MATLAB is open in another window and cannot be opened in a second window or tab at the same time.<br></br>Would you like to continue in this window?</div>}
172
173
  </Confirmation>
173
174
  );
174
175
  }
@@ -204,7 +205,7 @@ function App () {
204
205
 
205
206
  useEffect(() => {
206
207
  const queryParams = parseQueryParams(window.location);
207
- const token = queryParams.get('mwi_auth_token');
208
+ const token = queryParams.get(MWI_AUTH_TOKEN_NAME_FOR_HTTP);
208
209
 
209
210
  if (token) {
210
211
  dispatch(updateAuthStatus(token));
@@ -4,3 +4,4 @@
4
4
  export const STATUS_REQUEST_INTERVAL_MS = 1000;
5
5
  // Maximum number of consecutive failed requests allowed before triggering a connection error
6
6
  export const MAX_REQUEST_FAIL_COUNT = 60;
7
+ export const MWI_AUTH_TOKEN_NAME_FOR_HTTP = 'mwi-auth-token';
@@ -11,13 +11,13 @@ from datetime import datetime, timedelta, timezone
11
11
  from typing import Final, Optional
12
12
 
13
13
  from matlab_proxy import util
14
- from matlab_proxy.settings import (
15
- get_process_startup_timeout,
16
- )
17
14
  from matlab_proxy.constants import (
18
15
  CONNECTOR_SECUREPORT_FILENAME,
19
16
  MATLAB_LOGS_FILE_NAME,
20
17
  )
18
+ from matlab_proxy.settings import (
19
+ get_process_startup_timeout,
20
+ )
21
21
  from matlab_proxy.util import mw, mwi, system, windows
22
22
  from matlab_proxy.util.mwi import environment_variables as mwi_env
23
23
  from matlab_proxy.util.mwi import token_auth
@@ -28,12 +28,11 @@ from matlab_proxy.util.mwi.exceptions import (
28
28
  LicensingError,
29
29
  MatlabError,
30
30
  OnlineLicensingError,
31
- XvfbError,
32
31
  UIVisibleFatalError,
32
+ XvfbError,
33
33
  log_error,
34
34
  )
35
35
 
36
-
37
36
  logger = mwi.logger.get()
38
37
 
39
38
 
@@ -314,7 +313,11 @@ class AppState:
314
313
  [Dict | None]: Returns token authentication headers if any.
315
314
  """
316
315
  return (
317
- {self.settings["mwi_auth_token_name"]: self.settings["mwi_auth_token_hash"]}
316
+ {
317
+ self.settings["mwi_auth_token_name_for_http"]: self.settings[
318
+ "mwi_auth_token_hash"
319
+ ]
320
+ }
318
321
  if self.settings["mwi_is_token_auth_enabled"]
319
322
  else None
320
323
  )
@@ -26,3 +26,4 @@ SUPPORTED_MATLAB_VERSIONS: Final[List[str]] = [
26
26
 
27
27
  # This constant when set to True restricts the number of active sessions to one
28
28
  IS_CONCURRENCY_CHECK_ENABLED: Final[bool] = True
29
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP = "mwi-auth-token"
@@ -17,6 +17,7 @@ from cryptography.x509.oid import NameOID
17
17
 
18
18
  import matlab_proxy
19
19
  from matlab_proxy import constants
20
+ from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
20
21
  from matlab_proxy.util import mwi, system
21
22
  from matlab_proxy.util.mwi import environment_variables as mwi_env
22
23
  from matlab_proxy.util.mwi import token_auth
@@ -197,11 +198,12 @@ def get_dev_settings(config):
197
198
  "mwi_logs_root_dir": get_mwi_logs_root_dir(dev=True),
198
199
  "mw_context_tags": get_mw_context_tags(matlab_proxy.get_default_config_name()),
199
200
  "mwi_server_url": None,
200
- "mwi_is_token_auth_enabled": mwi_auth_token != None,
201
+ "mwi_is_token_auth_enabled": mwi_auth_token is not None,
201
202
  "mwi_auth_status": False,
202
203
  "mwi_auth_token": mwi_auth_token,
203
204
  "mwi_auth_token_hash": mwi_auth_token_hash,
204
- "mwi_auth_token_name": mwi_env.get_env_name_mwi_auth_token().lower(),
205
+ "mwi_auth_token_name_for_http": MWI_AUTH_TOKEN_NAME_FOR_HTTP,
206
+ "mwi_auth_token_name_for_env": mwi_env.get_env_name_mwi_auth_token().lower(),
205
207
  "mwi_use_existing_license": mwi.validators.validate_use_existing_licensing(
206
208
  os.getenv(mwi_env.get_env_name_mwi_use_existing_license(), "")
207
209
  ),
@@ -322,11 +324,12 @@ def get_server_settings(config_name):
322
324
  "mw_context_tags": get_mw_context_tags(config_name),
323
325
  # The url where the matlab-proxy server is accessible at
324
326
  "mwi_server_url": None,
325
- "mwi_is_token_auth_enabled": mwi_auth_token != None,
327
+ "mwi_is_token_auth_enabled": mwi_auth_token is not None,
326
328
  "mwi_auth_status": False,
327
329
  "mwi_auth_token": mwi_auth_token,
328
330
  "mwi_auth_token_hash": mwi_auth_token_hash,
329
- "mwi_auth_token_name": mwi_env.get_env_name_mwi_auth_token().lower(),
331
+ "mwi_auth_token_name_for_http": MWI_AUTH_TOKEN_NAME_FOR_HTTP,
332
+ "mwi_auth_token_name_for_env": mwi_env.get_env_name_mwi_auth_token().lower(),
330
333
  "mwi_use_existing_license": mwi.validators.validate_use_existing_licensing(
331
334
  os.getenv(mwi_env.get_env_name_mwi_use_existing_license(), "")
332
335
  ),
@@ -59,7 +59,7 @@ def generate_mwi_auth_token_and_hash():
59
59
  def get_mwi_auth_token_access_str(app_settings):
60
60
  """Returns formatted string with mwi token for use with server URL"""
61
61
  if app_settings["mwi_is_token_auth_enabled"]:
62
- mwi_auth_token_name = app_settings["mwi_auth_token_name"]
62
+ mwi_auth_token_name = app_settings["mwi_auth_token_name_for_http"]
63
63
  mwi_auth_token = app_settings["mwi_auth_token"]
64
64
  return f"?{mwi_auth_token_name}={mwi_auth_token}"
65
65
 
@@ -134,7 +134,20 @@ async def _get_token_name(request):
134
134
  str : token name
135
135
  """
136
136
  app_settings = request.app["settings"]
137
- return app_settings["mwi_auth_token_name"]
137
+ return app_settings["mwi_auth_token_name_for_env"]
138
+
139
+
140
+ def _get_token_name_for_http(request):
141
+ """Gets the name of the token from settings.
142
+
143
+ Args:
144
+ request (HTTPRequest) : Used to get to app settings
145
+
146
+ Returns:
147
+ str : token name
148
+ """
149
+ app_settings = request.app["settings"]
150
+ return app_settings["mwi_auth_token_name_for_http"]
138
151
 
139
152
 
140
153
  async def _get_token(request):
@@ -238,11 +251,11 @@ async def _is_valid_token_in_url_query(request):
238
251
  query_string = request.query_string
239
252
  logger.debug(f"url query parameters found:{query_string}")
240
253
  if query_string:
241
- token_name = await _get_token_name(request)
254
+ token_name = _get_token_name_for_http(request)
242
255
  parsed_token = parse_qs(request.query_string).get(token_name)
243
256
  if parsed_token:
244
257
  parsed_token = parsed_token[0]
245
- logger.debug(f"parsed_token from url query string.")
258
+ logger.debug("parsed_token from url query string.")
246
259
  return await _is_valid_token(parsed_token, request)
247
260
 
248
261
  logger.debug("Token not found in url query.")
@@ -262,8 +275,9 @@ async def _is_valid_token_in_headers(request):
262
275
  """
263
276
  logger.debug("Checking for token in request headers...")
264
277
  headers = request.headers
265
- token_name = await _get_token_name(request)
278
+ token_name = _get_token_name_for_http(request)
266
279
  if token_name in headers:
280
+ logger.debug(f"Token found in headers: {token_name}")
267
281
  is_valid_token = await _is_valid_token(headers[token_name], request)
268
282
  if is_valid_token:
269
283
  await _store_token_hash_into_session(request)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: matlab-proxy
3
- Version: 0.15.1
3
+ Version: 0.16.0
4
4
  Summary: Python® package enables you to launch MATLAB® and access it from a web browser.
5
5
  Home-page: https://github.com/mathworks/matlab-proxy/
6
6
  Author: The MathWorks, Inc.
@@ -70,7 +70,7 @@ long_description = (HERE / "README.md").read_text()
70
70
 
71
71
  setuptools.setup(
72
72
  name="matlab-proxy",
73
- version="0.15.1",
73
+ version="0.16.0",
74
74
  url=config["doc_url"],
75
75
  author="The MathWorks, Inc.",
76
76
  author_email="cloud@mathworks.com",
@@ -12,7 +12,7 @@ import re
12
12
  from requests.adapters import HTTPAdapter, Retry
13
13
  from urllib.parse import urlparse, parse_qs
14
14
  from tests.utils.logging_util import create_integ_test_logger
15
- from logging import DEBUG
15
+ from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
16
16
 
17
17
  _logger = create_integ_test_logger(__name__)
18
18
 
@@ -64,9 +64,9 @@ class RealMATLABServer:
64
64
  parsed_url = urlparse(utils.get_connection_string(self.mwi_app_port))
65
65
 
66
66
  self.headers = {
67
- "mwi_auth_token": (
68
- parse_qs(parsed_url.query)["mwi_auth_token"][0]
69
- if "mwi_auth_token" in parse_qs(parsed_url.query)
67
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP: (
68
+ parse_qs(parsed_url.query)[MWI_AUTH_TOKEN_NAME_FOR_HTTP][0]
69
+ if MWI_AUTH_TOKEN_NAME_FOR_HTTP in parse_qs(parsed_url.query)
70
70
  else ""
71
71
  )
72
72
  }
@@ -6,6 +6,7 @@ import requests
6
6
  from tests.utils.logging_util import create_integ_test_logger
7
7
  import os
8
8
  from urllib.parse import urlparse, parse_qs
9
+ from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
9
10
 
10
11
  _logger = create_integ_test_logger(__name__)
11
12
 
@@ -34,9 +35,9 @@ def parse_matlab_proxy_url():
34
35
  parsed_url = urlparse(utils.get_connection_string(mwi_app_port))
35
36
 
36
37
  headers = {
37
- "mwi_auth_token": (
38
- parse_qs(parsed_url.query)["mwi_auth_token"][0]
39
- if "mwi_auth_token" in parse_qs(parsed_url.query)
38
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP: (
39
+ parse_qs(parsed_url.query)[MWI_AUTH_TOKEN_NAME_FOR_HTTP][0]
40
+ if MWI_AUTH_TOKEN_NAME_FOR_HTTP in parse_qs(parsed_url.query)
40
41
  else ""
41
42
  )
42
43
  }
@@ -1031,7 +1031,7 @@ async def test_update_entitlement_with_correct_entitlement(set_licensing_info):
1031
1031
  assert resp.status == HTTPStatus.OK
1032
1032
 
1033
1033
 
1034
- async def test_get_auth_token_route(test_server, monkeypatch):
1034
+ async def test_get_auth_token_route(test_server):
1035
1035
  """Test to check endpoint : "/get_auth_token"
1036
1036
 
1037
1037
  Args:
@@ -1,4 +1,4 @@
1
- # Copyright 2023 The MathWorks, Inc.
1
+ # Copyright 2023-2024 The MathWorks, Inc.
2
2
 
3
3
  import json
4
4
  import os
@@ -7,9 +7,10 @@ from pathlib import Path
7
7
  from typing import Optional
8
8
 
9
9
  import pytest
10
- from matlab_proxy import settings
11
10
 
11
+ from matlab_proxy import settings
12
12
  from matlab_proxy.app_state import AppState
13
+ from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
13
14
  from matlab_proxy.util.mwi.exceptions import LicensingError, MatlabError
14
15
  from tests.unit.util import MockResponse
15
16
 
@@ -55,7 +56,7 @@ def app_state_fixture(sample_settings_fixture):
55
56
 
56
57
  @pytest.fixture
57
58
  def sample_token_headers_fixture():
58
- return {"mwi_auth_token_name": "asdf"}
59
+ return {MWI_AUTH_TOKEN_NAME_FOR_HTTP: "asdf"}
59
60
 
60
61
 
61
62
  @pytest.fixture
@@ -76,7 +77,10 @@ def app_state_with_token_auth_fixture(
76
77
  ((mwi_auth_token_name, mwi_auth_token_hash),) = sample_token_headers_fixture.items()
77
78
  app_state_fixture.matlab_session_files["matlab_ready_file"] = tmp_matlab_ready_file
78
79
  app_state_fixture.settings["mwi_is_token_auth_enabled"] = True
79
- app_state_fixture.settings["mwi_auth_token_name"] = mwi_auth_token_name
80
+ app_state_fixture.settings["mwi_auth_token_name_for_env"] = mwi_auth_token_name
81
+ app_state_fixture.settings["mwi_auth_token_name_for_http"] = (
82
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP
83
+ )
80
84
  app_state_fixture.settings["mwi_auth_token_hash"] = mwi_auth_token_hash
81
85
  app_state_fixture.settings["mwi_server_url"] = "http://localhost:8888"
82
86
 
@@ -1,4 +1,5 @@
1
- # Copyright 2020-2023 The MathWorks, Inc.
1
+ # Copyright 2023-2024 The MathWorks, Inc.
2
+
2
3
  TWO_MAX_TRIES = 2
3
4
  FIVE_MAX_TRIES = 5
4
5
  HALF_SECOND_DELAY = 0.5
@@ -6,6 +6,7 @@ from aiohttp_session import setup as aiohttp_session_setup
6
6
  from aiohttp_session.cookie_storage import EncryptedCookieStorage
7
7
  from cryptography import fernet
8
8
 
9
+ from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
9
10
  from matlab_proxy.util.mwi import environment_variables as mwi_env
10
11
  from matlab_proxy.util.mwi import token_auth
11
12
 
@@ -105,10 +106,11 @@ def fake_server_with_auth_enabled(
105
106
 
106
107
  app = web.Application()
107
108
  app["settings"] = {
108
- "mwi_is_token_auth_enabled": mwi_auth_token != None,
109
+ "mwi_is_token_auth_enabled": mwi_auth_token is not None,
109
110
  "mwi_auth_token": mwi_auth_token,
110
111
  "mwi_auth_token_hash": mwi_auth_token_hash,
111
- "mwi_auth_token_name": mwi_env.get_env_name_mwi_auth_token().lower(),
112
+ "mwi_auth_token_name_for_http": MWI_AUTH_TOKEN_NAME_FOR_HTTP,
113
+ "mwi_auth_token_name_for_env": mwi_env.get_env_name_mwi_auth_token().lower(),
112
114
  }
113
115
  app.router.add_get("/", fake_endpoint)
114
116
  app.router.add_post("/", fake_endpoint)
@@ -127,7 +129,7 @@ async def test_set_value_with_token(
127
129
  resp = await fake_server_with_auth_enabled.post(
128
130
  "/",
129
131
  data={"value": "foo"},
130
- headers={"mwi_auth_token": get_custom_auth_token_str},
132
+ headers={MWI_AUTH_TOKEN_NAME_FOR_HTTP: get_custom_auth_token_str},
131
133
  )
132
134
  assert resp.status == web.HTTPOk.status_code
133
135
  assert await resp.text() == "thanks for the data"
@@ -158,7 +160,9 @@ async def test_set_value_with_token_hash(
158
160
  "/",
159
161
  data={"value": "foo"},
160
162
  headers={
161
- "mwi_auth_token": token_auth._generate_hash(get_custom_auth_token_str)
163
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP: token_auth._generate_hash(
164
+ get_custom_auth_token_str
165
+ )
162
166
  },
163
167
  )
164
168
  assert resp.status == web.HTTPOk.status_code
@@ -193,7 +197,9 @@ async def test_set_value_without_token(fake_server_with_auth_enabled):
193
197
 
194
198
  async def test_set_value_with_invalid_token(fake_server_with_auth_enabled):
195
199
  resp2 = await fake_server_with_auth_enabled.post(
196
- "/", data={"value": "foobar"}, headers={"mwi_auth_token": "invalid-token"}
200
+ "/",
201
+ data={"value": "foobar"},
202
+ headers={MWI_AUTH_TOKEN_NAME_FOR_HTTP: "invalid-token"},
197
203
  )
198
204
  assert resp2.status == web.HTTPForbidden.status_code
199
205
 
@@ -205,7 +211,11 @@ async def test_set_value_with_token_in_params(
205
211
  resp = await fake_server_with_auth_enabled.post(
206
212
  "/",
207
213
  data={"value": "foofoo"},
208
- params={"mwi_auth_token": token_auth._generate_hash(get_custom_auth_token_str)},
214
+ params={
215
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP: token_auth._generate_hash(
216
+ get_custom_auth_token_str
217
+ )
218
+ },
209
219
  )
210
220
  assert resp.status == web.HTTPOk.status_code
211
221
  assert await resp.text() == "thanks for the data"
@@ -232,7 +242,11 @@ async def test_get_value_with_token_in_query_params(
232
242
  fake_server_with_auth_enabled.server.app["value"] = "bar"
233
243
  resp = await fake_server_with_auth_enabled.get(
234
244
  "/",
235
- params={"mwi_auth_token": token_auth._generate_hash(get_custom_auth_token_str)},
245
+ params={
246
+ MWI_AUTH_TOKEN_NAME_FOR_HTTP: token_auth._generate_hash(
247
+ get_custom_auth_token_str
248
+ )
249
+ },
236
250
  )
237
251
  assert resp.status == web.HTTPOk.status_code
238
252
  assert await resp.text() == "value: bar"
@@ -257,7 +271,7 @@ def fake_server_without_auth_enabled(loop, aiohttp_client, monkeypatch):
257
271
  "mwi_is_token_auth_enabled": mwi_auth_token != None,
258
272
  "mwi_auth_token": mwi_auth_token,
259
273
  "mwi_auth_token_hash": mwi_auth_token_hash,
260
- "mwi_auth_token_name": mwi_env.get_env_name_mwi_auth_token().lower(),
274
+ "mwi_auth_token_name_for_env": mwi_env.get_env_name_mwi_auth_token().lower(),
261
275
  }
262
276
  app.router.add_get("/", fake_endpoint)
263
277
  app.router.add_post("/", fake_endpoint)
@@ -283,7 +297,7 @@ async def test_get_value_in_query_params(
283
297
  # Server should respond even if token is provided when not needed.
284
298
  fake_server_without_auth_enabled.server.app["value"] = "bar2"
285
299
  resp = await fake_server_without_auth_enabled.get(
286
- "/", params={"mwi_auth_token": get_custom_auth_token_str}
300
+ "/", params={"mwi-auth-token": get_custom_auth_token_str}
287
301
  )
288
302
  assert resp.status == web.HTTPOk.status_code
289
303
  assert await resp.text() == "value: bar2"
File without changes
File without changes
File without changes
File without changes