Skip to content
代码片段 群组 项目
未验证 提交 1688b5a3 编辑于 作者: Tibor Tóth's avatar Tibor Tóth 提交者: GitHub
浏览文件

ClientCollection builder methods returns with client (#13437)

上级 5db89514
No related branches found
No related tags found
无相关合并请求
...@@ -68,11 +68,13 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer ...@@ -68,11 +68,13 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
/// </summary> /// </summary>
/// <param name="clientId">The client id for the single page application.</param> /// <param name="clientId">The client id for the single page application.</param>
/// <param name="configure">The <see cref="Action{ClientBuilder}"/> to configure the default single page application.</param> /// <param name="configure">The <see cref="Action{ClientBuilder}"/> to configure the default single page application.</param>
public void AddIdentityServerSPA(string clientId, Action<ClientBuilder> configure) public Client AddIdentityServerSPA(string clientId, Action<ClientBuilder> configure)
{ {
var app = ClientBuilder.IdentityServerSPA(clientId); var app = ClientBuilder.IdentityServerSPA(clientId);
configure(app); configure(app);
Add(app.Build()); var client = app.Build();
Add(client);
return client;
} }
/// <summary> /// <summary>
...@@ -80,11 +82,13 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer ...@@ -80,11 +82,13 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
/// </summary> /// </summary>
/// <param name="clientId">The client id for the single page application.</param> /// <param name="clientId">The client id for the single page application.</param>
/// <param name="configure">The <see cref="Action{ClientBuilder}"/> to configure the default single page application.</param> /// <param name="configure">The <see cref="Action{ClientBuilder}"/> to configure the default single page application.</param>
public void AddSPA(string clientId, Action<ClientBuilder> configure) public Client AddSPA(string clientId, Action<ClientBuilder> configure)
{ {
var app = ClientBuilder.SPA(clientId); var app = ClientBuilder.SPA(clientId);
configure(app); configure(app);
Add(app.Build()); var client = app.Build();
Add(client);
return client;
} }
/// <summary> /// <summary>
...@@ -92,11 +96,13 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer ...@@ -92,11 +96,13 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
/// </summary> /// </summary>
/// <param name="clientId">The client id for the single page application.</param> /// <param name="clientId">The client id for the single page application.</param>
/// <param name="configure">The <see cref="Action{ClientBuilder}"/> to configure the native application.</param> /// <param name="configure">The <see cref="Action{ClientBuilder}"/> to configure the native application.</param>
public void AddNativeApp(string clientId, Action<ClientBuilder> configure) public Client AddNativeApp(string clientId, Action<ClientBuilder> configure)
{ {
var app = ClientBuilder.NativeApp(clientId); var app = ClientBuilder.NativeApp(clientId);
configure(app); configure(app);
Add(app.Build()); var client = app.Build();
Add(client);
return client;
} }
} }
} }
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册