查看OpenID Connect用户的声明
- 更新时间2025-12-03
- 阅读时长4分钟
您可以使用声明(claim)为OpenID Connect用户分配角色并更新其SystemLink用户名。
- 登录运行SystemLink的服务器,找到 C:\Program Files\National Instruments\Shared\Web Server\conf\defines.d\目录,在文本编辑器中打开50_mod_auth_openidc-defines.conf。
- 将UnDefine AUTH_OIDC_ENABLE_CLAIM_INFO更改为Define AUTH_OIDC_ENABLE_CLAIM_INFO。文件应该与下列范例类似。
# # Defined OpenID-Connect configuration for the Windows Apache installation. # # The name of the JSON map containing metadata about each identity provider. Define AUTH_OIDC_ATTRIBUTES_KEY ni-attributes # CA bundle to use when making requests to an identity provider. Define AUTH_OIDC_BUNDLE ../nicurl/ca-bundle.crt # Path to OIDC provider configuration. Define AUTH_OIDC_PROVIDER_DIR ${HTCONF_PATH}/openidc # The location to redirect when performing an OpenID-Connect login. Define AUTH_OIDC_REDIRECT_URI /login/openidc-redirect # # User-editable variables. # # Whether OIDC is enabled. Define AUTH_OIDC_ENABLED # When enabled, /login/openidc-redirect?info=json and # /login/openidc-redirect?info=html will return the claims for the currently # logged in user. Define AUTH_OIDC_ENABLE_CLAIM_INFO - 如提供程序为https,证书的签名CA没有包含在NI-CURL CA中:C:\Program Files\National Instruments\Shared\nicurl\ca-bundle.crt 。请更新AUTH_OIDC_BUNDLE以指向包含提供程序CA的CA软件包。路径可以是绝对路径,也可以是相对路径C:\Program Files\National Instruments\Shared\Web Server 。
- 保存文件并重启NI Web服务器。
- 在下列位置查看用户声明。 protocol://systemlink-dns/login/openidc-redirect?info=type
其中,
- protocol为https://或者http://。
- systemlink-dns是SystemLink服务器的端口名称。如使用端口80或443,可省略端口。备注 NI建议重定向URI中的DNS名称与SystemLink服务器上NI Web服务器配置中设置的首选主机名匹配。
- type为html或json 。
相关内容
- 向工作区中的用户分配角色
通过指定用户角色权限以及可访问的工作区自定义服务器上各类用户的访问体验。