@ Override public Map < String , List < AppConfigurationEntry > > getEntries ( ) { Map < String , List < AppConfigurationEntry > > jaasConfigurationEntries = new HashMap < String , List < AppConfigurationEntry > > ( ) ; Map < String , String > jaasConfigIDs = new HashMap < String , String > ( ) ; if ( jaasLoginContextEntries != null ) { createJAASClientLoginContextEntry ( jaasConfigurationEntries ) ; Iterator < JAASLoginContextEntry > lcEntries = jaasLoginContextEntries . getServices ( ) ; while ( lcEntries . hasNext ( ) ) { JAASLoginContextEntry loginContextEntry = lcEntries . next ( ) ; String entryName = loginContextEntry . getEntryName ( ) ; List < JAASLoginModuleConfig > loginModules = loginContextEntry . getLoginModules ( ) ; if ( JaasLoginConfigConstants . SYSTEM_DEFAULT . equalsIgnoreCase ( entryName ) ) { ensureProxyIsNotSpecifyInSystemDefaultEntry ( entryName , loginModules ) ; } List < AppConfigurationEntry > appConfEntry = getLoginModules ( loginModules ) ; if ( appConfEntry != null && ! appConfEntry . isEmpty ( ) ) { if ( jaasConfigIDs . containsKey ( entryName ) ) { // if there is a duplicate name, log a warning message to indicate which id is being overwritten. String id = jaasConfigIDs . get ( entryName ) ; Tr . warning ( tc , "JAAS_LOGIN_CONTEXT_ENTRY_HAS_DUPLICATE_NAME" , new Object [ ] { entryName , id , loginContextEntry . getId ( ) } ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "configure jaasContextLoginEntry id: " + loginContextEntry . getId ( ) ) ; Tr . debug ( tc , "configure jaasContextLoginEntry: " + entryName + " has " + appConfEntry . size ( ) + " loginModule(s)" ) ; Tr . debug ( tc , "appConfEntry: " + appConfEntry ) ; } jaasConfigurationEntries . put ( entryName , appConfEntry ) ; jaasConfigIDs . put ( entryName , loginContextEntry . getId ( ) ) ; } } } return jaasConfigurationEntries ; }
Get all jaasLoginContextEntry in the server . xml and create any missing default entries . If there are no jaas configuration then create all the default entries system . DEFAULT system . WEB_INBOUND system . DESERIALIZE_CONTEXT system . UNAUTHENTICATED and WSLogin