import { FtrConfigProviderContext } from '@kbn/test' ; export default async function ( { readConfigFile } ) { const oidcAPITestsConfig = await readConfigFile ( require . resolve ( './oidc.config.ts' ) ) ; return { ... oidcAPITestsConfig . getAll ( ) , testFiles : [ require . resolve ( './tests/oidc/implicit_flow' ) ] , junit : { reportName : 'X-Pack Security API Integration Tests (OIDC - Implicit Flow)' , } , esTestCluster : { ... oidcAPITestsConfig . get ( 'esTestCluster' ) , serverArgs : oidcAPITestsConfig . get ( 'esTestCluster.serverArgs' ) . reduce ( ( serverArgs , arg ) => { if ( arg . startsWith ( 'xpack.security.authc.realms.oidc.oidc1.rp.response_type' ) ) { serverArgs . push ( 'xpack.security.authc.realms.oidc.oidc1.rp.response_type=id_token token' ) ; } else if ( ! arg . startsWith ( 'xpack.security.authc.realms.oidc.oidc1.op.token_endpoint' ) ) { serverArgs . push ( arg ) ; } return serverArgs ; } , [ ] ) , } , } ; }