Browse Source

Merge branch 'dev' into cmskit-features

pull/13675/head
malik masis 4 years ago
parent
commit
3519a1cecd
  1. 21
      docs/en/CLI.md
  2. 4
      docs/en/docs-nav.json
  3. 1
      docs/zh-Hans/CLI.md
  4. 4
      docs/zh-Hans/docs-nav.json
  5. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderOptions.cs
  6. 40
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs

21
docs/en/CLI.md

@ -124,7 +124,7 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `--separate-auth-server`: The Identity Server project comes as a separate project and runs at a different endpoint. It separates the Identity Server from the API Host application. If not specified, you will have a single endpoint in the server side.
* `--mobile` or `-m`: Specifies the mobile application framework. If not specified, no mobile application will be created. Available options:
* `react-native`: React Native.
* `maui`: MAUI.
* `maui`: MAUI. This mobile option is only available for ABP Commercial.
* `--database-provider` or `-d`: Specifies the database provider. Default provider is `ef`. Available providers:
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
@ -145,7 +145,8 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `mongodb`: MongoDB.
* `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes:
* `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* **`maui`**: .NET MAUI. A minimalist .NET MAUI application will be created if you specify this option.
* `--output-folder` or `-o`: Specifies the output folder. Default value is the current directory.
* `--version` or `-v`: Specifies the ABP & template version. It can be a [release tag](https://github.com/abpframework/abp/releases) or a [branch name](https://github.com/abpframework/abp/branches). Uses the latest release if not specified. Most of the times, you will want to use the latest version.
* `--preview`: Use latest preview version.
@ -245,7 +246,7 @@ It can also create a new module for your solution and add it to your solution. S
> A business module generally consists of several packages (because of layering, different database provider options or other reasons). Using `add-module` command dramatically simplifies adding a module to a solution. However, each module may require some additional configurations which is generally indicated in the documentation of the related module.
Usage
Usage:
````bash
abp add-module <module-name> [options]
@ -279,7 +280,7 @@ abp add-module ProductManagement --new --add-to-solution-file
Lists names of open-source application modules.
Usage
Usage:
````bash
abp list-modules [options]
@ -295,11 +296,21 @@ abp list-modules
* `--include-pro-modules`: Includes commercial (pro) modules in the output.
### list-templates
Lists all available templates to create a solution.
Usage:
```bash
abp list-templates
```
### get-source
Downloads the source code of a module to your computer.
Usage
Usage:
````bash
abp get-source <module-name> [options]

4
docs/en/docs-nav.json

@ -43,6 +43,10 @@
"text": "WPF Application",
"path": "Startup-Templates/WPF.md"
},
{
"text": "MAUI",
"path": "Startup-Templates/MAUI.md"
},
{
"text": "Empty Web Project",
"path": "Getting-Started-AspNetCore-Application.md"

1
docs/zh-Hans/CLI.md

@ -123,6 +123,7 @@ abp new Acme.BookStore
* `module`: [Module template](Startup-Templates/Module.md). 其他选项:
* `--no-ui`: 不包含UI.仅创建服务模块(也称为微服务 - 没有UI).
* **`console`**: [Console template](Startup-Templates/Console.md).
* **`maui`**: [Maui template](Startup-Templates/MAUI.md).
* **`app-nolayers`**: 应用程序单层模板
* `--ui` 或者 `-u`: 指定ui框架.默认`mvc`框架.其他选项:
* `mvc`: ASP.NET Core MVC.

4
docs/zh-Hans/docs-nav.json

@ -61,6 +61,10 @@
{
"text": "WPF",
"path": "Startup-Templates/WPF.md"
},
{
"text": "MAUI",
"path": "Startup-Templates/MAUI.md"
}
]
},

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderOptions.cs

@ -27,4 +27,10 @@ public class AbpIdentityServerBuilderOptions
/// Set false to suppress AddDeveloperSigningCredential() call on the IIdentityServerBuilder.
/// </summary>
public bool AddDeveloperSigningCredential { get; set; } = true;
/// <summary>
/// Adds the default cookie handlers and corresponding configuration
/// Default: true, Set false to suppress AddCookieAuthentication() call on the IIdentityServerBuilder.
/// </summary>
public bool AddIdentityServerCookieAuthentication { get; set; } = true;
}

40
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs

@ -1,4 +1,5 @@
using System.Threading.Tasks;
using IdentityServer4.Configuration;
using IdentityServer4.Services;
using IdentityServer4.Stores;
using Microsoft.Extensions.DependencyInjection;
@ -71,13 +72,7 @@ public class AbpIdentityServerDomainModule : AbpModule
var configuration = services.GetConfiguration();
var builderOptions = services.ExecutePreConfiguredActions<AbpIdentityServerBuilderOptions>();
var identityServerBuilder = services.AddIdentityServer(options =>
{
options.Events.RaiseErrorEvents = true;
options.Events.RaiseInformationEvents = true;
options.Events.RaiseFailureEvents = true;
options.Events.RaiseSuccessEvents = true;
});
var identityServerBuilder = AddIdentityServer(services, builderOptions);
if (builderOptions.AddDeveloperSigningCredential)
{
@ -110,6 +105,37 @@ public class AbpIdentityServerDomainModule : AbpModule
}
}
private static IIdentityServerBuilder AddIdentityServer(IServiceCollection services, AbpIdentityServerBuilderOptions abpIdentityServerBuilderOptions)
{
services.Configure<IdentityServerOptions>(options =>
{
options.Events.RaiseErrorEvents = true;
options.Events.RaiseInformationEvents = true;
options.Events.RaiseFailureEvents = true;
options.Events.RaiseSuccessEvents = true;
});
var identityServerBuilder = services.AddIdentityServerBuilder()
.AddRequiredPlatformServices()
.AddCoreServices()
.AddDefaultEndpoints()
.AddPluggableServices()
.AddValidators()
.AddResponseGenerators()
.AddDefaultSecretParsers()
.AddDefaultSecretValidators();
if (abpIdentityServerBuilderOptions.AddIdentityServerCookieAuthentication)
{
identityServerBuilder.AddCookieAuthentication();
}
// provide default in-memory implementation, not suitable for most production scenarios
identityServerBuilder.AddInMemoryPersistedGrants();
return identityServerBuilder;
}
public override void PostConfigureServices(ServiceConfigurationContext context)
{
OneTimeRunner.Run(() =>

Loading…
Cancel
Save