From 47e2872936fcea1a71be50c0ac2a934aec30d96f Mon Sep 17 00:00:00 2001 From: Eugen Paraschiv Date: Wed, 17 Oct 2018 23:17:13 +0300 Subject: [PATCH] org to com - base package - in progress --- clients-angular4/oauth-ui-implicit-angular4/pom.xml | 2 +- clients-angularjs/oauth-ui-implicit/pom.xml | 2 +- .../java/{org => com}/baeldung/config/UiApplication.java | 2 +- .../java/{org => com}/baeldung/config/UiWebConfig.java | 2 +- .../test/java/com}/baeldung/test/UiIntegrationTest.java | 5 +++-- clients-angularjs/oauth-ui-password/pom.xml | 2 +- .../baeldung/config/CustomHttpServletRequest.java | 2 +- .../{org => com}/baeldung/config/CustomPostZuulFilter.java | 2 +- .../{org => com}/baeldung/config/CustomPreZuulFilter.java | 2 +- .../java/{org => com}/baeldung/config/UiApplication.java | 2 +- .../java/{org => com}/baeldung/config/UiWebConfig.java | 2 +- .../test/java/com}/baeldung/test/UiIntegrationTest.java | 5 +++-- .../baeldung/config/AuthorizationServerApplication.java | 2 +- .../src/main/java/com}/baeldung/config/CorsFilter.java | 2 +- .../{org => com}/baeldung/config/CustomTokenEnhancer.java | 2 +- .../{org => com}/baeldung/config/EmployeeController.java | 6 ++++-- .../baeldung/config/OAuth2AuthorizationServerConfig.java | 2 +- .../config/OAuth2AuthorizationServerConfigInMemory.java | 2 +- .../config/OAuth2AuthorizationServerConfigJwt.java | 2 +- .../baeldung/config/OAuth2ResourceServerConfig.java | 2 +- .../{org => com}/baeldung/config/RevokeTokenEndpoint.java | 2 +- .../{org => com}/baeldung/config/WebSecurityConfig.java | 2 +- .../{org => com}/baeldung/controller/TokenController.java | 2 +- .../main/java/{org => com}/baeldung/model/Employee.java | 2 +- .../baeldung/test/AuthServerIntegrationTest.java | 5 +++-- .../test/java/{org => com}/baeldung/test/OAuthMvcTest.java | 5 +++-- .../baeldung/test/TokenControllerIntegrationTest.java | 7 ++++--- .../baeldung/test/TokenRevocationLiveTest.java | 2 +- oauth-resource-server-1/pom.xml | 2 +- .../src/main/java/com}/baeldung/config/CorsFilter.java | 2 +- .../baeldung/config/CustomAccessTokenConverter.java | 2 +- .../java/com}/baeldung/config/MethodSecurityConfig.java | 2 +- .../baeldung/config/OAuth2ResourceServerConfig.java | 2 +- .../baeldung/config/OAuth2ResourceServerConfigJwt.java | 2 +- .../OAuth2ResourceServerConfigRemoteTokenService.java | 2 +- .../baeldung/config/ResourceServerApplication.java | 2 +- .../baeldung/config/ResourceServerWebConfig.java | 4 ++-- .../baeldung/web/controller/BarController.java | 5 +++-- .../baeldung/web/controller/FooController.java | 5 +++-- .../baeldung/web/controller/UserController.java | 2 +- .../src/main/java/com}/baeldung/web/dto/Bar.java | 2 +- .../src/main/java/{org => com}/baeldung/web/dto/Foo.java | 2 +- .../baeldung/live/AuthorizationCodeLiveTest.java | 2 +- .../{org => com}/baeldung/live/ImplicitFlowLiveTest.java | 2 +- .../{org => com}/baeldung/live/PasswordFlowLiveTest.java | 2 +- .../baeldung/test/AuthenticationClaimsIntegrationTest.java | 5 +++-- .../baeldung/test/ResourceServerIntegrationTest.java | 5 +++-- oauth-resource-server-2/pom.xml | 2 +- .../src/main/java/com}/baeldung/config/CorsFilter.java | 2 +- .../{org => com}/baeldung/config/CustomClaimVerifier.java | 2 +- .../java/com}/baeldung/config/MethodSecurityConfig.java | 2 +- .../baeldung/config/OAuth2ResourceServerConfig.java | 2 +- .../baeldung/config/ResourceServerApplication.java | 2 +- .../baeldung/config/ResourceServerWebConfig.java | 2 +- .../java/{org => com}/baeldung/config/SwaggerConfig.java | 2 +- .../baeldung/web/controller/BarController.java | 5 +++-- .../baeldung/web/controller/FooController.java | 5 +++-- .../baeldung/web/controller/UserController.java | 2 +- .../src/main/java/com}/baeldung/web/dto/Bar.java | 2 +- .../src/main/java/{org => com}/baeldung/web/dto/Foo.java | 2 +- .../baeldung/test/JwtClaimsVerifierIntegrationTest.java | 5 +++-- .../{org => com}/baeldung/test/OAuth2SwaggerLiveTest.java | 5 +++-- .../baeldung/test/ResourceServerIntegrationTest.java | 5 +++-- oauth-ui-authorization-code-angular/pom.xml | 2 +- pom.xml | 2 +- 65 files changed, 98 insertions(+), 82 deletions(-) rename clients-angularjs/oauth-ui-implicit/src/main/java/{org => com}/baeldung/config/UiApplication.java (93%) rename clients-angularjs/oauth-ui-implicit/src/main/java/{org => com}/baeldung/config/UiWebConfig.java (98%) rename clients-angularjs/{oauth-ui-password/src/test/java/org => oauth-ui-implicit/src/test/java/com}/baeldung/test/UiIntegrationTest.java (87%) rename clients-angularjs/oauth-ui-password/src/main/java/{org => com}/baeldung/config/CustomHttpServletRequest.java (96%) rename clients-angularjs/oauth-ui-password/src/main/java/{org => com}/baeldung/config/CustomPostZuulFilter.java (98%) rename clients-angularjs/oauth-ui-password/src/main/java/{org => com}/baeldung/config/CustomPreZuulFilter.java (98%) rename clients-angularjs/oauth-ui-password/src/main/java/{org => com}/baeldung/config/UiApplication.java (94%) rename clients-angularjs/oauth-ui-password/src/main/java/{org => com}/baeldung/config/UiWebConfig.java (98%) rename clients-angularjs/{oauth-ui-implicit/src/test/java/org => oauth-ui-password/src/test/java/com}/baeldung/test/UiIntegrationTest.java (87%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/AuthorizationServerApplication.java (93%) rename {oauth-resource-server-2/src/main/java/org => oauth-authorization-server/src/main/java/com}/baeldung/config/CorsFilter.java (98%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/CustomTokenEnhancer.java (96%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/EmployeeController.java (94%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/OAuth2AuthorizationServerConfig.java (99%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java (99%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/OAuth2AuthorizationServerConfigJwt.java (99%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/OAuth2ResourceServerConfig.java (97%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/RevokeTokenEndpoint.java (97%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/config/WebSecurityConfig.java (98%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/controller/TokenController.java (98%) rename oauth-authorization-server/src/main/java/{org => com}/baeldung/model/Employee.java (94%) rename oauth-authorization-server/src/test/java/{org => com}/baeldung/test/AuthServerIntegrationTest.java (85%) rename oauth-authorization-server/src/test/java/{org => com}/baeldung/test/OAuthMvcTest.java (98%) rename oauth-authorization-server/src/test/java/{org => com}/baeldung/test/TokenControllerIntegrationTest.java (95%) rename oauth-authorization-server/src/test/java/{org => com}/baeldung/test/TokenRevocationLiveTest.java (98%) rename {oauth-authorization-server/src/main/java/org => oauth-resource-server-1/src/main/java/com}/baeldung/config/CorsFilter.java (98%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/config/CustomAccessTokenConverter.java (95%) rename {oauth-resource-server-2/src/main/java/org => oauth-resource-server-1/src/main/java/com}/baeldung/config/MethodSecurityConfig.java (96%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/config/OAuth2ResourceServerConfig.java (98%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/config/OAuth2ResourceServerConfigJwt.java (98%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java (97%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/config/ResourceServerApplication.java (93%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/config/ResourceServerWebConfig.java (82%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/web/controller/BarController.java (95%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/web/controller/FooController.java (95%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/web/controller/UserController.java (96%) rename {oauth-resource-server-2/src/main/java/org => oauth-resource-server-1/src/main/java/com}/baeldung/web/dto/Bar.java (94%) rename oauth-resource-server-1/src/main/java/{org => com}/baeldung/web/dto/Foo.java (94%) rename oauth-resource-server-1/src/test/java/{org => com}/baeldung/live/AuthorizationCodeLiveTest.java (99%) rename oauth-resource-server-1/src/test/java/{org => com}/baeldung/live/ImplicitFlowLiveTest.java (98%) rename oauth-resource-server-1/src/test/java/{org => com}/baeldung/live/PasswordFlowLiveTest.java (99%) rename oauth-resource-server-1/src/test/java/{org => com}/baeldung/test/AuthenticationClaimsIntegrationTest.java (96%) rename oauth-resource-server-1/src/test/java/{org => com}/baeldung/test/ResourceServerIntegrationTest.java (86%) rename {oauth-resource-server-1/src/main/java/org => oauth-resource-server-2/src/main/java/com}/baeldung/config/CorsFilter.java (98%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/config/CustomClaimVerifier.java (95%) rename {oauth-resource-server-1/src/main/java/org => oauth-resource-server-2/src/main/java/com}/baeldung/config/MethodSecurityConfig.java (96%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/config/OAuth2ResourceServerConfig.java (99%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/config/ResourceServerApplication.java (93%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/config/ResourceServerWebConfig.java (92%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/config/SwaggerConfig.java (99%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/web/controller/BarController.java (95%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/web/controller/FooController.java (95%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/web/controller/UserController.java (97%) rename {oauth-resource-server-1/src/main/java/org => oauth-resource-server-2/src/main/java/com}/baeldung/web/dto/Bar.java (94%) rename oauth-resource-server-2/src/main/java/{org => com}/baeldung/web/dto/Foo.java (94%) rename oauth-resource-server-2/src/test/java/{org => com}/baeldung/test/JwtClaimsVerifierIntegrationTest.java (97%) rename oauth-resource-server-2/src/test/java/{org => com}/baeldung/test/OAuth2SwaggerLiveTest.java (96%) rename oauth-resource-server-2/src/test/java/{org => com}/baeldung/test/ResourceServerIntegrationTest.java (86%) diff --git a/clients-angular4/oauth-ui-implicit-angular4/pom.xml b/clients-angular4/oauth-ui-implicit-angular4/pom.xml index 601f73908..8ac255ba9 100644 --- a/clients-angular4/oauth-ui-implicit-angular4/pom.xml +++ b/clients-angular4/oauth-ui-implicit-angular4/pom.xml @@ -8,7 +8,7 @@ war - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT diff --git a/clients-angularjs/oauth-ui-implicit/pom.xml b/clients-angularjs/oauth-ui-implicit/pom.xml index 3d67829af..b8206821c 100644 --- a/clients-angularjs/oauth-ui-implicit/pom.xml +++ b/clients-angularjs/oauth-ui-implicit/pom.xml @@ -8,7 +8,7 @@ war - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT ../../ diff --git a/clients-angularjs/oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java b/clients-angularjs/oauth-ui-implicit/src/main/java/com/baeldung/config/UiApplication.java similarity index 93% rename from clients-angularjs/oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java rename to clients-angularjs/oauth-ui-implicit/src/main/java/com/baeldung/config/UiApplication.java index 5b7f03adb..4c9710654 100644 --- a/clients-angularjs/oauth-ui-implicit/src/main/java/org/baeldung/config/UiApplication.java +++ b/clients-angularjs/oauth-ui-implicit/src/main/java/com/baeldung/config/UiApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/clients-angularjs/oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java b/clients-angularjs/oauth-ui-implicit/src/main/java/com/baeldung/config/UiWebConfig.java similarity index 98% rename from clients-angularjs/oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java rename to clients-angularjs/oauth-ui-implicit/src/main/java/com/baeldung/config/UiWebConfig.java index 03f5ac1ba..47916ac7a 100644 --- a/clients-angularjs/oauth-ui-implicit/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/clients-angularjs/oauth-ui-implicit/src/main/java/com/baeldung/config/UiWebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/clients-angularjs/oauth-ui-password/src/test/java/org/baeldung/test/UiIntegrationTest.java b/clients-angularjs/oauth-ui-implicit/src/test/java/com/baeldung/test/UiIntegrationTest.java similarity index 87% rename from clients-angularjs/oauth-ui-password/src/test/java/org/baeldung/test/UiIntegrationTest.java rename to clients-angularjs/oauth-ui-implicit/src/test/java/com/baeldung/test/UiIntegrationTest.java index 6386eac0b..4f7a636ce 100644 --- a/clients-angularjs/oauth-ui-password/src/test/java/org/baeldung/test/UiIntegrationTest.java +++ b/clients-angularjs/oauth-ui-implicit/src/test/java/com/baeldung/test/UiIntegrationTest.java @@ -1,12 +1,13 @@ -package org.baeldung.test; +package com.baeldung.test; -import org.baeldung.config.UiApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.UiApplication; + @RunWith(SpringRunner.class) @SpringBootTest(classes = UiApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class UiIntegrationTest { diff --git a/clients-angularjs/oauth-ui-password/pom.xml b/clients-angularjs/oauth-ui-password/pom.xml index 7bf032f12..33033dd7e 100644 --- a/clients-angularjs/oauth-ui-password/pom.xml +++ b/clients-angularjs/oauth-ui-password/pom.xml @@ -8,7 +8,7 @@ war - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT ../../ diff --git a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomHttpServletRequest.java b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomHttpServletRequest.java similarity index 96% rename from clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomHttpServletRequest.java rename to clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomHttpServletRequest.java index c90f60a35..36c134470 100644 --- a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomHttpServletRequest.java +++ b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomHttpServletRequest.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.HashMap; import java.util.Map; diff --git a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomPostZuulFilter.java b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomPostZuulFilter.java similarity index 98% rename from clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomPostZuulFilter.java rename to clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomPostZuulFilter.java index bd503d63a..3119cd1eb 100644 --- a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomPostZuulFilter.java +++ b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomPostZuulFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.io.IOException; import java.io.InputStream; diff --git a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomPreZuulFilter.java b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomPreZuulFilter.java similarity index 98% rename from clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomPreZuulFilter.java rename to clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomPreZuulFilter.java index 17bf7626f..f50ec6b5e 100644 --- a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/CustomPreZuulFilter.java +++ b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/CustomPreZuulFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.io.UnsupportedEncodingException; import java.util.HashMap; diff --git a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/UiApplication.java b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/UiApplication.java similarity index 94% rename from clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/UiApplication.java rename to clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/UiApplication.java index d3e13639e..0772f9cab 100644 --- a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/UiApplication.java +++ b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/UiApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/UiWebConfig.java similarity index 98% rename from clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java rename to clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/UiWebConfig.java index daf5a0753..c4f5c00ec 100644 --- a/clients-angularjs/oauth-ui-password/src/main/java/org/baeldung/config/UiWebConfig.java +++ b/clients-angularjs/oauth-ui-password/src/main/java/com/baeldung/config/UiWebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/clients-angularjs/oauth-ui-implicit/src/test/java/org/baeldung/test/UiIntegrationTest.java b/clients-angularjs/oauth-ui-password/src/test/java/com/baeldung/test/UiIntegrationTest.java similarity index 87% rename from clients-angularjs/oauth-ui-implicit/src/test/java/org/baeldung/test/UiIntegrationTest.java rename to clients-angularjs/oauth-ui-password/src/test/java/com/baeldung/test/UiIntegrationTest.java index 6386eac0b..4f7a636ce 100644 --- a/clients-angularjs/oauth-ui-implicit/src/test/java/org/baeldung/test/UiIntegrationTest.java +++ b/clients-angularjs/oauth-ui-password/src/test/java/com/baeldung/test/UiIntegrationTest.java @@ -1,12 +1,13 @@ -package org.baeldung.test; +package com.baeldung.test; -import org.baeldung.config.UiApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.UiApplication; + @RunWith(SpringRunner.class) @SpringBootTest(classes = UiApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class UiIntegrationTest { diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java b/oauth-authorization-server/src/main/java/com/baeldung/config/AuthorizationServerApplication.java similarity index 93% rename from oauth-authorization-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/AuthorizationServerApplication.java index 7da73c740..de3675cb3 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/AuthorizationServerApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/CorsFilter.java b/oauth-authorization-server/src/main/java/com/baeldung/config/CorsFilter.java similarity index 98% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/CorsFilter.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/CorsFilter.java index 2a4943078..4e6d29908 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/CorsFilter.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/CorsFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.io.IOException; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/CustomTokenEnhancer.java b/oauth-authorization-server/src/main/java/com/baeldung/config/CustomTokenEnhancer.java similarity index 96% rename from oauth-authorization-server/src/main/java/org/baeldung/config/CustomTokenEnhancer.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/CustomTokenEnhancer.java index 80e2140d5..a758a0535 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/CustomTokenEnhancer.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/CustomTokenEnhancer.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/EmployeeController.java b/oauth-authorization-server/src/main/java/com/baeldung/config/EmployeeController.java similarity index 94% rename from oauth-authorization-server/src/main/java/org/baeldung/config/EmployeeController.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/EmployeeController.java index a8114cbe4..6ebbb2b3e 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/EmployeeController.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/EmployeeController.java @@ -1,9 +1,8 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.ArrayList; import java.util.List; -import org.baeldung.model.Employee; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -13,6 +12,9 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; + +import com.baeldung.model.Employee; + import java.util.Optional; @Controller diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfig.java b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfig.java similarity index 99% rename from oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfig.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfig.java index 6bf2f6cb0..ad8b3d5d3 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfig.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.Arrays; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java similarity index 99% rename from oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java index 139cf4c6a..889ed1a77 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfigInMemory.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.Arrays; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfigJwt.java b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfigJwt.java similarity index 99% rename from oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfigJwt.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfigJwt.java index 1ea5a68b9..09ff35b9c 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2AuthorizationServerConfigJwt.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2AuthorizationServerConfigJwt.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.Arrays; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java similarity index 97% rename from oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java index 39023065f..47ea83493 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/RevokeTokenEndpoint.java b/oauth-authorization-server/src/main/java/com/baeldung/config/RevokeTokenEndpoint.java similarity index 97% rename from oauth-authorization-server/src/main/java/org/baeldung/config/RevokeTokenEndpoint.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/RevokeTokenEndpoint.java index 164ee35c1..97568c78a 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/RevokeTokenEndpoint.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/RevokeTokenEndpoint.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/WebSecurityConfig.java b/oauth-authorization-server/src/main/java/com/baeldung/config/WebSecurityConfig.java similarity index 98% rename from oauth-authorization-server/src/main/java/org/baeldung/config/WebSecurityConfig.java rename to oauth-authorization-server/src/main/java/com/baeldung/config/WebSecurityConfig.java index ec4ee9d1e..2a316b1b1 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/WebSecurityConfig.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/config/WebSecurityConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/controller/TokenController.java b/oauth-authorization-server/src/main/java/com/baeldung/controller/TokenController.java similarity index 98% rename from oauth-authorization-server/src/main/java/org/baeldung/controller/TokenController.java rename to oauth-authorization-server/src/main/java/com/baeldung/controller/TokenController.java index 78292e8ff..8c24406bf 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/controller/TokenController.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/controller/TokenController.java @@ -1,4 +1,4 @@ -package org.baeldung.controller; +package com.baeldung.controller; import java.util.Collection; import java.util.Collections; diff --git a/oauth-authorization-server/src/main/java/org/baeldung/model/Employee.java b/oauth-authorization-server/src/main/java/com/baeldung/model/Employee.java similarity index 94% rename from oauth-authorization-server/src/main/java/org/baeldung/model/Employee.java rename to oauth-authorization-server/src/main/java/com/baeldung/model/Employee.java index 3fe57c300..5ff47fcdb 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/model/Employee.java +++ b/oauth-authorization-server/src/main/java/com/baeldung/model/Employee.java @@ -1,4 +1,4 @@ -package org.baeldung.model; +package com.baeldung.model; public class Employee { private String email; diff --git a/oauth-authorization-server/src/test/java/org/baeldung/test/AuthServerIntegrationTest.java b/oauth-authorization-server/src/test/java/com/baeldung/test/AuthServerIntegrationTest.java similarity index 85% rename from oauth-authorization-server/src/test/java/org/baeldung/test/AuthServerIntegrationTest.java rename to oauth-authorization-server/src/test/java/com/baeldung/test/AuthServerIntegrationTest.java index 9e2d6feca..4a0f32981 100644 --- a/oauth-authorization-server/src/test/java/org/baeldung/test/AuthServerIntegrationTest.java +++ b/oauth-authorization-server/src/test/java/com/baeldung/test/AuthServerIntegrationTest.java @@ -1,12 +1,13 @@ -package org.baeldung.test; +package com.baeldung.test; -import org.baeldung.config.AuthorizationServerApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.AuthorizationServerApplication; + @RunWith(SpringRunner.class) @SpringBootTest(classes = AuthorizationServerApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class AuthServerIntegrationTest { diff --git a/oauth-authorization-server/src/test/java/org/baeldung/test/OAuthMvcTest.java b/oauth-authorization-server/src/test/java/com/baeldung/test/OAuthMvcTest.java similarity index 98% rename from oauth-authorization-server/src/test/java/org/baeldung/test/OAuthMvcTest.java rename to oauth-authorization-server/src/test/java/com/baeldung/test/OAuthMvcTest.java index fa1bf46ca..13289cb9a 100644 --- a/oauth-authorization-server/src/test/java/org/baeldung/test/OAuthMvcTest.java +++ b/oauth-authorization-server/src/test/java/com/baeldung/test/OAuthMvcTest.java @@ -1,4 +1,4 @@ -package org.baeldung.test; +package com.baeldung.test; import static org.hamcrest.Matchers.is; @@ -20,9 +20,10 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.context.WebApplicationContext; +import com.baeldung.config.AuthorizationServerApplication; + import org.springframework.boot.json.JacksonJsonParser; import org.springframework.boot.test.context.SpringBootTest; -import org.baeldung.config.AuthorizationServerApplication; import org.springframework.test.context.ActiveProfiles; @RunWith(SpringRunner.class) diff --git a/oauth-authorization-server/src/test/java/org/baeldung/test/TokenControllerIntegrationTest.java b/oauth-authorization-server/src/test/java/com/baeldung/test/TokenControllerIntegrationTest.java similarity index 95% rename from oauth-authorization-server/src/test/java/org/baeldung/test/TokenControllerIntegrationTest.java rename to oauth-authorization-server/src/test/java/com/baeldung/test/TokenControllerIntegrationTest.java index 176270433..394009988 100644 --- a/oauth-authorization-server/src/test/java/org/baeldung/test/TokenControllerIntegrationTest.java +++ b/oauth-authorization-server/src/test/java/com/baeldung/test/TokenControllerIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.test; +package com.baeldung.test; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; @@ -9,8 +9,6 @@ import java.util.List; import java.util.stream.IntStream; -import org.baeldung.config.AuthorizationServerApplication; -import org.baeldung.controller.TokenController; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.type.TypeReference; import org.junit.Test; @@ -25,6 +23,9 @@ import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; +import com.baeldung.config.AuthorizationServerApplication; +import com.baeldung.controller.TokenController; + @RunWith(SpringRunner.class) @SpringBootTest(classes = { AuthorizationServerApplication.class, TokenController.class }, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @AutoConfigureMockMvc diff --git a/oauth-authorization-server/src/test/java/org/baeldung/test/TokenRevocationLiveTest.java b/oauth-authorization-server/src/test/java/com/baeldung/test/TokenRevocationLiveTest.java similarity index 98% rename from oauth-authorization-server/src/test/java/org/baeldung/test/TokenRevocationLiveTest.java rename to oauth-authorization-server/src/test/java/com/baeldung/test/TokenRevocationLiveTest.java index 5a5c9beb6..8752d18a8 100644 --- a/oauth-authorization-server/src/test/java/org/baeldung/test/TokenRevocationLiveTest.java +++ b/oauth-authorization-server/src/test/java/com/baeldung/test/TokenRevocationLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.test; +package com.baeldung.test; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertNotNull; diff --git a/oauth-resource-server-1/pom.xml b/oauth-resource-server-1/pom.xml index 424a023ff..01e2d79de 100644 --- a/oauth-resource-server-1/pom.xml +++ b/oauth-resource-server-1/pom.xml @@ -6,7 +6,7 @@ war - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT diff --git a/oauth-authorization-server/src/main/java/org/baeldung/config/CorsFilter.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/CorsFilter.java similarity index 98% rename from oauth-authorization-server/src/main/java/org/baeldung/config/CorsFilter.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/CorsFilter.java index 2a4943078..4e6d29908 100644 --- a/oauth-authorization-server/src/main/java/org/baeldung/config/CorsFilter.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/CorsFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.io.IOException; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/CustomAccessTokenConverter.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/CustomAccessTokenConverter.java similarity index 95% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/CustomAccessTokenConverter.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/CustomAccessTokenConverter.java index f5eb08148..4b2c94739 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/CustomAccessTokenConverter.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/CustomAccessTokenConverter.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.Map; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/MethodSecurityConfig.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/MethodSecurityConfig.java similarity index 96% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/MethodSecurityConfig.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/MethodSecurityConfig.java index 25fcab2ff..d57a581b4 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/MethodSecurityConfig.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/MethodSecurityConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java similarity index 98% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java index 6f4fb2b5f..d51cb11f6 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import javax.sql.DataSource; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfigJwt.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfigJwt.java similarity index 98% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfigJwt.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfigJwt.java index bdeac80d4..0a6909f59 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfigJwt.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfigJwt.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java similarity index 97% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java index eea75f0c8..073789adb 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/OAuth2ResourceServerConfigRemoteTokenService.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Primary; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/ResourceServerApplication.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/ResourceServerApplication.java similarity index 93% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/ResourceServerApplication.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/ResourceServerApplication.java index 77eabe771..b1db6db87 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/ResourceServerApplication.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/ResourceServerApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/ResourceServerWebConfig.java b/oauth-resource-server-1/src/main/java/com/baeldung/config/ResourceServerWebConfig.java similarity index 82% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/ResourceServerWebConfig.java rename to oauth-resource-server-1/src/main/java/com/baeldung/config/ResourceServerWebConfig.java index a9dc70578..e5f07a9a4 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/ResourceServerWebConfig.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/config/ResourceServerWebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @@ -7,7 +7,7 @@ @Configuration @EnableWebMvc -@ComponentScan({ "org.baeldung.web.controller" }) +@ComponentScan({ "com.baeldung.web.controller" }) public class ResourceServerWebConfig implements WebMvcConfigurer { // } diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/web/controller/BarController.java b/oauth-resource-server-1/src/main/java/com/baeldung/web/controller/BarController.java similarity index 95% rename from oauth-resource-server-1/src/main/java/org/baeldung/web/controller/BarController.java rename to oauth-resource-server-1/src/main/java/com/baeldung/web/controller/BarController.java index 208a7f68d..87d243b49 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/web/controller/BarController.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/web/controller/BarController.java @@ -1,9 +1,8 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; -import org.baeldung.web.dto.Bar; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; @@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; +import com.baeldung.web.dto.Bar; + @Controller public class BarController { diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/web/controller/FooController.java b/oauth-resource-server-1/src/main/java/com/baeldung/web/controller/FooController.java similarity index 95% rename from oauth-resource-server-1/src/main/java/org/baeldung/web/controller/FooController.java rename to oauth-resource-server-1/src/main/java/com/baeldung/web/controller/FooController.java index be0abbc12..83fcc8592 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/web/controller/FooController.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/web/controller/FooController.java @@ -1,9 +1,8 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; -import org.baeldung.web.dto.Foo; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; @@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; +import com.baeldung.web.dto.Foo; + @Controller public class FooController { diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/web/controller/UserController.java b/oauth-resource-server-1/src/main/java/com/baeldung/web/controller/UserController.java similarity index 96% rename from oauth-resource-server-1/src/main/java/org/baeldung/web/controller/UserController.java rename to oauth-resource-server-1/src/main/java/com/baeldung/web/controller/UserController.java index 4917f77d1..5b140be16 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/web/controller/UserController.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/web/controller/UserController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import java.util.Map; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/web/dto/Bar.java b/oauth-resource-server-1/src/main/java/com/baeldung/web/dto/Bar.java similarity index 94% rename from oauth-resource-server-2/src/main/java/org/baeldung/web/dto/Bar.java rename to oauth-resource-server-1/src/main/java/com/baeldung/web/dto/Bar.java index adbb2aa2a..867905714 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/web/dto/Bar.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/web/dto/Bar.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.web.dto; public class Bar { private long id; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/web/dto/Foo.java b/oauth-resource-server-1/src/main/java/com/baeldung/web/dto/Foo.java similarity index 94% rename from oauth-resource-server-1/src/main/java/org/baeldung/web/dto/Foo.java rename to oauth-resource-server-1/src/main/java/com/baeldung/web/dto/Foo.java index 9d26618e7..107f982f9 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/web/dto/Foo.java +++ b/oauth-resource-server-1/src/main/java/com/baeldung/web/dto/Foo.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.web.dto; public class Foo { private long id; diff --git a/oauth-resource-server-1/src/test/java/org/baeldung/live/AuthorizationCodeLiveTest.java b/oauth-resource-server-1/src/test/java/com/baeldung/live/AuthorizationCodeLiveTest.java similarity index 99% rename from oauth-resource-server-1/src/test/java/org/baeldung/live/AuthorizationCodeLiveTest.java rename to oauth-resource-server-1/src/test/java/com/baeldung/live/AuthorizationCodeLiveTest.java index ccef26c7c..a901a3d83 100644 --- a/oauth-resource-server-1/src/test/java/org/baeldung/live/AuthorizationCodeLiveTest.java +++ b/oauth-resource-server-1/src/test/java/com/baeldung/live/AuthorizationCodeLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.live; +package com.baeldung.live; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/oauth-resource-server-1/src/test/java/org/baeldung/live/ImplicitFlowLiveTest.java b/oauth-resource-server-1/src/test/java/com/baeldung/live/ImplicitFlowLiveTest.java similarity index 98% rename from oauth-resource-server-1/src/test/java/org/baeldung/live/ImplicitFlowLiveTest.java rename to oauth-resource-server-1/src/test/java/com/baeldung/live/ImplicitFlowLiveTest.java index 583c4130f..aef2d61ce 100644 --- a/oauth-resource-server-1/src/test/java/org/baeldung/live/ImplicitFlowLiveTest.java +++ b/oauth-resource-server-1/src/test/java/com/baeldung/live/ImplicitFlowLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.live; +package com.baeldung.live; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/oauth-resource-server-1/src/test/java/org/baeldung/live/PasswordFlowLiveTest.java b/oauth-resource-server-1/src/test/java/com/baeldung/live/PasswordFlowLiveTest.java similarity index 99% rename from oauth-resource-server-1/src/test/java/org/baeldung/live/PasswordFlowLiveTest.java rename to oauth-resource-server-1/src/test/java/com/baeldung/live/PasswordFlowLiveTest.java index 4f85df12c..5e8f3acd9 100644 --- a/oauth-resource-server-1/src/test/java/org/baeldung/live/PasswordFlowLiveTest.java +++ b/oauth-resource-server-1/src/test/java/com/baeldung/live/PasswordFlowLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.live; +package com.baeldung.live; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; diff --git a/oauth-resource-server-1/src/test/java/org/baeldung/test/AuthenticationClaimsIntegrationTest.java b/oauth-resource-server-1/src/test/java/com/baeldung/test/AuthenticationClaimsIntegrationTest.java similarity index 96% rename from oauth-resource-server-1/src/test/java/org/baeldung/test/AuthenticationClaimsIntegrationTest.java rename to oauth-resource-server-1/src/test/java/com/baeldung/test/AuthenticationClaimsIntegrationTest.java index a48b1558f..4d01b4726 100644 --- a/oauth-resource-server-1/src/test/java/org/baeldung/test/AuthenticationClaimsIntegrationTest.java +++ b/oauth-resource-server-1/src/test/java/com/baeldung/test/AuthenticationClaimsIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.test; +package com.baeldung.test; import static org.junit.Assert.assertTrue; import io.restassured.RestAssured; @@ -7,7 +7,6 @@ import java.util.HashMap; import java.util.Map; -import org.baeldung.config.ResourceServerApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -17,6 +16,8 @@ import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.ResourceServerApplication; + //Before running this test make sure authorization server is running @RunWith(SpringRunner.class) diff --git a/oauth-resource-server-1/src/test/java/org/baeldung/test/ResourceServerIntegrationTest.java b/oauth-resource-server-1/src/test/java/com/baeldung/test/ResourceServerIntegrationTest.java similarity index 86% rename from oauth-resource-server-1/src/test/java/org/baeldung/test/ResourceServerIntegrationTest.java rename to oauth-resource-server-1/src/test/java/com/baeldung/test/ResourceServerIntegrationTest.java index 7f2875850..62aa6dc53 100644 --- a/oauth-resource-server-1/src/test/java/org/baeldung/test/ResourceServerIntegrationTest.java +++ b/oauth-resource-server-1/src/test/java/com/baeldung/test/ResourceServerIntegrationTest.java @@ -1,12 +1,13 @@ -package org.baeldung.test; +package com.baeldung.test; -import org.baeldung.config.ResourceServerApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.ResourceServerApplication; + @RunWith(SpringRunner.class) @SpringBootTest(classes = ResourceServerApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class ResourceServerIntegrationTest { diff --git a/oauth-resource-server-2/pom.xml b/oauth-resource-server-2/pom.xml index f3032bb4d..a561abd4a 100644 --- a/oauth-resource-server-2/pom.xml +++ b/oauth-resource-server-2/pom.xml @@ -7,7 +7,7 @@ war - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/CorsFilter.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/CorsFilter.java similarity index 98% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/CorsFilter.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/CorsFilter.java index 2a4943078..4e6d29908 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/CorsFilter.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/CorsFilter.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.io.IOException; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/CustomClaimVerifier.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/CustomClaimVerifier.java similarity index 95% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/CustomClaimVerifier.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/CustomClaimVerifier.java index e09778f86..f35e496ce 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/CustomClaimVerifier.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/CustomClaimVerifier.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.Map; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/config/MethodSecurityConfig.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/MethodSecurityConfig.java similarity index 96% rename from oauth-resource-server-1/src/main/java/org/baeldung/config/MethodSecurityConfig.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/MethodSecurityConfig.java index 25fcab2ff..d57a581b4 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/config/MethodSecurityConfig.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/MethodSecurityConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java similarity index 99% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java index 590c3d6ba..f3744da0c 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/OAuth2ResourceServerConfig.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/OAuth2ResourceServerConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.net.MalformedURLException; import java.net.URL; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/ResourceServerApplication.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/ResourceServerApplication.java similarity index 93% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/ResourceServerApplication.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/ResourceServerApplication.java index 77eabe771..b1db6db87 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/ResourceServerApplication.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/ResourceServerApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/ResourceServerWebConfig.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/ResourceServerWebConfig.java similarity index 92% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/ResourceServerWebConfig.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/ResourceServerWebConfig.java index d0345761b..9161c4e1d 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/ResourceServerWebConfig.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/ResourceServerWebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/config/SwaggerConfig.java b/oauth-resource-server-2/src/main/java/com/baeldung/config/SwaggerConfig.java similarity index 99% rename from oauth-resource-server-2/src/main/java/org/baeldung/config/SwaggerConfig.java rename to oauth-resource-server-2/src/main/java/com/baeldung/config/SwaggerConfig.java index 2d29f9428..60620e004 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/config/SwaggerConfig.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/config/SwaggerConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.config; import java.util.Arrays; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/web/controller/BarController.java b/oauth-resource-server-2/src/main/java/com/baeldung/web/controller/BarController.java similarity index 95% rename from oauth-resource-server-2/src/main/java/org/baeldung/web/controller/BarController.java rename to oauth-resource-server-2/src/main/java/com/baeldung/web/controller/BarController.java index 208a7f68d..87d243b49 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/web/controller/BarController.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/web/controller/BarController.java @@ -1,9 +1,8 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; -import org.baeldung.web.dto.Bar; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; @@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; +import com.baeldung.web.dto.Bar; + @Controller public class BarController { diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/web/controller/FooController.java b/oauth-resource-server-2/src/main/java/com/baeldung/web/controller/FooController.java similarity index 95% rename from oauth-resource-server-2/src/main/java/org/baeldung/web/controller/FooController.java rename to oauth-resource-server-2/src/main/java/com/baeldung/web/controller/FooController.java index be0abbc12..83fcc8592 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/web/controller/FooController.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/web/controller/FooController.java @@ -1,9 +1,8 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; import static org.apache.commons.lang3.RandomStringUtils.randomNumeric; -import org.baeldung.web.dto.Foo; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; @@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; +import com.baeldung.web.dto.Foo; + @Controller public class FooController { diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/web/controller/UserController.java b/oauth-resource-server-2/src/main/java/com/baeldung/web/controller/UserController.java similarity index 97% rename from oauth-resource-server-2/src/main/java/org/baeldung/web/controller/UserController.java rename to oauth-resource-server-2/src/main/java/com/baeldung/web/controller/UserController.java index 47ce8970c..5593edbc2 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/web/controller/UserController.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/web/controller/UserController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import java.util.Map; diff --git a/oauth-resource-server-1/src/main/java/org/baeldung/web/dto/Bar.java b/oauth-resource-server-2/src/main/java/com/baeldung/web/dto/Bar.java similarity index 94% rename from oauth-resource-server-1/src/main/java/org/baeldung/web/dto/Bar.java rename to oauth-resource-server-2/src/main/java/com/baeldung/web/dto/Bar.java index adbb2aa2a..867905714 100644 --- a/oauth-resource-server-1/src/main/java/org/baeldung/web/dto/Bar.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/web/dto/Bar.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.web.dto; public class Bar { private long id; diff --git a/oauth-resource-server-2/src/main/java/org/baeldung/web/dto/Foo.java b/oauth-resource-server-2/src/main/java/com/baeldung/web/dto/Foo.java similarity index 94% rename from oauth-resource-server-2/src/main/java/org/baeldung/web/dto/Foo.java rename to oauth-resource-server-2/src/main/java/com/baeldung/web/dto/Foo.java index 9d26618e7..107f982f9 100644 --- a/oauth-resource-server-2/src/main/java/org/baeldung/web/dto/Foo.java +++ b/oauth-resource-server-2/src/main/java/com/baeldung/web/dto/Foo.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.web.dto; public class Foo { private long id; diff --git a/oauth-resource-server-2/src/test/java/org/baeldung/test/JwtClaimsVerifierIntegrationTest.java b/oauth-resource-server-2/src/test/java/com/baeldung/test/JwtClaimsVerifierIntegrationTest.java similarity index 97% rename from oauth-resource-server-2/src/test/java/org/baeldung/test/JwtClaimsVerifierIntegrationTest.java rename to oauth-resource-server-2/src/test/java/com/baeldung/test/JwtClaimsVerifierIntegrationTest.java index 7142f4c2a..919792fb6 100644 --- a/oauth-resource-server-2/src/test/java/org/baeldung/test/JwtClaimsVerifierIntegrationTest.java +++ b/oauth-resource-server-2/src/test/java/com/baeldung/test/JwtClaimsVerifierIntegrationTest.java @@ -1,8 +1,7 @@ -package org.baeldung.test; +package com.baeldung.test; import static org.junit.Assert.assertTrue; -import org.baeldung.config.ResourceServerApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -13,6 +12,8 @@ import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.ResourceServerApplication; + @RunWith(SpringRunner.class) @SpringBootTest(classes = ResourceServerApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class JwtClaimsVerifierIntegrationTest { diff --git a/oauth-resource-server-2/src/test/java/org/baeldung/test/OAuth2SwaggerLiveTest.java b/oauth-resource-server-2/src/test/java/com/baeldung/test/OAuth2SwaggerLiveTest.java similarity index 96% rename from oauth-resource-server-2/src/test/java/org/baeldung/test/OAuth2SwaggerLiveTest.java rename to oauth-resource-server-2/src/test/java/com/baeldung/test/OAuth2SwaggerLiveTest.java index 130f43f1d..752c4d348 100644 --- a/oauth-resource-server-2/src/test/java/org/baeldung/test/OAuth2SwaggerLiveTest.java +++ b/oauth-resource-server-2/src/test/java/com/baeldung/test/OAuth2SwaggerLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.test; +package com.baeldung.test; import static org.junit.Assert.assertEquals; import io.restassured.RestAssured; @@ -7,7 +7,6 @@ import java.util.HashMap; import java.util.Map; -import org.baeldung.config.ResourceServerApplication; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -16,6 +15,8 @@ import org.springframework.http.HttpStatus; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.ResourceServerApplication; + // Before running this live test make sure authorization server is running @RunWith(SpringRunner.class) diff --git a/oauth-resource-server-2/src/test/java/org/baeldung/test/ResourceServerIntegrationTest.java b/oauth-resource-server-2/src/test/java/com/baeldung/test/ResourceServerIntegrationTest.java similarity index 86% rename from oauth-resource-server-2/src/test/java/org/baeldung/test/ResourceServerIntegrationTest.java rename to oauth-resource-server-2/src/test/java/com/baeldung/test/ResourceServerIntegrationTest.java index 7f2875850..62aa6dc53 100644 --- a/oauth-resource-server-2/src/test/java/org/baeldung/test/ResourceServerIntegrationTest.java +++ b/oauth-resource-server-2/src/test/java/com/baeldung/test/ResourceServerIntegrationTest.java @@ -1,12 +1,13 @@ -package org.baeldung.test; +package com.baeldung.test; -import org.baeldung.config.ResourceServerApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.junit4.SpringRunner; +import com.baeldung.config.ResourceServerApplication; + @RunWith(SpringRunner.class) @SpringBootTest(classes = ResourceServerApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class ResourceServerIntegrationTest { diff --git a/oauth-ui-authorization-code-angular/pom.xml b/oauth-ui-authorization-code-angular/pom.xml index 30f48edd7..738995054 100644 --- a/oauth-ui-authorization-code-angular/pom.xml +++ b/oauth-ui-authorization-code-angular/pom.xml @@ -8,7 +8,7 @@ war - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 676bab8ae..e8aa08d10 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.baeldung + com.baeldung spring-security-oauth 1.0.0-SNAPSHOT