How do I get LDAP user information for logged in user into my MATLAB WebApp?
9 ビュー (過去 30 日間)
古いコメントを表示
I have a WebApp server (Windows, R2022a) running a couple of apps, and it is behind LDAP authentication. When a user logs in, I can see that the user information is stored somewhere within the server because the correct username appears in the upper right corner of the main MATLAB WebApp server screen. What I would like to do is access that information inside my app. Is there a MATLAB command within the app that can access the logged in user? I tried:
user = compiler.UserInfo()
but all the fields were empty.
Thank you!
-Greg
0 件のコメント
回答 (1 件)
Suvansh Arora
2022 年 10 月 31 日
編集済み: Suvansh Arora
2022 年 10 月 31 日
Your "userinfo.json" file is missing the "appAccess" section.
Let us assume that we have an example app named "userinfo_app". Then the "userinfo.json" must have the app field access section.
By default it will block access to user information unless explicitly granted. You need to specify app access as root-level element in "userinfo.json", like:
"appAccess": {
"userinfo_app": ["UserID","Email","LastName"]
}
If you would like to grant access to all user info fields, you can specify appAccess as
"appAccess": {
"userinfo_app":"*"
}
If you would like to grant all apps access to all user info fields, you can specify appAccess as
"appAccess": {
"*":"*"
}
1 件のコメント
Pierre Harouimi
2024 年 6 月 11 日
編集済み: Pierre Harouimi
2024 年 6 月 11 日
参考
カテゴリ
Help Center および File Exchange で MATLAB Web App Server についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!