Browse Source
Merge pull request #14211 from abpframework/auto-merge/rel-6-0/1383
Merge branch dev with rel-6.0
pull/14212/head
Engincan VESKE
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
18 additions and
1 deletions
-
docs/en/Migration-Guides/OpenIddict-Mvc.md
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs
|
|
|
@ -50,6 +50,23 @@ |
|
|
|
context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme); |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
- In the **MyApplicationWebModule.cs** add `PreConfigureServices` like below with your application name as the audience: |
|
|
|
|
|
|
|
```csharp |
|
|
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
PreConfigure<OpenIddictBuilder>(builder => |
|
|
|
{ |
|
|
|
builder.AddValidation(options => |
|
|
|
{ |
|
|
|
options.AddAudiences("MyApplication"); // Replace with your application name |
|
|
|
options.UseLocalServer(); |
|
|
|
options.UseAspNetCore(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
``` |
|
|
|
|
|
|
|
- In **MyApplicationWebModule.cs** `OnApplicationInitialization` method **replace IdentityServer and JwtToken midwares**: |
|
|
|
|
|
|
|
|
|
|
|
@ -76,7 +76,7 @@ public class DefaultDotNetProjectBuilder : IDotNetProjectBuilder, ITransientDepe |
|
|
|
Console.WriteLine("Executing...: dotnet build " + project.CsProjPath + " " + buildArguments); |
|
|
|
|
|
|
|
var output = CmdHelper.RunCmdAndGetOutput( |
|
|
|
"dotnet build " + project.CsProjPath + " " + buildArguments, |
|
|
|
"dotnet build \"" + project.CsProjPath + "\" " + buildArguments, |
|
|
|
out int buildStatus |
|
|
|
); |
|
|
|
|
|
|
|
|