@@ -0,0 +1,1210 @@
+package ie.gmit.sw.configuration;%0A%0Aimport com.netflix.appinfo.AmazonInfo;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Value;%0Aimport org.springframework.cloud.commons.util.InetUtils;%0Aimport org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.context.annotation.Import;%0Aimport org.springframework.scheduling.annotation.EnableAsync;%0A%0A@Configuration%0A@Import(InetUtils.class)%0Apublic class AuthConfiguration %7B%0A    @Value(%22$%7Bserver.port%7D%22)%0A    private int port;%0A%0A    @Bean%0A    @Autowired%0A    public EurekaInstanceConfigBean eurekaInstanceConfig(InetUtils inetUtils) %7B%0A        EurekaInstanceConfigBean config = new EurekaInstanceConfigBean(inetUtils);%0A        AmazonInfo info = AmazonInfo.Builder.newBuilder().autoBuild(%22eureka%22);%0A        config.setHostname(info.get(AmazonInfo.MetaDataKey.publicHostname));%0A        config.setIpAddress(info.get(AmazonInfo.MetaDataKey.publicIpv4));%0A        config.setNonSecurePort(port);%0A        config.setDataCenterInfo(info);%0A        return config;%0A    %7D%0A%7D%0A

change eureka clients' ip to public ip for auth server