mirror of https://github.com/abpframework/abp.git
8 changed files with 88 additions and 115 deletions
@ -0,0 +1,28 @@ |
|||
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
|
|||
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
|
|||
|
|||
using System.Linq; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace MicroserviceDemo.TenancyService.Controllers |
|||
{ |
|||
[Route("[controller]")]
|
|||
[Authorize] |
|||
public class IdentityController : AbpController |
|||
{ |
|||
[HttpGet] |
|||
public IActionResult Get() |
|||
{ |
|||
return new JsonResult(new |
|||
{ |
|||
currentUserId = CurrentUser.Id, |
|||
currentUserEmail = CurrentUser.Email, |
|||
currentUserRoles = CurrentUser.Roles, |
|||
currentUserUserName = CurrentUser.UserName, |
|||
claims = from c in User.Claims select new { c.Type, c.Value } |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,111 +0,0 @@ |
|||
2018-02-28 10:18:23.368 +03:00 [Information] Loaded modules: |
|||
2018-02-28 10:18:23.444 +03:00 [Information] - Volo.Abp.Castle.AbpCastleCoreModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Autofac.AbpAutofacModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Data.AbpDataModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Settings.AbpSettingsModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyAbstractionsModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainSharedModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Guids.AbpGuidsModule |
|||
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.ObjectMapping.AbpObjectMappingModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Threading.AbpThreadingModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.EventBus.AbpEventBusModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Validation.AbpValidationModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Security.AbpSecurityModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Authorization.AbpAuthorizationModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Http.AbpHttpAbstractionsModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.AbpDddModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.AutoMapper.AbpAutoMapperModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Ui.AbpUiModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Localization.AbpLocalizationModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Session.AbpSessionModule |
|||
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Timing.AbpTimingModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Json.AbpJsonModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Serialization.AbpSerializationModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Caching.AbpCachingModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.AbpCommonModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.EntityFrameworkCore.AbpMultiTenancyEntityFrameworkCoreModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationContractsModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Http.AbpHttpModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.AspNetCore.AbpAspNetCoreModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyHttpApiModule |
|||
2018-02-28 10:18:23.447 +03:00 [Information] - MicroserviceDemo.TenancyService.MicroservicesDemoTenancyServiceModule |
|||
2018-02-28 10:18:24.855 +03:00 [Information] Initialized all modules. |
|||
2018-02-28 10:18:25.686 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/ |
|||
2018-02-28 10:18:26.185 +03:00 [Information] Executing action method "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" with arguments (null) - ModelState is Valid |
|||
2018-02-28 10:18:26.211 +03:00 [Information] Executing RedirectResult, redirecting to "/swagger". |
|||
2018-02-28 10:18:26.222 +03:00 [Information] Executed action "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" in 132.0196ms |
|||
2018-02-28 10:18:26.236 +03:00 [Information] Request finished in 606.1366ms 302 |
|||
2018-02-28 10:18:26.286 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/ |
|||
2018-02-28 10:18:26.322 +03:00 [Information] Request finished in 36.5045ms 200 text/html |
|||
2018-02-28 10:18:27.379 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/v1/swagger.json |
|||
2018-02-28 10:18:27.916 +03:00 [Information] Request finished in 537.0078ms 200 application/json |
|||
2018-02-28 10:26:40.794 +03:00 [Information] Loaded modules: |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Castle.AbpCastleCoreModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Autofac.AbpAutofacModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Data.AbpDataModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Settings.AbpSettingsModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyAbstractionsModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainSharedModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Guids.AbpGuidsModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.ObjectMapping.AbpObjectMappingModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Threading.AbpThreadingModule |
|||
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.EventBus.AbpEventBusModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Validation.AbpValidationModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Security.AbpSecurityModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Authorization.AbpAuthorizationModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Http.AbpHttpAbstractionsModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.AbpDddModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.AutoMapper.AbpAutoMapperModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Ui.AbpUiModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Localization.AbpLocalizationModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Session.AbpSessionModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Timing.AbpTimingModule |
|||
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Json.AbpJsonModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.Serialization.AbpSerializationModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.Caching.AbpCachingModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.AbpCommonModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.EntityFrameworkCore.AbpMultiTenancyEntityFrameworkCoreModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationContractsModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.Http.AbpHttpModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.AspNetCore.AbpAspNetCoreModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyHttpApiModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationModule |
|||
2018-02-28 10:26:40.841 +03:00 [Information] - MicroserviceDemo.TenancyService.MicroservicesDemoTenancyServiceModule |
|||
2018-02-28 10:26:41.517 +03:00 [Information] Initialized all modules. |
|||
2018-02-28 10:26:41.796 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/ |
|||
2018-02-28 10:26:41.981 +03:00 [Information] Executing action method "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" with arguments (null) - ModelState is Valid |
|||
2018-02-28 10:26:41.991 +03:00 [Information] Executing RedirectResult, redirecting to "/swagger". |
|||
2018-02-28 10:26:41.997 +03:00 [Information] Executed action "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" in 48.397ms |
|||
2018-02-28 10:26:42.004 +03:00 [Information] Request finished in 223.508ms 302 |
|||
2018-02-28 10:26:42.028 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/ |
|||
2018-02-28 10:26:42.050 +03:00 [Information] Request finished in 22.5978ms 200 text/html |
|||
2018-02-28 10:26:42.363 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/v1/swagger.json |
|||
2018-02-28 10:26:42.655 +03:00 [Information] Request finished in 291.932ms 200 application/json |
|||
2018-02-28 10:26:52.866 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/api/multi-tenancy/tenant?SkipCount=0&MaxResultCount=11 |
|||
2018-02-28 10:26:53.026 +03:00 [Information] Executing action method "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" with arguments (["Volo.Abp.MultiTenancy.GetTenantsInput"]) - ModelState is Valid |
|||
2018-02-28 10:26:53.093 +03:00 [Information] Authorization was successful for user: null. |
|||
2018-02-28 10:26:54.213 +03:00 [Information] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext". |
|||
2018-02-28 10:26:54.221 +03:00 [Information] Executed action "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" in 1324.7568ms |
|||
2018-02-28 10:26:54.222 +03:00 [Information] Request finished in 1355.0906ms 200 application/json; charset=utf-8 |
|||
2018-02-28 10:27:23.527 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/api/abp/api-definition |
|||
2018-02-28 10:27:23.537 +03:00 [Information] Executing action method "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController.Get (Volo.Abp.AspNetCore.Mvc)" with arguments (null) - ModelState is Valid |
|||
2018-02-28 10:27:23.561 +03:00 [Information] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext". |
|||
2018-02-28 10:27:23.580 +03:00 [Information] Executed action "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController.Get (Volo.Abp.AspNetCore.Mvc)" in 51.1608ms |
|||
2018-02-28 10:27:23.581 +03:00 [Information] Request finished in 54.061ms 200 application/json; charset=utf-8 |
|||
2018-02-28 10:27:23.661 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/api/multi-tenancy/tenant?SkipCount=0&MaxResultCount=10&api-version=1.0 |
|||
2018-02-28 10:27:23.665 +03:00 [Information] Executing action method "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" with arguments (["Volo.Abp.MultiTenancy.GetTenantsInput"]) - ModelState is Valid |
|||
2018-02-28 10:27:23.666 +03:00 [Information] Authorization was successful for user: null. |
|||
2018-02-28 10:27:23.688 +03:00 [Information] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext". |
|||
2018-02-28 10:27:23.690 +03:00 [Information] Executed action "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" in 27.1663ms |
|||
2018-02-28 10:27:23.690 +03:00 [Information] Request finished in 29.127ms 200 application/json; charset=utf-8 |
|||
@ -1,5 +1,6 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Server=localhost;Database=MicroservicesDemo.Tenancy;Trusted_Connection=True;MultipleActiveResultSets=true" |
|||
"Default": "Server=localhost;Database=MicroservicesDemo.Tenancy;Trusted_Connection=True;MultipleActiveResultSets=true", |
|||
"AbpPermissions": "Server=localhost;Database=MicroservicesDemo.Permissions;Trusted_Connection=True;MultipleActiveResultSets=true" |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<h2>API response</h2> |
|||
|
|||
<pre>@ViewBag.Json</pre> |
|||
Loading…
Reference in new issue