3434 CAS_SERVER_URL ,
3535 OSF_MFA_URL ,
3636 OSF_IAL2_STR ,
37+ OSF_AAL1_STR ,
3738 OSF_AAL2_STR ,
39+ OSF_IAL2_VAR ,
40+ OSF_AAL1_VAR ,
41+ OSF_AAL2_VAR ,
3842)
3943from website .util .quota import update_default_storage
4044
@@ -179,10 +183,19 @@ def get_next(obj, *args):
179183 organization_name_ja = get_next (p_user , 'jao' , 'jaOrganizationName' )
180184 # affiliation: 'jaou' is friendlyName
181185 organizational_unit_ja = get_next (p_user , 'jaou' , 'jaOrganizationalUnitName' )
182- # @R2022-48 ial
183- ial = p_user .get ('eduPersonAssurance' )
184- # @R2022-48 aal
185- aal = p_user .get ('Shib-AuthnContext-Class' )
186+ # @R2022-48 ial,aal
187+ ial = None
188+ aal = None
189+ # @R-2024-AUTH01 eduPersonAssurance(multi value)
190+ eduPersonAssurance = p_user .get ('eduPersonAssurance' )
191+ if re .search (OSF_IAL2_STR , str (eduPersonAssurance )):
192+ ial = OSF_IAL2_VAR
193+ if re .search (OSF_AAL2_STR , str (eduPersonAssurance )):
194+ aal = OSF_AAL2_VAR
195+ elif re .search (OSF_AAL1_STR , str (eduPersonAssurance )):
196+ aal = OSF_AAL1_VAR
197+ else :
198+ aal = p_user .get ('Shib-AuthnContext-Class' )
186199
187200 # @R2022-48 loa + R-2023-55
188201 message = ''
@@ -207,7 +220,6 @@ def get_next(obj, *args):
207220 if not re .search (OSF_AAL2_STR , str (aal )):
208221 self .context ['mfa_url' ] = mfa_url
209222 elif loa .aal == 1 :
210- # if not re.search('https://www.gakunin.jp/profile/AAL1', aal):
211223 if not aal :
212224 message = (
213225 'Institution login failed: Does not meet the required AAL.<br />Please contact the IdP as the'
@@ -222,7 +234,6 @@ def get_next(obj, *args):
222234 )
223235 loa_flag = False
224236 elif loa .ial == 1 :
225- # if not re.search('https://www.gakunin.jp/profile/IAL1', ial):
226237 if not ial :
227238 message = (
228239 'Institution login failed: Does not meet the required IAL.<br />Please check the IAL of your'
0 commit comments