From c3402b0b121fab7451e4f13f1bb6d4b2930ecc2e Mon Sep 17 00:00:00 2001 From: Steve Riesenberg Date: Thu, 17 Mar 2022 14:46:48 -0500 Subject: [PATCH] Replaced auth-server with localhost --- samples/README.adoc | 1 - .../main/java/sample/config/AuthorizationServerConfig.java | 4 ++-- .../main/java/sample/config/AuthorizationServerConfig.java | 4 ++-- samples/messages-client/src/main/resources/application.yml | 2 +- samples/messages-resource/src/main/resources/application.yml | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/samples/README.adoc b/samples/README.adoc index 281ea6a0..b3501cef 100644 --- a/samples/README.adoc +++ b/samples/README.adoc @@ -7,7 +7,6 @@ The username is `user1` and the password is `password`. == Run the Sample * Run Authorization Server -> `./gradlew -b samples/default-authorizationserver/samples-default-authorizationserver.gradle bootRun` -** *IMPORTANT:* Make sure to modify your `/etc/hosts` file to avoid problems with session cookie overwrites between `messages-client` and `default-authorizationserver`. Simply add the entry `127.0.0.1 auth-server` * Run Resource Server -> `./gradlew -b samples/messages-resource/samples-messages-resource.gradle bootRun` * Run Client -> `./gradlew -b samples/messages-client/samples-messages-client.gradle bootRun` * Go to `http://127.0.0.1:8080` diff --git a/samples/custom-consent-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java b/samples/custom-consent-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java index d7064bb4..1845a150 100644 --- a/samples/custom-consent-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java +++ b/samples/custom-consent-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 the original author or authors. + * Copyright 2020-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,7 +103,7 @@ public class AuthorizationServerConfig { @Bean public ProviderSettings providerSettings() { - return ProviderSettings.builder().issuer("http://auth-server:9000").build(); + return ProviderSettings.builder().issuer("http://localhost:9000").build(); } @Bean diff --git a/samples/default-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java b/samples/default-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java index e9cacc63..045bb52e 100644 --- a/samples/default-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java +++ b/samples/default-authorizationserver/src/main/java/sample/config/AuthorizationServerConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 the original author or authors. + * Copyright 2020-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -107,7 +107,7 @@ public class AuthorizationServerConfig { @Bean public ProviderSettings providerSettings() { - return ProviderSettings.builder().issuer("http://auth-server:9000").build(); + return ProviderSettings.builder().issuer("http://localhost:9000").build(); } @Bean diff --git a/samples/messages-client/src/main/resources/application.yml b/samples/messages-client/src/main/resources/application.yml index fb78d63b..6623277a 100644 --- a/samples/messages-client/src/main/resources/application.yml +++ b/samples/messages-client/src/main/resources/application.yml @@ -41,7 +41,7 @@ spring: client-name: messaging-client-client-credentials provider: spring: - issuer-uri: http://auth-server:9000 + issuer-uri: http://localhost:9000 messages: base-uri: http://127.0.0.1:8090/messages diff --git a/samples/messages-resource/src/main/resources/application.yml b/samples/messages-resource/src/main/resources/application.yml index af58f116..1e01f945 100644 --- a/samples/messages-resource/src/main/resources/application.yml +++ b/samples/messages-resource/src/main/resources/application.yml @@ -14,4 +14,4 @@ spring: oauth2: resourceserver: jwt: - issuer-uri: http://auth-server:9000 + issuer-uri: http://localhost:9000