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 = [
45
45
dependencies = [
46
46
" jupyter-server-proxy" ,
47
47
" simpervisor>=1.0.0" ,
48
- " matlab-proxy>=0.10 .0" ,
48
+ " matlab-proxy>=0.16 .0" ,
49
49
" psutil" ,
50
50
" requests" ,
51
51
" 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.
2
2
3
3
import os
4
4
from pathlib import Path
@@ -77,6 +77,7 @@ def setup_matlab():
77
77
"""
78
78
79
79
import matlab_proxy
80
+ from matlab_proxy .constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
80
81
from matlab_proxy .util .mwi import logger as mwi_logger
81
82
82
83
logger = mwi_logger .get (init = True )
@@ -104,7 +105,7 @@ def setup_matlab():
104
105
# We are using token_hash instead of raw token for better security.
105
106
if _mwi_auth_token :
106
107
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" )
108
109
}
109
110
110
111
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.
2
2
3
3
import inspect
4
4
import os
5
5
from pathlib import Path
6
6
7
- import matlab_proxy
8
- from matlab_proxy .util .mwi import environment_variables as mwi_env
9
-
10
7
import jupyter_matlab_proxy
8
+ import matlab_proxy
11
9
from 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
12
12
13
13
14
14
def test_get_auth_token ():
@@ -79,7 +79,9 @@ def test_setup_matlab():
79
79
"icon_path" : icon_path ,
80
80
},
81
81
"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
+ ),
83
85
},
84
86
}
85
87
You can’t perform that action at this time.
0 commit comments