C# 8 and .NET Core 3 Projects Using Azure by Paul Michaels

C# 8 and .NET Core 3 Projects Using Azure by Paul Michaels

Author:Paul Michaels
Language: eng
Format: epub
Tags: COM051310 - COMPUTERS / Programming Languages / C#, COM060160 - COMPUTERS / Web / Web Programming, COM005000 - COMPUTERS / Enterprise Applications / General
Publisher: Packt Publishing
Published: 2019-12-31T08:56:20+00:00


We'll revisit this later and add some (more) valid credentials, but this will get us up and running.

Next, we'll need to register IdentityServer with the ASP.NET Core middleware pipeline:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)

{

if (env.IsDevelopment())

{

app.UseDeveloperExceptionPage();

}

app.UseIdentityServer();

}

The last thing that we need to change in order for IdentityServer to run is to tell it what will be requesting information; this can be done in ConfigureServices (in Startup.cs):

public void ConfigureServices(IServiceCollection services)

{

services

.AddIdentityServer()

.AddDeveloperSigningCredential()

.AddInMemoryClients(new List<Client>())

.AddInMemoryIdentityResources(new List<IdentityResource>());

}

Clearly, this isn't going to let us actually authenticate anything at this stage. Essentially, in order to function correctly, IdentityServer needs to know three things:

Who needs access (users)

What they need access to (resources)

How they will gain access (clients)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.