@@ -26,7 +26,9 @@ public final class OsfInstitutionUtils {
2626
2727 public static boolean validateInstitutionForLogin (final JpaOsfDao jpaOsfDao , final String id ) {
2828 final OsfInstitution institution = jpaOsfDao .findOneInstitutionById (id );
29- return institution != null && institution .getDelegationProtocol () != null && institution .getSsoAvailability () != SsoAvailability .UNAVAILABLE ;
29+ return institution != null
30+ && institution .getDelegationProtocol () != null
31+ && institution .getSsoAvailability () != SsoAvailability .UNAVAILABLE ;
3032 }
3133
3234 public static String getInstitutionSupportEmail (final JpaOsfDao jpaOsfDao , final String id ) {
@@ -46,6 +48,7 @@ public static Map<String, String> getInstitutionLoginUrlMap(
4648 } else {
4749 final OsfInstitution institution = jpaOsfDao .findOneInstitutionById (institutionId );
4850 if (institution != null ) {
51+ // Must be a valid institution to trigger the shortcut SSO mode
4952 institutionList .add (institution );
5053 isShortcutSso = true ;
5154 } else {
@@ -65,13 +68,14 @@ public static Map<String, String> getInstitutionLoginUrlMap(
6568 continue ;
6669 }
6770 if (isShortcutSso && ssoAvailability .isHidden ()) {
71+ // Show institutions of hidden SSO Availability in shortcut mode
6872 LOGGER .debug (
6973 "Show hidden SSO availability with shortcut URL: [institutionId={}, ssoAvailability={}]" ,
7074 institution .getInstitutionId (),
7175 ssoAvailability .getId ()
7276 );
7377 } else if (!ssoAvailability .isPublic ()) {
74- // Hide institutions of which SSO Availability is not Public
78+ // Hide institutions of non-public SSO Availability
7579 LOGGER .debug (
7680 "Skip non-public SSO availability: [institutionId={}, ssoAvailability={}]" ,
7781 institution .getInstitutionId (),
0 commit comments