private LoginContext getClientLoginContext ( ) throws LoginException { Configuration config = new Configuration ( ) { @ Override public AppConfigurationEntry [ ] getAppConfigurationEntry ( String name ) { Map < String , String > options = new HashMap < String , String > ( ) ; options . put ( "multi-threaded" , "true" ) ; options . put ( "restore-login-identity" , "true" ) ; AppConfigurationEntry clmEntry = new AppConfigurationEntry ( ClientLoginModule . class . getName ( ) , LoginModuleControlFlag . REQUIRED , options ) ; return new AppConfigurationEntry [ ] { clmEntry } ; } } ; return getLoginContext ( config ) ; }
Provides a RunAs client login context