Merge pull request #180 from Azure/feature/Julian/AssignSsoUserId

Assign SSO User Id
This commit is contained in:
Landon Pierce 2022-06-21 09:47:31 -04:00 коммит произвёл GitHub
Родитель 1978365ab8 15fb0ef226
Коммит c8a180f0a4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -1,4 +1,5 @@
using Saas.SignupAdministration.Web.Services.StateMachine;
using Dawn;
using Saas.SignupAdministration.Web.Services.StateMachine;
namespace Saas.SignupAdministration.Web.Services
@ -31,7 +32,7 @@ namespace Saas.SignupAdministration.Web.Services
OnboardingWorkflowItem? item = _persistenceProvider.Retrieve<OnboardingWorkflowItem>(SR.OnboardingWorkflowItemKey);
OnboardingWorkflowState? state = _persistenceProvider.Retrieve<OnboardingWorkflowState>(SR.OnboardingWorkflowStateKey);
OnboardingWorkflowItem = (item is null) ? new() : item;
OnboardingWorkflowItem = (item is null) ? new(Guard.Argument(applicationUser?.NameIdentifier).NotNull().NotDefault().ToString()) : item;
OnboardingWorkflowState = (state is null) ? new() : state;
}

Просмотреть файл

@ -50,12 +50,18 @@ namespace Saas.SignupAdministration.Web.Services
Initialize();
}
public OnboardingWorkflowItem(string userId)
{
Id = Guid.NewGuid();
OnboardingWorkflowName = SR.OnboardingWorkflowName;
UserId = userId;
Created = DateTime.Now;
}
private void Initialize()
{
Id = Guid.NewGuid();
OnboardingWorkflowName = SR.OnboardingWorkflowName;
// TODO: UserId needs to be replaced with value from SSO
UserId = Guid.NewGuid().ToString();
Created = DateTime.Now;
}