Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
STS
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
apis
STS
Commits
060d3b6b
Commit
060d3b6b
authored
5 years ago
by
L. Ellenbeck
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Add and change surname and givenname (coscine/issues#280)
parent
9487a8ef
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+4
-1
4 additions, 1 deletion
.gitignore
src/STS/Controllers/ORCiDController.cs
+8
-6
8 additions, 6 deletions
src/STS/Controllers/ORCiDController.cs
src/STS/STS.csproj
+2
-1
2 additions, 1 deletion
src/STS/STS.csproj
with
14 additions
and
8 deletions
.gitignore
+
4
−
1
View file @
060d3b6b
...
@@ -268,3 +268,6 @@ __pycache__/
...
@@ -268,3 +268,6 @@ __pycache__/
tools/*
tools/*
!tools/packages.config
!tools/packages.config
dist/
dist/
# linq2db clutter
src/.tools/*
This diff is collapsed.
Click to expand it.
src/STS/Controllers/ORCiDController.cs
+
8
−
6
View file @
060d3b6b
...
@@ -33,8 +33,8 @@ namespace Coscine.STS.Controllers
...
@@ -33,8 +33,8 @@ namespace Coscine.STS.Controllers
if
(
ModelState
.
IsValid
)
if
(
ModelState
.
IsValid
)
{
{
var
claimsPrincipal
=
ORCiDHandler
.
VerifiyORCiDJWT
(
model
.
ORCiD_JWT
);
var
claimsPrincipal
=
ORCiDHandler
.
VerifiyORCiDJWT
(
model
.
ORCiD_JWT
);
string
sur
N
ame
=
""
;
string
sur
n
ame
=
""
;
string
given
N
ame
=
""
;
string
given
n
ame
=
""
;
string
ORCiD
=
""
;
string
ORCiD
=
""
;
foreach
(
var
claim
in
claimsPrincipal
.
Claims
)
foreach
(
var
claim
in
claimsPrincipal
.
Claims
)
{
{
...
@@ -44,11 +44,11 @@ namespace Coscine.STS.Controllers
...
@@ -44,11 +44,11 @@ namespace Coscine.STS.Controllers
}
}
else
if
(
claim
.
Type
==
ClaimTypes
.
Surname
)
else
if
(
claim
.
Type
==
ClaimTypes
.
Surname
)
{
{
sur
N
ame
=
claim
.
Value
;
sur
n
ame
=
claim
.
Value
;
}
}
else
if
(
claim
.
Type
==
ClaimTypes
.
GivenName
)
else
if
(
claim
.
Type
==
ClaimTypes
.
GivenName
)
{
{
given
N
ame
=
claim
.
Value
;
given
n
ame
=
claim
.
Value
;
}
}
}
}
...
@@ -67,8 +67,10 @@ namespace Coscine.STS.Controllers
...
@@ -67,8 +67,10 @@ namespace Coscine.STS.Controllers
UserPlainModel
userPlainModel
=
new
UserPlainModel
(
Program
.
Configuration
);
UserPlainModel
userPlainModel
=
new
UserPlainModel
(
Program
.
Configuration
);
var
user
=
new
User
var
user
=
new
User
{
{
DisplayName
=
surName
+
" "
+
givenName
,
DisplayName
=
givenname
+
" "
+
surname
,
EmailAddress
=
ORCiD
+
"@orcid.org"
EmailAddress
=
ORCiD
+
"@orcid.org"
,
Surname
=
surname
,
Givenname
=
givenname
};
};
userPlainModel
.
Insert
(
user
);
userPlainModel
.
Insert
(
user
);
externalIdModel
.
Insert
(
new
ExternalId
externalIdModel
.
Insert
(
new
ExternalId
...
...
This diff is collapsed.
Click to expand it.
src/STS/STS.csproj
+
2
−
1
View file @
060d3b6b
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<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" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Abstractions" Version="2.2.0" />
...
...
This diff is collapsed.
Click to expand it.
Ghost User
@ghost
mentioned in commit
e91d0fd3
·
5 years ago
mentioned in commit
e91d0fd3
mentioned in commit e91d0fd3da2d8bdb324b9b0cf3d870751ed40d0a
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment