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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
apis
STS
Commits
fe3e4e9c
Commit
fe3e4e9c
authored
3 years ago
by
Sandra Westerhoff
Browse files
Options
Downloads
Patches
Plain Diff
Update: extend parsing of pairwise id (coscine/issues#2115)
parent
492bcdb4
Branches
Issue/2115-extendParsingPairwiseId
Branches containing commit
Tags
Tags containing commit
2 merge requests
!126
Release: Sprint/2022 11 :robot:
,
!124
Issue/2115 extend parsing pairwise id
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/STS/Controllers/ShibbolethController.cs
+15
-5
15 additions, 5 deletions
src/STS/Controllers/ShibbolethController.cs
with
15 additions
and
5 deletions
src/STS/Controllers/ShibbolethController.cs
+
15
−
5
View file @
fe3e4e9c
...
...
@@ -48,12 +48,22 @@ namespace Coscine.Api.STS.Controllers
entity
=
info
.
Principal
.
FindFirstValue
(
ShibbolethAttributeMapping
.
PairwiseID
);
}
var
identifier
=
entity
[(
entity
.
IndexOf
(
">"
)
+
1
)..];
identifier
=
identifier
.
Substring
(
0
,
identifier
.
IndexOf
(
"<"
));
var
entityId
=
entity
[(
entity
.
IndexOf
(
"NameQualifier=\""
)
+
"NameQualifier=\""
.
Length
)..];
entityId
=
entityId
.
Substring
(
0
,
entityId
.
IndexOf
(
"\""
));
var
identifier
=
""
;
var
entityId
=
""
;
if
(
entity
.
IndexOf
(
">"
)
>
-
1
)
{
identifier
=
entity
[(
entity
.
IndexOf
(
">"
)
+
1
)..];
identifier
=
identifier
.
Substring
(
0
,
identifier
.
IndexOf
(
"<"
));
entityId
=
entity
[(
entity
.
IndexOf
(
"NameQualifier=\""
)
+
"NameQualifier=\""
.
Length
)..];
entityId
=
entityId
.
Substring
(
0
,
entityId
.
IndexOf
(
"\""
));
}
else
{
identifier
=
entity
;
entityId
=
info
.
AuthenticationProperties
.
Items
[
"idp"
];
}
var
mapping
=
externalIdModel
.
GetAllWhere
((
map
)
=>
map
.
ExternalId1
==
identifier
&&
map
.
ExternalAuthenticatorId
==
shibbolethAuthItem
.
Id
...
...
This diff is collapsed.
Click to expand it.
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