diff --git a/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj b/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj index a0a0513..2ba767d 100644 --- a/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj +++ b/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj @@ -10,7 +10,7 @@ - + diff --git a/Auth/LearningHub.Nhs.Auth/Configuration/LearningHubResourceStore.cs b/Auth/LearningHub.Nhs.Auth/Configuration/LearningHubResourceStore.cs index 2e783f0..4e34ea4 100644 --- a/Auth/LearningHub.Nhs.Auth/Configuration/LearningHubResourceStore.cs +++ b/Auth/LearningHub.Nhs.Auth/Configuration/LearningHubResourceStore.cs @@ -26,12 +26,14 @@ public LearningHubResourceStore() { new ApiResource("learninghubapi", "Learning Hub API") { Scopes = new List { "learninghubapi", }, }, new ApiResource("userapi", "User API") { Scopes = new List { "userapi" } }, + new ApiResource("learningcredentialsapi", "Learning Credentials API") { Scopes = new List { "learningcredentialsapi" } }, }; this.apiScopes = new[] { new ApiScope("learninghubapi", "Access Learning Hub API"), new ApiScope("userapi", "Access User API"), + new ApiScope("learningcredentialsapi", "Learning Credentials API"), }; this.identityResources = new[] diff --git a/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj b/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj index f529539..ed914bc 100644 --- a/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj +++ b/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj @@ -106,7 +106,7 @@ - + diff --git a/Auth/LearningHub.Nhs.Auth/appsettings.json b/Auth/LearningHub.Nhs.Auth/appsettings.json index b37f7c6..1565fa4 100644 --- a/Auth/LearningHub.Nhs.Auth/appsettings.json +++ b/Auth/LearningHub.Nhs.Auth/appsettings.json @@ -137,6 +137,21 @@ "RequirePkce": false, "AllowOfflineAccess": false }, + "userprofileclient": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": true, + "AllowOfflineAccess": true + }, "learninghubopenapi": { "BaseUrl": "", "ClientName": "", diff --git a/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj b/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj index 6b5fd41..c45f941 100644 --- a/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj +++ b/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj b/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj index d3bade4..068b5b4 100644 --- a/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj +++ b/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj @@ -9,7 +9,7 @@ - + diff --git a/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj b/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj index 6b5fd41..c45f941 100644 --- a/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj +++ b/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj b/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj index 535e1f9..dfd418c 100644 --- a/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj +++ b/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs b/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs index e4e558d..1e42f93 100644 --- a/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs +++ b/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs @@ -317,6 +317,7 @@ public async Task CreateUserNameAsync(int medicalCouncilId, string medic if (medicalCouncilId == 0 || string.IsNullOrEmpty(medicalCouncilNumber)) { // Generate random username using Lastname + lastName = string.Concat(lastName.Where(c => !char.IsWhiteSpace(c))); string usernameStart = lastName.StripUnicodeCharactersFromString().Trim(); if (usernameStart.Length > 5) { diff --git a/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj b/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj index bb3e3d1..22efaa4 100644 --- a/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj +++ b/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj @@ -9,7 +9,7 @@ - + diff --git a/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj b/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj index 34e1986..58c589d 100644 --- a/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj +++ b/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj @@ -9,7 +9,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj b/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj index f5aff8c..9225e0c 100644 --- a/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj +++ b/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj @@ -11,7 +11,7 @@ - + diff --git a/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj b/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj index 1091974..66444e1 100644 --- a/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj +++ b/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj @@ -26,7 +26,7 @@ - +