diff --git a/.gitignore b/.gitignore index d2df1da5b5077d597142e85e19812ba900a4e81c..b0823ad1311a0288d54e4808d4a72007a983baa4 100644 --- a/.gitignore +++ b/.gitignore @@ -264,7 +264,10 @@ paket-files/ __pycache__/ *.pyc -#cake +# cake tools/* !tools/packages.config dist/ + +# linq2db clutter +src/.tools/* diff --git a/src/STS/Controllers/ORCiDController.cs b/src/STS/Controllers/ORCiDController.cs index 5d005e8d3a5247b33e0bc0f88eac6c26a5925ef8..bc24587f713377cb3cc7f5bc657ce123d2d4e560 100644 --- a/src/STS/Controllers/ORCiDController.cs +++ b/src/STS/Controllers/ORCiDController.cs @@ -33,8 +33,8 @@ namespace Coscine.STS.Controllers if (ModelState.IsValid) { var claimsPrincipal = ORCiDHandler.VerifiyORCiDJWT(model.ORCiD_JWT); - string surName = ""; - string givenName = ""; + string surname = ""; + string givenname = ""; string ORCiD = ""; foreach (var claim in claimsPrincipal.Claims) { @@ -44,11 +44,11 @@ namespace Coscine.STS.Controllers } else if(claim.Type == ClaimTypes.Surname) { - surName = claim.Value; + surname = claim.Value; } else if(claim.Type == ClaimTypes.GivenName) { - givenName = claim.Value; + givenname = claim.Value; } } @@ -67,8 +67,10 @@ namespace Coscine.STS.Controllers UserPlainModel userPlainModel = new UserPlainModel(Program.Configuration); var user = new User { - DisplayName = surName + " " + givenName, - EmailAddress = ORCiD + "@orcid.org" + DisplayName = givenname + " " + surname, + EmailAddress = ORCiD + "@orcid.org", + Surname = surname, + Givenname = givenname }; userPlainModel.Insert(user); externalIdModel.Insert(new ExternalId diff --git a/src/STS/STS.csproj b/src/STS/STS.csproj index d3a277d7d65396ee24ba68133e0d8ea1b3ea3b5f..e5478a9a3d328587e14910c1fb9e1f80256b0a69 100644 --- a/src/STS/STS.csproj +++ b/src/STS/STS.csproj @@ -9,7 +9,8 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Coscine.ApiCommons" Version="1.2.0" /> + <PackageReference Include="Coscine.ApiCommons" Version="1.2.1" /> + <PackageReference Include="Coscine.Database" Version="1.5.1" /> <PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />