Browse Source

moved keycloak user jobs

pull/180/head
Galip Tolga Erdem 3 years ago
parent
commit
63ef4ea5c0
  1. 7
      services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/Users/KeycloakUserCreationJob.cs
  2. 7
      services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/Users/KeycloakUserDeletionJob.cs
  3. 5
      services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/Users/KeycloakUserUpdatingJob.cs

7
services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/User/KeycloakUserCreationJob.cs → services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/Users/KeycloakUserCreationJob.cs

@ -3,13 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EShopOnAbp.IdentityService.Keycloak;
using Keycloak.Net.Models.Users;
using Microsoft.Extensions.Logging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.DependencyInjection;
using Keycloak.Net.Models.Users;
using Volo.Abp.Identity;
namespace EShopOnAbp.IdentityService.BackgroundJobs.User;
namespace EShopOnAbp.IdentityService.BackgroundJobs.Users;
public class KeycloakUserCreationJob : AsyncBackgroundJob<IdentityUserCreationArgs>, ITransientDependency
{
@ -25,7 +25,7 @@ public class KeycloakUserCreationJob : AsyncBackgroundJob<IdentityUserCreationAr
public override async Task ExecuteAsync(IdentityUserCreationArgs args)
{
var keycloakUser = new global::Keycloak.Net.Models.Users.User()
var keycloakUser = new User
{
Email = args.Email,
UserName = args.UserName,
@ -82,6 +82,7 @@ public class IdentityUserCreationArgs
public IdentityUserCreationArgs()
{
}
public IdentityUserCreationArgs(IdentityUserCreateDto input)

7
services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/User/KeycloakUserDeletionJob.cs → services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/Users/KeycloakUserDeletionJob.cs

@ -7,7 +7,7 @@ using Volo.Abp;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.DependencyInjection;
namespace EShopOnAbp.IdentityService.BackgroundJobs.User;
namespace EShopOnAbp.IdentityService.BackgroundJobs.Users;
public class KeycloakUserDeletionJob : AsyncBackgroundJob<IdentityUserDeletionArgs>, ITransientDependency
{
@ -50,7 +50,10 @@ public class IdentityUserDeletionArgs
{
public string UserName { get; init; }
public IdentityUserDeletionArgs() { }
public IdentityUserDeletionArgs()
{
}
public IdentityUserDeletionArgs(string userName)
{

5
services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/User/KeycloakUserUpdatingJob.cs → services/identity/src/EShopOnAbp.IdentityService.Application/BackgroundJobs/Users/KeycloakUserUpdatingJob.cs

@ -2,15 +2,12 @@
using System.Linq;
using System.Threading.Tasks;
using EShopOnAbp.IdentityService.Keycloak;
using Keycloak.Net;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
namespace EShopOnAbp.IdentityService.BackgroundJobs.User;
namespace EShopOnAbp.IdentityService.BackgroundJobs.Users;
public class KeycloakUserUpdatingJob : AsyncBackgroundJob<IdentityUserUpdatingArgs>, ITransientDependency
{
Loading…
Cancel
Save