@@ -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