繁体   English   中英

WSO2 IS - Blazor SPA“在请求中找不到作为参数的无效请求 client_id。”

[英]WSO2 IS - Blazor SPA 'Invalid request client_id not found in request as parameter.'

当尝试从我的 Blazor SPA 以默认admin用户身份登录 WSO2 Identity Server 时,出现以下错误:

在请求中找不到 client_id 作为参数

但身份验证成功并且用户已登录。

我的服务提供商中的设置如下:

服务提供商设置

连接到 WSO2 的代码是:

Program.cs

builder.Services.AddOidcAuthentication(options =>{
{
  builder.Configuration.Bind("Local", options.ProviderOptions);
});

Appsettings.json

{
  "Local": {
    "Authority": "https://localhost:9443/oauth2/oidcdiscovery",
    "ClientId": "lUf05M1d3IRvpdOkZgLSt9TRZX8a",
    "ResponseType": "code",
    "DefaultScopes": [],
    "RedirectUri": "authentication/login-callback",
    "PostLogoutRedirectUri": "signedOut"
  }
}

当Service Provider中的“Allow authentication without the client secret”选项未勾选时,认证会出错,用户无法登录。

POST 请求 401

回复:

error_description: Unsupported Client Authentication Method!
error: invalid_client

这是预期的行为吗?

OAuth Version: OAuth-2.0

允许的资助类型:

Code,Implicit,Password,Client Credential, Refresh Token

client_id not found in request as parameter. 记录了与 OIDC session 管理相关的请求。 它发生在 OIDC session 管理 iframe 加载时没有客户端 id 查询参数。

如果未选中“允许在没有客户端密码的情况下进行身份验证”并且您没有在令牌请求中传递客户端密码,则令牌请求会出现 401 错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM