Skip to content

Commit a96757e

Browse files
committed
Merge branch 'hotfix/22.0.5'
2 parents de2d779 + d675102 commit a96757e

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
44

5+
22.0.5 (07-29-2022)
6+
===================
7+
8+
Support shared SSO between FSU and MagLab
9+
510
22.0.4 (06-29-2022)
611
===================
712

src/main/java/io/cos/cas/osf/web/flow/login/OsfPrincipalFromNonInteractiveCredentialsAction.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ private OsfApiInstitutionAuthenticationResult notifyOsfApiOfInstnAuthnSuccess(
558558
final String givenName = user.optString("givenName").trim();
559559
final String familyName = user.optString("familyName").trim();
560560
final String isMemberOf = user.optString("isMemberOf").trim();
561+
final String userRoles = user.optString("userRoles").trim();
561562
if (username.isEmpty()) {
562563
LOGGER.error("[CAS XSLT] Missing email (username) for user at institution '{}'", institutionId);
563564
throw new InstitutionSsoFailedException("Missing email (username)");
@@ -568,13 +569,20 @@ private OsfApiInstitutionAuthenticationResult notifyOsfApiOfInstnAuthnSuccess(
568569
}
569570
if (!isMemberOf.isEmpty()) {
570571
LOGGER.info(
571-
"[CAS XSLT] Secondary institution detected: username={}, institution={}, member={}",
572+
"[CAS XSLT] Shared SSO \"isMemberOf\" detected: username={}, institution={}, isMemberOf={}",
572573
username,
573574
institutionId,
574575
isMemberOf
575576
);
577+
} else if (!userRoles.isEmpty()) {
578+
LOGGER.info(
579+
"[CAS XSLT] Shared SSO \"userRoles\" detected: username={}, institution={}, userRoles={}",
580+
username,
581+
institutionId,
582+
userRoles
583+
);
576584
} else {
577-
LOGGER.debug("[CAS XSLT] Secondary institution is not provided: username={}, institution={}", username, institutionId);
585+
LOGGER.debug("[CAS XSLT] Shared SSO not eligible: username={}, institution={}", username, institutionId);
578586
}
579587
// Parse the department attribute
580588
final String departmentRaw = user.optString("departmentRaw").trim();

0 commit comments

Comments
 (0)