File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ classifiers = [
4545dependencies = [
4646 " jupyter-server-proxy" ,
4747 " simpervisor>=1.0.0" ,
48- " matlab-proxy>=0.10 .0" ,
48+ " matlab-proxy>=0.16 .0" ,
4949 " psutil" ,
5050 " requests" ,
5151 " ipykernel"
Original file line number Diff line number Diff line change 1- # Copyright 2020-2023 The MathWorks, Inc.
1+ # Copyright 2020-2024 The MathWorks, Inc.
22
33import os
44from pathlib import Path
@@ -77,6 +77,7 @@ def setup_matlab():
7777 """
7878
7979 import matlab_proxy
80+ from matlab_proxy .constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
8081 from matlab_proxy .util .mwi import logger as mwi_logger
8182
8283 logger = mwi_logger .get (init = True )
@@ -104,7 +105,7 @@ def setup_matlab():
104105 # We are using token_hash instead of raw token for better security.
105106 if _mwi_auth_token :
106107 jsp_config ["request_headers_override" ] = {
107- "mwi_auth_token" : _mwi_auth_token .get ("token_hash" )
108+ MWI_AUTH_TOKEN_NAME_FOR_HTTP : _mwi_auth_token .get ("token_hash" )
108109 }
109110
110111 return jsp_config
Original file line number Diff line number Diff line change 1- # Copyright 2020-2023 The MathWorks, Inc.
1+ # Copyright 2020-2024 The MathWorks, Inc.
22
33import inspect
44import os
55from pathlib import Path
66
7- import matlab_proxy
8- from matlab_proxy .util .mwi import environment_variables as mwi_env
9-
107import jupyter_matlab_proxy
8+ import matlab_proxy
119from jupyter_matlab_proxy .jupyter_config import config
10+ from matlab_proxy .constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
11+ from matlab_proxy .util .mwi import environment_variables as mwi_env
1212
1313
1414def test_get_auth_token ():
@@ -79,7 +79,9 @@ def test_setup_matlab():
7979 "icon_path" : icon_path ,
8080 },
8181 "request_headers_override" : {
82- "mwi_auth_token" : jupyter_matlab_proxy ._mwi_auth_token .get ("token_hash" ),
82+ MWI_AUTH_TOKEN_NAME_FOR_HTTP : jupyter_matlab_proxy ._mwi_auth_token .get (
83+ "token_hash"
84+ ),
8385 },
8486 }
8587
You can’t perform that action at this time.
0 commit comments