mirror of https://github.com/abpframework/abp.git
32 changed files with 292 additions and 68 deletions
@ -0,0 +1,16 @@ |
|||
. ".\common.ps1" |
|||
|
|||
# Build all solutions |
|||
|
|||
foreach ($solutionPath in $solutionPaths) { |
|||
$solutionAbsPath = (Join-Path $rootFolder $solutionPath) |
|||
Set-Location $solutionAbsPath |
|||
dotnet build --configuration Release |
|||
if (-Not $?) { |
|||
Write-Host ("Build failed for the solution: " + $solutionPath) |
|||
Set-Location $rootFolder |
|||
exit $LASTEXITCODE |
|||
} |
|||
} |
|||
|
|||
Set-Location $rootFolder |
|||
@ -0,0 +1,16 @@ |
|||
. ".\common.ps1" |
|||
|
|||
# Build all solutions |
|||
|
|||
foreach ($solutionPath in $solutionPaths) { |
|||
$solutionAbsPath = (Join-Path $rootFolder $solutionPath) |
|||
Set-Location $solutionAbsPath |
|||
dotnet build |
|||
if (-Not $?) { |
|||
Write-Host ("Build failed for the solution: " + $solutionPath) |
|||
Set-Location $rootFolder |
|||
exit $LASTEXITCODE |
|||
} |
|||
} |
|||
|
|||
Set-Location $rootFolder |
|||
@ -0,0 +1,34 @@ |
|||
# COMMON PATHS |
|||
|
|||
$rootFolder = (Get-Item -Path "./" -Verbose).FullName |
|||
|
|||
# List of solutions |
|||
|
|||
$solutionPaths = ( |
|||
"../framework", |
|||
"../modules/users", |
|||
"../modules/permission-management", |
|||
"../modules/setting-management", |
|||
"../modules/feature-management", |
|||
"../modules/identity", |
|||
"../modules/identityserver", |
|||
"../modules/tenant-management", |
|||
"../modules/account", |
|||
"../modules/docs", |
|||
"../modules/blogging", |
|||
"../modules/audit-logging", |
|||
"../modules/background-jobs", |
|||
"../modules/client-simulation", |
|||
"../templates/module/aspnet-core", |
|||
"../templates/app/aspnet-core", |
|||
"../samples/BasicAspNetCoreApplication", |
|||
"../samples/BasicConsoleApplication", |
|||
"../samples/BookStore", |
|||
"../samples/BookStore-Angular-MongoDb/aspnet-core", |
|||
"../samples/BookStore-Modular/modules/book-management", |
|||
"../samples/BookStore-Modular/application", |
|||
"../samples/DashboardDemo", |
|||
"../samples/MicroserviceDemo", |
|||
"../samples/RabbitMqEventBus", |
|||
"../abp_io/AbpIoLocalization" |
|||
) |
|||
@ -0,0 +1,16 @@ |
|||
. ".\common.ps1" |
|||
|
|||
# Test all solutions |
|||
|
|||
foreach ($solutionPath in $solutionPaths) { |
|||
$solutionAbsPath = (Join-Path $rootFolder $solutionPath) |
|||
Set-Location $solutionAbsPath |
|||
dotnet test --no-build --no-restore |
|||
if (-Not $?) { |
|||
Write-Host ("Test failed for the solution: " + $solutionPath) |
|||
Set-Location $rootFolder |
|||
exit $LASTEXITCODE |
|||
} |
|||
} |
|||
|
|||
Set-Location $rootFolder |
|||
@ -1,3 +1,43 @@ |
|||
# Hangfire Background Job Manager |
|||
|
|||
TODO |
|||
[Hangfire](https://www.hangfire.io/) is an advanced background job manager. You can integrate Hangfire with the ABP Framework to use it instead of the [default background job manager](Background-Jobs.md). In this way, you can use the same background job API for Hangfire and your code will be independent of Hangfire. If you like, you can directly use Hangfire's API, too. |
|||
|
|||
> See the [background jobs document](Background-Jobs.md) to learn how to use the background job system. This document only shows how to install and configure the Hangfire integration. |
|||
|
|||
## Installation |
|||
|
|||
It is suggested to use the [ABP CLI](CLI.md) to install this package. |
|||
|
|||
### Using the ABP CLI |
|||
|
|||
Open a command line window in the folder of the project (.csproj file) and type the following command: |
|||
|
|||
````bash |
|||
abp add-package Volo.Abp.BackgroundJobs.HangFire |
|||
```` |
|||
|
|||
### Manual Installation |
|||
|
|||
If you want to manually install; |
|||
|
|||
1. Add the [Volo.Abp.BackgroundJobs.HangFire](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.HangFire) NuGet package to your project: |
|||
|
|||
```` |
|||
Install-Package Volo.Abp.BackgroundJobs.HangFire |
|||
```` |
|||
|
|||
2. Add the `AbpBackgroundJobsHangfireModule` to the dependency list of your module: |
|||
|
|||
````csharp |
|||
[DependsOn( |
|||
//...other dependencies |
|||
typeof(AbpBackgroundJobsHangfireModule) //Add the new module dependency |
|||
)] |
|||
public class YourModule : AbpModule |
|||
{ |
|||
} |
|||
```` |
|||
|
|||
## Configuration |
|||
|
|||
TODO... |
|||
@ -0,0 +1,44 @@ |
|||
using IdentityServer4.Services; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.Account.Web.Pages.Account |
|||
{ |
|||
[ExposeServices(typeof(LogoutModel))] |
|||
public class IdentityServerSupportedLogoutModel : LogoutModel |
|||
{ |
|||
protected IIdentityServerInteractionService Interaction { get; } |
|||
|
|||
public IdentityServerSupportedLogoutModel(IIdentityServerInteractionService interaction) |
|||
{ |
|||
Interaction = interaction; |
|||
} |
|||
|
|||
public override async Task<IActionResult> OnGetAsync() |
|||
{ |
|||
await SignInManager.SignOutAsync(); |
|||
|
|||
var logoutId = Request.Query["logoutId"].ToString(); |
|||
|
|||
if (!string.IsNullOrEmpty(logoutId)) |
|||
{ |
|||
var logoutContext = await Interaction.GetLogoutContextAsync(logoutId); |
|||
|
|||
var postLogoutUri = logoutContext.PostLogoutRedirectUri; |
|||
|
|||
if (!string.IsNullOrEmpty(postLogoutUri)) |
|||
{ |
|||
return Redirect(postLogoutUri); |
|||
} |
|||
} |
|||
|
|||
if (ReturnUrl != null) |
|||
{ |
|||
return LocalRedirect(ReturnUrl); |
|||
} |
|||
|
|||
return RedirectToPage("/Account/Login"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Identity; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
using IdentityUser = Volo.Abp.Identity.IdentityUser; |
|||
|
|||
namespace Volo.Abp.Account.Web.Areas.Account.Controllers |
|||
{ |
|||
[Area("Account")] |
|||
public class LogoutController : AbpController |
|||
{ |
|||
private readonly SignInManager<IdentityUser> _signInManager; |
|||
|
|||
public LogoutController(SignInManager<IdentityUser> signInManager) |
|||
{ |
|||
_signInManager = signInManager; |
|||
} |
|||
|
|||
//todo@alper: this method can be moved to AccountController like "account/logout"
|
|||
public async Task<IActionResult> Index(string returnUrl = null) |
|||
{ |
|||
await _signInManager.SignOutAsync(); |
|||
|
|||
if (returnUrl != null) |
|||
{ |
|||
return LocalRedirect(returnUrl); |
|||
} |
|||
|
|||
return RedirectToPage("/Account/Login"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
@page "/Account/Logout" |
|||
@inherits Volo.Abp.Account.Web.Pages.Account.AccountPage |
|||
@model Volo.Abp.Account.Web.Pages.Account.LogoutModel |
|||
@ -0,0 +1,27 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Abp.Account.Web.Pages.Account |
|||
{ |
|||
public class LogoutModel : AccountPageModel |
|||
{ |
|||
[HiddenInput] |
|||
[BindProperty(SupportsGet = true)] |
|||
public string ReturnUrl { get; set; } |
|||
|
|||
[HiddenInput] |
|||
[BindProperty(SupportsGet = true)] |
|||
public string ReturnUrlHash { get; set; } |
|||
|
|||
public virtual async Task<IActionResult> OnGetAsync() |
|||
{ |
|||
await SignInManager.SignOutAsync(); |
|||
if (ReturnUrl != null) |
|||
{ |
|||
return RedirectSafely(ReturnUrl, ReturnUrlHash); |
|||
} |
|||
|
|||
return RedirectToPage("/Account/Login"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue