Skip to content

ClientCollection builder methods returns with client #13437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,35 +68,41 @@ public void AddRange(params Client[] clients)
/// </summary>
/// <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>
public void AddIdentityServerSPA(string clientId, Action<ClientBuilder> configure)
public Client AddIdentityServerSPA(string clientId, Action<ClientBuilder> configure)
{
var app = ClientBuilder.IdentityServerSPA(clientId);
configure(app);
Add(app.Build());
var client = app.Build();
Add(client);
return client;
}

/// <summary>
/// Adds an externally registered single page application.
/// </summary>
/// <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>
public void AddSPA(string clientId, Action<ClientBuilder> configure)
public Client AddSPA(string clientId, Action<ClientBuilder> configure)
{
var app = ClientBuilder.SPA(clientId);
configure(app);
Add(app.Build());
var client = app.Build();
Add(client);
return client;
}

/// <summary>
/// Adds an externally registered native application..
/// </summary>
/// <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>
public void AddNativeApp(string clientId, Action<ClientBuilder> configure)
public Client AddNativeApp(string clientId, Action<ClientBuilder> configure)
{
var app = ClientBuilder.NativeApp(clientId);
configure(app);
Add(app.Build());
var client = app.Build();
Add(client);
return client;
}
}
}