diff --git a/pom.xml b/pom.xml index a9d66d0546..63d4e04291 100644 --- a/pom.xml +++ b/pom.xml @@ -630,7 +630,7 @@ spring-boot-performance spring-boot-properties - spring-security-kerberos + spring-security-modules/spring-security-kerberos oauth2-framework-impl spring-boot-nashorn @@ -817,29 +817,28 @@ spring-resttemplate spring-roo spring-scheduling - spring-security-acl - spring-security-angular/server - spring-security-cache-control - - spring-security-core - spring-security-mvc-boot - spring-security-mvc-custom - spring-security-mvc-digest-auth - spring-security-mvc-jsonview - spring-security-mvc-ldap - spring-security-mvc-login - spring-security-mvc-persisted-remember-me - spring-security-mvc - spring-security-mvc-socket - spring-security-openid + spring-security-modules/spring-security-acl + spring-security-modules/spring-security-angular/server + spring-security-modules/spring-security-cache-control + spring-security-modules/spring-security-core + spring-security-modules/spring-security-mvc + spring-security-modules/spring-security-mvc-boot + spring-security-modules/spring-security-mvc-custom + spring-security-modules/spring-security-mvc-digest-auth + spring-security-modules/spring-security-mvc-jsonview + spring-security-modules/spring-security-mvc-ldap + spring-security-modules/spring-security-mvc-login + spring-security-modules/spring-security-mvc-persisted-remember-me + spring-security-modules/spring-security-mvc-socket + spring-security-modules/spring-security-openid - spring-security-rest - spring-security-rest-basic-auth - spring-security-rest-custom - spring-security-sso - spring-security-stormpath - spring-security-thymeleaf - spring-security-x509 + spring-security-modules/spring-security-rest + spring-security-modules/spring-security-rest-basic-auth + spring-security-modules/spring-security-rest-custom + spring-security-modules/spring-security-sso + spring-security-modules/spring-security-stormpath + spring-security-modules/spring-security-thymeleaf + spring-security-modules/spring-security-x509 spring-session spring-shell spring-sleuth @@ -881,7 +880,7 @@ tensorflow-java spring-boot-flowable - spring-security-kerberos + spring-security-modules/spring-security-kerberos spring-boot-nashorn java-blockchain @@ -1424,27 +1423,27 @@ spring-roo spring-scheduling - spring-security-acl - spring-security-angular/server - spring-security-cache-control - spring-security-core - spring-security-mvc-boot - spring-security-mvc-custom - spring-security-mvc-digest-auth - spring-security-mvc-ldap - spring-security-mvc-login - spring-security-mvc-persisted-remember-me - spring-security-mvc - spring-security-mvc-socket - spring-security-openid + spring-security-modules/spring-security-acl + spring-security-modules/spring-security-angular/server + spring-security-modules/spring-security-cache-control + spring-security-modules/spring-security-core + spring-security-modules/spring-security-mvc + spring-security-modules/spring-security-mvc-boot + spring-security-modules/spring-security-mvc-custom + spring-security-modules/spring-security-mvc-digest-auth + spring-security-modules/spring-security-mvc-ldap + spring-security-modules/spring-security-mvc-login + spring-security-modules/spring-security-mvc-persisted-remember-me + spring-security-modules/spring-security-mvc-socket + spring-security-modules/spring-security-openid - spring-security-rest - spring-security-rest-basic-auth - spring-security-rest-custom - spring-security-sso - spring-security-stormpath - spring-security-thymeleaf - spring-security-x509 + spring-security-modules/spring-security-rest + spring-security-modules/spring-security-rest-basic-auth + spring-security-modules/spring-security-rest-custom + spring-security-modules/spring-security-sso + spring-security-modules/spring-security-stormpath + spring-security-modules/spring-security-thymeleaf + spring-security-modules/spring-security-x509 spring-session spring-shell spring-sleuth diff --git a/spring-security-acl/README.md b/spring-security-modules/spring-security-acl/README.md similarity index 100% rename from spring-security-acl/README.md rename to spring-security-modules/spring-security-acl/README.md diff --git a/spring-security-acl/pom.xml b/spring-security-modules/spring-security-acl/pom.xml similarity index 97% rename from spring-security-acl/pom.xml rename to spring-security-modules/spring-security-acl/pom.xml index 8962c137a8..3c613f9d92 100644 --- a/spring-security-acl/pom.xml +++ b/spring-security-modules/spring-security-acl/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-security-acl/src/main/java/org/baeldung/acl/Application.java b/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/Application.java similarity index 100% rename from spring-security-acl/src/main/java/org/baeldung/acl/Application.java rename to spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/Application.java diff --git a/spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java b/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java similarity index 100% rename from spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java rename to spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/ACLContext.java diff --git a/spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java b/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java similarity index 100% rename from spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java rename to spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/AclMethodSecurityConfiguration.java diff --git a/spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java b/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java similarity index 100% rename from spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java rename to spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/config/JPAPersistenceConfig.java diff --git a/spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java b/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java similarity index 100% rename from spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java rename to spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/dao/NoticeMessageRepository.java diff --git a/spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java b/spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java similarity index 100% rename from spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java rename to spring-security-modules/spring-security-acl/src/main/java/org/baeldung/acl/persistence/entity/NoticeMessage.java diff --git a/spring-security-acl/src/main/resources/acl-data.sql b/spring-security-modules/spring-security-acl/src/main/resources/acl-data.sql similarity index 100% rename from spring-security-acl/src/main/resources/acl-data.sql rename to spring-security-modules/spring-security-acl/src/main/resources/acl-data.sql diff --git a/spring-security-acl/src/main/resources/acl-schema.sql b/spring-security-modules/spring-security-acl/src/main/resources/acl-schema.sql similarity index 100% rename from spring-security-acl/src/main/resources/acl-schema.sql rename to spring-security-modules/spring-security-acl/src/main/resources/acl-schema.sql diff --git a/spring-security-acl/src/main/resources/logback.xml b/spring-security-modules/spring-security-acl/src/main/resources/logback.xml similarity index 100% rename from spring-security-acl/src/main/resources/logback.xml rename to spring-security-modules/spring-security-acl/src/main/resources/logback.xml diff --git a/spring-security-acl/src/main/resources/org.baeldung.acl.datasource.properties b/spring-security-modules/spring-security-acl/src/main/resources/org.baeldung.acl.datasource.properties similarity index 100% rename from spring-security-acl/src/main/resources/org.baeldung.acl.datasource.properties rename to spring-security-modules/spring-security-acl/src/main/resources/org.baeldung.acl.datasource.properties diff --git a/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-acl/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java b/spring-security-modules/spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java similarity index 100% rename from spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java rename to spring-security-modules/spring-security-acl/src/test/java/org/baeldung/acl/SpringACLIntegrationTest.java diff --git a/spring-security-angular/README.md b/spring-security-modules/spring-security-angular/README.md similarity index 100% rename from spring-security-angular/README.md rename to spring-security-modules/spring-security-angular/README.md diff --git a/spring-security-angular/client/anguarjs/app.js b/spring-security-modules/spring-security-angular/client/anguarjs/app.js similarity index 100% rename from spring-security-angular/client/anguarjs/app.js rename to spring-security-modules/spring-security-angular/client/anguarjs/app.js diff --git a/spring-security-angular/client/anguarjs/home/home.controller.js b/spring-security-modules/spring-security-angular/client/anguarjs/home/home.controller.js similarity index 100% rename from spring-security-angular/client/anguarjs/home/home.controller.js rename to spring-security-modules/spring-security-angular/client/anguarjs/home/home.controller.js diff --git a/spring-security-angular/client/anguarjs/home/home.view.html b/spring-security-modules/spring-security-angular/client/anguarjs/home/home.view.html similarity index 100% rename from spring-security-angular/client/anguarjs/home/home.view.html rename to spring-security-modules/spring-security-angular/client/anguarjs/home/home.view.html diff --git a/spring-security-angular/client/anguarjs/index.html b/spring-security-modules/spring-security-angular/client/anguarjs/index.html similarity index 100% rename from spring-security-angular/client/anguarjs/index.html rename to spring-security-modules/spring-security-angular/client/anguarjs/index.html diff --git a/spring-security-angular/client/anguarjs/login/login.controller.js b/spring-security-modules/spring-security-angular/client/anguarjs/login/login.controller.js similarity index 100% rename from spring-security-angular/client/anguarjs/login/login.controller.js rename to spring-security-modules/spring-security-angular/client/anguarjs/login/login.controller.js diff --git a/spring-security-angular/client/anguarjs/login/login.view.html b/spring-security-modules/spring-security-angular/client/anguarjs/login/login.view.html similarity index 100% rename from spring-security-angular/client/anguarjs/login/login.view.html rename to spring-security-modules/spring-security-angular/client/anguarjs/login/login.view.html diff --git a/spring-security-angular/client/angular2/app.css b/spring-security-modules/spring-security-angular/client/angular2/app.css similarity index 100% rename from spring-security-angular/client/angular2/app.css rename to spring-security-modules/spring-security-angular/client/angular2/app.css diff --git a/spring-security-angular/client/angular2/app/app.component.html b/spring-security-modules/spring-security-angular/client/angular2/app/app.component.html similarity index 100% rename from spring-security-angular/client/angular2/app/app.component.html rename to spring-security-modules/spring-security-angular/client/angular2/app/app.component.html diff --git a/spring-security-angular/client/angular2/app/app.component.ts b/spring-security-modules/spring-security-angular/client/angular2/app/app.component.ts similarity index 100% rename from spring-security-angular/client/angular2/app/app.component.ts rename to spring-security-modules/spring-security-angular/client/angular2/app/app.component.ts diff --git a/spring-security-angular/client/angular2/app/app.module.ts b/spring-security-modules/spring-security-angular/client/angular2/app/app.module.ts similarity index 100% rename from spring-security-angular/client/angular2/app/app.module.ts rename to spring-security-modules/spring-security-angular/client/angular2/app/app.module.ts diff --git a/spring-security-angular/client/angular2/app/app.routing.ts b/spring-security-modules/spring-security-angular/client/angular2/app/app.routing.ts similarity index 100% rename from spring-security-angular/client/angular2/app/app.routing.ts rename to spring-security-modules/spring-security-angular/client/angular2/app/app.routing.ts diff --git a/spring-security-angular/client/angular2/app/home/home.component.html b/spring-security-modules/spring-security-angular/client/angular2/app/home/home.component.html similarity index 100% rename from spring-security-angular/client/angular2/app/home/home.component.html rename to spring-security-modules/spring-security-angular/client/angular2/app/home/home.component.html diff --git a/spring-security-angular/client/angular2/app/home/home.component.ts b/spring-security-modules/spring-security-angular/client/angular2/app/home/home.component.ts similarity index 100% rename from spring-security-angular/client/angular2/app/home/home.component.ts rename to spring-security-modules/spring-security-angular/client/angular2/app/home/home.component.ts diff --git a/spring-security-angular/client/angular2/app/login/login.component.html b/spring-security-modules/spring-security-angular/client/angular2/app/login/login.component.html similarity index 100% rename from spring-security-angular/client/angular2/app/login/login.component.html rename to spring-security-modules/spring-security-angular/client/angular2/app/login/login.component.html diff --git a/spring-security-angular/client/angular2/app/login/login.component.ts b/spring-security-modules/spring-security-angular/client/angular2/app/login/login.component.ts similarity index 100% rename from spring-security-angular/client/angular2/app/login/login.component.ts rename to spring-security-modules/spring-security-angular/client/angular2/app/login/login.component.ts diff --git a/spring-security-angular/client/angular2/app/main.ts b/spring-security-modules/spring-security-angular/client/angular2/app/main.ts similarity index 100% rename from spring-security-angular/client/angular2/app/main.ts rename to spring-security-modules/spring-security-angular/client/angular2/app/main.ts diff --git a/spring-security-angular/client/angular2/index.html b/spring-security-modules/spring-security-angular/client/angular2/index.html similarity index 100% rename from spring-security-angular/client/angular2/index.html rename to spring-security-modules/spring-security-angular/client/angular2/index.html diff --git a/spring-security-angular/client/angular2/package.json b/spring-security-modules/spring-security-angular/client/angular2/package.json similarity index 100% rename from spring-security-angular/client/angular2/package.json rename to spring-security-modules/spring-security-angular/client/angular2/package.json diff --git a/spring-security-angular/client/angular2/systemjs.config.js b/spring-security-modules/spring-security-angular/client/angular2/systemjs.config.js similarity index 100% rename from spring-security-angular/client/angular2/systemjs.config.js rename to spring-security-modules/spring-security-angular/client/angular2/systemjs.config.js diff --git a/spring-security-angular/client/angular2/tsconfig.json b/spring-security-modules/spring-security-angular/client/angular2/tsconfig.json similarity index 100% rename from spring-security-angular/client/angular2/tsconfig.json rename to spring-security-modules/spring-security-angular/client/angular2/tsconfig.json diff --git a/spring-security-angular/client/angular4/.angular-cli.json b/spring-security-modules/spring-security-angular/client/angular4/.angular-cli.json similarity index 95% rename from spring-security-angular/client/angular4/.angular-cli.json rename to spring-security-modules/spring-security-angular/client/angular4/.angular-cli.json index 967934b2f7..34274db4eb 100644 --- a/spring-security-angular/client/angular4/.angular-cli.json +++ b/spring-security-modules/spring-security-angular/client/angular4/.angular-cli.json @@ -1,65 +1,65 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "angular-crud" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - "styles": [ - "../node_modules/bootstrap/dist/css/bootstrap.min.css", - "styles.css", - "../node_modules/font-awesome/css/font-awesome.min.css" - ], - "scripts": [ - "../node_modules/jquery/dist/jquery.js", - "../node_modules/bootstrap/dist/js/bootstrap.js" - ], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, - { - "project": "src/tsconfig.spec.json", - "exclude": "**/node_modules/**" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "angular-crud" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.ico" + ], + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", + "prefix": "app", + "styles": [ + "../node_modules/bootstrap/dist/css/bootstrap.min.css", + "styles.css", + "../node_modules/font-awesome/css/font-awesome.min.css" + ], + "scripts": [ + "../node_modules/jquery/dist/jquery.js", + "../node_modules/bootstrap/dist/js/bootstrap.js" + ], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "lint": [ + { + "project": "src/tsconfig.app.json", + "exclude": "**/node_modules/**" + }, + { + "project": "src/tsconfig.spec.json", + "exclude": "**/node_modules/**" + }, + { + "project": "e2e/tsconfig.e2e.json", + "exclude": "**/node_modules/**" + } + ], + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "component": {} + } } \ No newline at end of file diff --git a/spring-security-angular/client/angular4/package.json b/spring-security-modules/spring-security-angular/client/angular4/package.json similarity index 100% rename from spring-security-angular/client/angular4/package.json rename to spring-security-modules/spring-security-angular/client/angular4/package.json diff --git a/spring-security-angular/client/angular4/src/app/app.component.html b/spring-security-modules/spring-security-angular/client/angular4/src/app/app.component.html similarity index 100% rename from spring-security-angular/client/angular4/src/app/app.component.html rename to spring-security-modules/spring-security-angular/client/angular4/src/app/app.component.html diff --git a/spring-security-angular/client/angular4/src/app/app.component.ts b/spring-security-modules/spring-security-angular/client/angular4/src/app/app.component.ts similarity index 100% rename from spring-security-angular/client/angular4/src/app/app.component.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/app/app.component.ts diff --git a/spring-security-angular/client/angular4/src/app/app.module.ts b/spring-security-modules/spring-security-angular/client/angular4/src/app/app.module.ts similarity index 100% rename from spring-security-angular/client/angular4/src/app/app.module.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/app/app.module.ts diff --git a/spring-security-angular/client/angular4/src/app/app.routing.ts b/spring-security-modules/spring-security-angular/client/angular4/src/app/app.routing.ts similarity index 100% rename from spring-security-angular/client/angular4/src/app/app.routing.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/app/app.routing.ts diff --git a/spring-security-angular/client/angular4/src/app/home/home.component.html b/spring-security-modules/spring-security-angular/client/angular4/src/app/home/home.component.html similarity index 100% rename from spring-security-angular/client/angular4/src/app/home/home.component.html rename to spring-security-modules/spring-security-angular/client/angular4/src/app/home/home.component.html diff --git a/spring-security-angular/client/angular4/src/app/home/home.component.ts b/spring-security-modules/spring-security-angular/client/angular4/src/app/home/home.component.ts similarity index 100% rename from spring-security-angular/client/angular4/src/app/home/home.component.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/app/home/home.component.ts diff --git a/spring-security-angular/client/angular4/src/app/login/login.component.html b/spring-security-modules/spring-security-angular/client/angular4/src/app/login/login.component.html similarity index 100% rename from spring-security-angular/client/angular4/src/app/login/login.component.html rename to spring-security-modules/spring-security-angular/client/angular4/src/app/login/login.component.html diff --git a/spring-security-angular/client/angular4/src/app/login/login.component.ts b/spring-security-modules/spring-security-angular/client/angular4/src/app/login/login.component.ts similarity index 100% rename from spring-security-angular/client/angular4/src/app/login/login.component.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/app/login/login.component.ts diff --git a/spring-security-angular/client/angular4/src/index.html b/spring-security-modules/spring-security-angular/client/angular4/src/index.html similarity index 100% rename from spring-security-angular/client/angular4/src/index.html rename to spring-security-modules/spring-security-angular/client/angular4/src/index.html diff --git a/spring-security-angular/client/angular4/src/main.ts b/spring-security-modules/spring-security-angular/client/angular4/src/main.ts similarity index 100% rename from spring-security-angular/client/angular4/src/main.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/main.ts diff --git a/spring-security-angular/client/angular4/src/polyfills.ts b/spring-security-modules/spring-security-angular/client/angular4/src/polyfills.ts similarity index 97% rename from spring-security-angular/client/angular4/src/polyfills.ts rename to spring-security-modules/spring-security-angular/client/angular4/src/polyfills.ts index a4984ced57..ec50a75aeb 100644 --- a/spring-security-angular/client/angular4/src/polyfills.ts +++ b/spring-security-modules/spring-security-angular/client/angular4/src/polyfills.ts @@ -1,68 +1,68 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. -/** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; - - -/** - * Required to support Web Animations `@angular/animation`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - -/*************************************************************************************************** - * Zone JS is required by Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. +/** Evergreen browsers require these. **/ +import 'core-js/es6/reflect'; +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/animation`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + +/*************************************************************************************************** + * Zone JS is required by Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. +/** + * Need to import at least one locale-data with intl. + */ // import 'intl/locale-data/jsonp/en'; \ No newline at end of file diff --git a/spring-security-angular/client/angular4/src/styles.css b/spring-security-modules/spring-security-angular/client/angular4/src/styles.css similarity index 100% rename from spring-security-angular/client/angular4/src/styles.css rename to spring-security-modules/spring-security-angular/client/angular4/src/styles.css diff --git a/spring-security-angular/client/angular4/src/tsconfig.app.json b/spring-security-modules/spring-security-angular/client/angular4/src/tsconfig.app.json similarity index 100% rename from spring-security-angular/client/angular4/src/tsconfig.app.json rename to spring-security-modules/spring-security-angular/client/angular4/src/tsconfig.app.json diff --git a/spring-security-angular/client/angular4/tsconfig.json b/spring-security-modules/spring-security-angular/client/angular4/tsconfig.json similarity index 100% rename from spring-security-angular/client/angular4/tsconfig.json rename to spring-security-modules/spring-security-angular/client/angular4/tsconfig.json diff --git a/spring-security-angular/client/angular4/tslint.json b/spring-security-modules/spring-security-angular/client/angular4/tslint.json similarity index 100% rename from spring-security-angular/client/angular4/tslint.json rename to spring-security-modules/spring-security-angular/client/angular4/tslint.json diff --git a/spring-security-angular/client/angular5/.angular-cli.json b/spring-security-modules/spring-security-angular/client/angular5/.angular-cli.json similarity index 100% rename from spring-security-angular/client/angular5/.angular-cli.json rename to spring-security-modules/spring-security-angular/client/angular5/.angular-cli.json diff --git a/spring-security-angular/client/angular5/package.json b/spring-security-modules/spring-security-angular/client/angular5/package.json similarity index 100% rename from spring-security-angular/client/angular5/package.json rename to spring-security-modules/spring-security-angular/client/angular5/package.json diff --git a/spring-security-angular/client/angular5/src/app/app.component.html b/spring-security-modules/spring-security-angular/client/angular5/src/app/app.component.html similarity index 100% rename from spring-security-angular/client/angular5/src/app/app.component.html rename to spring-security-modules/spring-security-angular/client/angular5/src/app/app.component.html diff --git a/spring-security-angular/client/angular5/src/app/app.component.ts b/spring-security-modules/spring-security-angular/client/angular5/src/app/app.component.ts similarity index 100% rename from spring-security-angular/client/angular5/src/app/app.component.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/app/app.component.ts diff --git a/spring-security-angular/client/angular5/src/app/app.module.ts b/spring-security-modules/spring-security-angular/client/angular5/src/app/app.module.ts similarity index 100% rename from spring-security-angular/client/angular5/src/app/app.module.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/app/app.module.ts diff --git a/spring-security-angular/client/angular5/src/app/app.routing.ts b/spring-security-modules/spring-security-angular/client/angular5/src/app/app.routing.ts similarity index 100% rename from spring-security-angular/client/angular5/src/app/app.routing.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/app/app.routing.ts diff --git a/spring-security-angular/client/angular5/src/app/home/home.component.html b/spring-security-modules/spring-security-angular/client/angular5/src/app/home/home.component.html similarity index 100% rename from spring-security-angular/client/angular5/src/app/home/home.component.html rename to spring-security-modules/spring-security-angular/client/angular5/src/app/home/home.component.html diff --git a/spring-security-angular/client/angular5/src/app/home/home.component.ts b/spring-security-modules/spring-security-angular/client/angular5/src/app/home/home.component.ts similarity index 100% rename from spring-security-angular/client/angular5/src/app/home/home.component.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/app/home/home.component.ts diff --git a/spring-security-angular/client/angular5/src/app/login/login.component.html b/spring-security-modules/spring-security-angular/client/angular5/src/app/login/login.component.html similarity index 100% rename from spring-security-angular/client/angular5/src/app/login/login.component.html rename to spring-security-modules/spring-security-angular/client/angular5/src/app/login/login.component.html diff --git a/spring-security-angular/client/angular5/src/app/login/login.component.ts b/spring-security-modules/spring-security-angular/client/angular5/src/app/login/login.component.ts similarity index 100% rename from spring-security-angular/client/angular5/src/app/login/login.component.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/app/login/login.component.ts diff --git a/spring-security-angular/client/angular5/src/index.html b/spring-security-modules/spring-security-angular/client/angular5/src/index.html similarity index 100% rename from spring-security-angular/client/angular5/src/index.html rename to spring-security-modules/spring-security-angular/client/angular5/src/index.html diff --git a/spring-security-angular/client/angular5/src/main.ts b/spring-security-modules/spring-security-angular/client/angular5/src/main.ts similarity index 100% rename from spring-security-angular/client/angular5/src/main.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/main.ts diff --git a/spring-security-angular/client/angular5/src/polyfills.ts b/spring-security-modules/spring-security-angular/client/angular5/src/polyfills.ts similarity index 97% rename from spring-security-angular/client/angular5/src/polyfills.ts rename to spring-security-modules/spring-security-angular/client/angular5/src/polyfills.ts index a4984ced57..ec50a75aeb 100644 --- a/spring-security-angular/client/angular5/src/polyfills.ts +++ b/spring-security-modules/spring-security-angular/client/angular5/src/polyfills.ts @@ -1,68 +1,68 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. -/** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; - - -/** - * Required to support Web Animations `@angular/animation`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - -/*************************************************************************************************** - * Zone JS is required by Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. +/** Evergreen browsers require these. **/ +import 'core-js/es6/reflect'; +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/animation`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + +/*************************************************************************************************** + * Zone JS is required by Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. +/** + * Need to import at least one locale-data with intl. + */ // import 'intl/locale-data/jsonp/en'; \ No newline at end of file diff --git a/spring-security-angular/client/angular5/src/styles.css b/spring-security-modules/spring-security-angular/client/angular5/src/styles.css similarity index 100% rename from spring-security-angular/client/angular5/src/styles.css rename to spring-security-modules/spring-security-angular/client/angular5/src/styles.css diff --git a/spring-security-angular/client/angular5/src/tsconfig.app.json b/spring-security-modules/spring-security-angular/client/angular5/src/tsconfig.app.json similarity index 100% rename from spring-security-angular/client/angular5/src/tsconfig.app.json rename to spring-security-modules/spring-security-angular/client/angular5/src/tsconfig.app.json diff --git a/spring-security-angular/client/angular5/tsconfig.json b/spring-security-modules/spring-security-angular/client/angular5/tsconfig.json similarity index 100% rename from spring-security-angular/client/angular5/tsconfig.json rename to spring-security-modules/spring-security-angular/client/angular5/tsconfig.json diff --git a/spring-security-angular/client/angular5/tslint.json b/spring-security-modules/spring-security-angular/client/angular5/tslint.json similarity index 100% rename from spring-security-angular/client/angular5/tslint.json rename to spring-security-modules/spring-security-angular/client/angular5/tslint.json diff --git a/spring-security-angular/client/angular6/angular.json b/spring-security-modules/spring-security-angular/client/angular6/angular.json similarity index 100% rename from spring-security-angular/client/angular6/angular.json rename to spring-security-modules/spring-security-angular/client/angular6/angular.json diff --git a/spring-security-angular/client/angular6/package.json b/spring-security-modules/spring-security-angular/client/angular6/package.json similarity index 100% rename from spring-security-angular/client/angular6/package.json rename to spring-security-modules/spring-security-angular/client/angular6/package.json diff --git a/spring-security-angular/client/angular6/src/app/app.component.html b/spring-security-modules/spring-security-angular/client/angular6/src/app/app.component.html similarity index 100% rename from spring-security-angular/client/angular6/src/app/app.component.html rename to spring-security-modules/spring-security-angular/client/angular6/src/app/app.component.html diff --git a/spring-security-angular/client/angular6/src/app/app.component.ts b/spring-security-modules/spring-security-angular/client/angular6/src/app/app.component.ts similarity index 100% rename from spring-security-angular/client/angular6/src/app/app.component.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/app/app.component.ts diff --git a/spring-security-angular/client/angular6/src/app/app.module.ts b/spring-security-modules/spring-security-angular/client/angular6/src/app/app.module.ts similarity index 100% rename from spring-security-angular/client/angular6/src/app/app.module.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/app/app.module.ts diff --git a/spring-security-angular/client/angular6/src/app/app.routing.ts b/spring-security-modules/spring-security-angular/client/angular6/src/app/app.routing.ts similarity index 100% rename from spring-security-angular/client/angular6/src/app/app.routing.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/app/app.routing.ts diff --git a/spring-security-angular/client/angular6/src/app/home/home.component.html b/spring-security-modules/spring-security-angular/client/angular6/src/app/home/home.component.html similarity index 100% rename from spring-security-angular/client/angular6/src/app/home/home.component.html rename to spring-security-modules/spring-security-angular/client/angular6/src/app/home/home.component.html diff --git a/spring-security-angular/client/angular6/src/app/home/home.component.ts b/spring-security-modules/spring-security-angular/client/angular6/src/app/home/home.component.ts similarity index 100% rename from spring-security-angular/client/angular6/src/app/home/home.component.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/app/home/home.component.ts diff --git a/spring-security-angular/client/angular6/src/app/login/login.component.html b/spring-security-modules/spring-security-angular/client/angular6/src/app/login/login.component.html similarity index 100% rename from spring-security-angular/client/angular6/src/app/login/login.component.html rename to spring-security-modules/spring-security-angular/client/angular6/src/app/login/login.component.html diff --git a/spring-security-angular/client/angular6/src/app/login/login.component.ts b/spring-security-modules/spring-security-angular/client/angular6/src/app/login/login.component.ts similarity index 100% rename from spring-security-angular/client/angular6/src/app/login/login.component.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/app/login/login.component.ts diff --git a/spring-security-angular/client/angular6/src/index.html b/spring-security-modules/spring-security-angular/client/angular6/src/index.html similarity index 100% rename from spring-security-angular/client/angular6/src/index.html rename to spring-security-modules/spring-security-angular/client/angular6/src/index.html diff --git a/spring-security-angular/client/angular6/src/main.ts b/spring-security-modules/spring-security-angular/client/angular6/src/main.ts similarity index 100% rename from spring-security-angular/client/angular6/src/main.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/main.ts diff --git a/spring-security-angular/client/angular6/src/polyfills.ts b/spring-security-modules/spring-security-angular/client/angular6/src/polyfills.ts similarity index 97% rename from spring-security-angular/client/angular6/src/polyfills.ts rename to spring-security-modules/spring-security-angular/client/angular6/src/polyfills.ts index a4984ced57..ec50a75aeb 100644 --- a/spring-security-angular/client/angular6/src/polyfills.ts +++ b/spring-security-modules/spring-security-angular/client/angular6/src/polyfills.ts @@ -1,68 +1,68 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. -/** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; - - -/** - * Required to support Web Animations `@angular/animation`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - -/*************************************************************************************************** - * Zone JS is required by Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. +/** Evergreen browsers require these. **/ +import 'core-js/es6/reflect'; +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/animation`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + +/*************************************************************************************************** + * Zone JS is required by Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. +/** + * Need to import at least one locale-data with intl. + */ // import 'intl/locale-data/jsonp/en'; \ No newline at end of file diff --git a/spring-security-angular/client/angular6/src/styles.css b/spring-security-modules/spring-security-angular/client/angular6/src/styles.css similarity index 100% rename from spring-security-angular/client/angular6/src/styles.css rename to spring-security-modules/spring-security-angular/client/angular6/src/styles.css diff --git a/spring-security-angular/client/angular6/src/tsconfig.app.json b/spring-security-modules/spring-security-angular/client/angular6/src/tsconfig.app.json similarity index 100% rename from spring-security-angular/client/angular6/src/tsconfig.app.json rename to spring-security-modules/spring-security-angular/client/angular6/src/tsconfig.app.json diff --git a/spring-security-angular/client/angular6/tsconfig.json b/spring-security-modules/spring-security-angular/client/angular6/tsconfig.json similarity index 100% rename from spring-security-angular/client/angular6/tsconfig.json rename to spring-security-modules/spring-security-angular/client/angular6/tsconfig.json diff --git a/spring-security-angular/client/angular6/tslint.json b/spring-security-modules/spring-security-angular/client/angular6/tslint.json similarity index 100% rename from spring-security-angular/client/angular6/tslint.json rename to spring-security-modules/spring-security-angular/client/angular6/tslint.json diff --git a/spring-security-angular/server/pom.xml b/spring-security-modules/spring-security-angular/server/pom.xml similarity index 98% rename from spring-security-angular/server/pom.xml rename to spring-security-modules/spring-security-angular/server/pom.xml index 2c2e5ab614..19d980062c 100644 --- a/spring-security-angular/server/pom.xml +++ b/spring-security-modules/spring-security-angular/server/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT - ../../ + ../../../ diff --git a/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java b/spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java similarity index 100% rename from spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java rename to spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java diff --git a/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java b/spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java similarity index 100% rename from spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java rename to spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java diff --git a/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java b/spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java similarity index 97% rename from spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java rename to spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java index ab66065b61..0eef4198a1 100644 --- a/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java +++ b/spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java @@ -1,29 +1,29 @@ -package com.baeldung.springbootsecurityrest.controller; - -import java.security.Principal; -import java.util.Base64; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import com.baeldung.springbootsecurityrest.vo.User; - -@RestController -@CrossOrigin -public class UserController { - - @RequestMapping("/login") - public boolean login(@RequestBody User user) { - return user.getUserName().equals("user") && user.getPassword().equals("password"); - } - - @RequestMapping("/user") - public Principal user(HttpServletRequest request) { - String authToken = request.getHeader("Authorization").substring("Basic".length()).trim(); - return () -> new String(Base64.getDecoder().decode(authToken)).split(":")[0]; - } -} +package com.baeldung.springbootsecurityrest.controller; + +import java.security.Principal; +import java.util.Base64; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.baeldung.springbootsecurityrest.vo.User; + +@RestController +@CrossOrigin +public class UserController { + + @RequestMapping("/login") + public boolean login(@RequestBody User user) { + return user.getUserName().equals("user") && user.getPassword().equals("password"); + } + + @RequestMapping("/user") + public Principal user(HttpServletRequest request) { + String authToken = request.getHeader("Authorization").substring("Basic".length()).trim(); + return () -> new String(Base64.getDecoder().decode(authToken)).split(":")[0]; + } +} diff --git a/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java b/spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java similarity index 94% rename from spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java rename to spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java index 0eda5ce9ec..52377ad741 100644 --- a/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java +++ b/spring-security-modules/spring-security-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java @@ -1,21 +1,21 @@ -package com.baeldung.springbootsecurityrest.vo; - - -public class User { - - private String userName; - private String password; - - public String getUserName() { - return userName; - } - public void setUserName(String userName) { - this.userName = userName; - } - public String getPassword() { - return password; - } - public void setPassword(String password) { - this.password = password; - } -} +package com.baeldung.springbootsecurityrest.vo; + + +public class User { + + private String userName; + private String password; + + public String getUserName() { + return userName; + } + public void setUserName(String userName) { + this.userName = userName; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } +} diff --git a/spring-security-angular/server/src/main/resources/application.properties b/spring-security-modules/spring-security-angular/server/src/main/resources/application.properties similarity index 100% rename from spring-security-angular/server/src/main/resources/application.properties rename to spring-security-modules/spring-security-angular/server/src/main/resources/application.properties diff --git a/spring-security-angular/server/src/main/resources/logback.xml b/spring-security-modules/spring-security-angular/server/src/main/resources/logback.xml similarity index 100% rename from spring-security-angular/server/src/main/resources/logback.xml rename to spring-security-modules/spring-security-angular/server/src/main/resources/logback.xml diff --git a/spring-security-angular/server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java b/spring-security-modules/spring-security-angular/server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java similarity index 100% rename from spring-security-angular/server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java rename to spring-security-modules/spring-security-angular/server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java diff --git a/spring-security-angular/server/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-angular/server/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-angular/server/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-angular/server/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-cache-control/README.md b/spring-security-modules/spring-security-cache-control/README.md similarity index 100% rename from spring-security-cache-control/README.md rename to spring-security-modules/spring-security-cache-control/README.md diff --git a/spring-security-cache-control/pom.xml b/spring-security-modules/spring-security-cache-control/pom.xml similarity index 97% rename from spring-security-cache-control/pom.xml rename to spring-security-modules/spring-security-cache-control/pom.xml index 2e018b68d9..ff96ae78dd 100644 --- a/spring-security-cache-control/pom.xml +++ b/spring-security-modules/spring-security-cache-control/pom.xml @@ -10,7 +10,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/AppRunner.java b/spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/AppRunner.java similarity index 100% rename from spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/AppRunner.java rename to spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/AppRunner.java diff --git a/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/ResourceEndpoint.java b/spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/ResourceEndpoint.java similarity index 100% rename from spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/ResourceEndpoint.java rename to spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/ResourceEndpoint.java diff --git a/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/config/SpringSecurityConfig.java b/spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/config/SpringSecurityConfig.java similarity index 100% rename from spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/config/SpringSecurityConfig.java rename to spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/config/SpringSecurityConfig.java diff --git a/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/TimestampDto.java b/spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/TimestampDto.java similarity index 100% rename from spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/TimestampDto.java rename to spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/TimestampDto.java diff --git a/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/UserDto.java b/spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/UserDto.java similarity index 100% rename from spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/UserDto.java rename to spring-security-modules/spring-security-cache-control/src/main/java/com/baeldung/cachecontrol/model/UserDto.java diff --git a/spring-security-cache-control/src/main/resources/logback.xml b/spring-security-modules/spring-security-cache-control/src/main/resources/logback.xml similarity index 100% rename from spring-security-cache-control/src/main/resources/logback.xml rename to spring-security-modules/spring-security-cache-control/src/main/resources/logback.xml diff --git a/spring-security-cache-control/src/test/java/com/baeldung/cachecontrol/ResourceEndpointIntegrationTest.java b/spring-security-modules/spring-security-cache-control/src/test/java/com/baeldung/cachecontrol/ResourceEndpointIntegrationTest.java similarity index 100% rename from spring-security-cache-control/src/test/java/com/baeldung/cachecontrol/ResourceEndpointIntegrationTest.java rename to spring-security-modules/spring-security-cache-control/src/test/java/com/baeldung/cachecontrol/ResourceEndpointIntegrationTest.java diff --git a/spring-security-cache-control/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-cache-control/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-cache-control/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-cache-control/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-core/.gitignore b/spring-security-modules/spring-security-core/.gitignore similarity index 100% rename from spring-security-core/.gitignore rename to spring-security-modules/spring-security-core/.gitignore diff --git a/spring-security-core/README.md b/spring-security-modules/spring-security-core/README.md similarity index 100% rename from spring-security-core/README.md rename to spring-security-modules/spring-security-core/README.md diff --git a/spring-security-core/pom.xml b/spring-security-modules/spring-security-core/pom.xml similarity index 98% rename from spring-security-core/pom.xml rename to spring-security-modules/spring-security-core/pom.xml index 4a75983289..9f1e7cda29 100644 --- a/spring-security-core/pom.xml +++ b/spring-security-modules/spring-security-core/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-core/src/main/java/com/baeldung/app/App.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/app/App.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/app/App.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/app/App.java diff --git a/spring-security-core/src/main/java/com/baeldung/auditing/ExposeAttemptedPathAuthorizationAuditListener.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/auditing/ExposeAttemptedPathAuthorizationAuditListener.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/auditing/ExposeAttemptedPathAuthorizationAuditListener.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/auditing/ExposeAttemptedPathAuthorizationAuditListener.java diff --git a/spring-security-core/src/main/java/com/baeldung/auditing/LoginAttemptsLogger.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/auditing/LoginAttemptsLogger.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/auditing/LoginAttemptsLogger.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/auditing/LoginAttemptsLogger.java diff --git a/spring-security-core/src/main/java/com/baeldung/config/DatabaseLoader.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/config/DatabaseLoader.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/config/DatabaseLoader.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/config/DatabaseLoader.java diff --git a/spring-security-core/src/main/java/com/baeldung/config/WebSecurityConfig.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/config/WebSecurityConfig.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/config/WebSecurityConfig.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/config/WebSecurityConfig.java diff --git a/spring-security-core/src/main/java/com/baeldung/controller/TaskController.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/controller/TaskController.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/controller/TaskController.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/controller/TaskController.java diff --git a/spring-security-core/src/main/java/com/baeldung/entity/Task.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/entity/Task.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/entity/Task.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/entity/Task.java diff --git a/spring-security-core/src/main/java/com/baeldung/filter/CustomFilter.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/filter/CustomFilter.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/filter/CustomFilter.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/filter/CustomFilter.java diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/annotation/IsViewer.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/annotation/IsViewer.java similarity index 96% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/annotation/IsViewer.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/annotation/IsViewer.java index bde4456f8e..a7fa08ff30 100644 --- a/spring-security-core/src/main/java/com/baeldung/methodsecurity/annotation/IsViewer.java +++ b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/annotation/IsViewer.java @@ -1,14 +1,14 @@ -package com.baeldung.methodsecurity.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.springframework.security.access.prepost.PreAuthorize; - -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@PreAuthorize("hasRole('VIEWER')") -public @interface IsViewer { +package com.baeldung.methodsecurity.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.springframework.security.access.prepost.PreAuthorize; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@PreAuthorize("hasRole('VIEWER')") +public @interface IsViewer { } \ No newline at end of file diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/config/MethodSecurityConfig.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/config/MethodSecurityConfig.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/config/MethodSecurityConfig.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/config/MethodSecurityConfig.java diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/entity/CustomUser.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/entity/CustomUser.java similarity index 96% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/entity/CustomUser.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/entity/CustomUser.java index 7daaef5984..cce7dc5f75 100644 --- a/spring-security-core/src/main/java/com/baeldung/methodsecurity/entity/CustomUser.java +++ b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/entity/CustomUser.java @@ -1,30 +1,30 @@ -package com.baeldung.methodsecurity.entity; - -import java.util.Collection; - -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.userdetails.User; - -@SuppressWarnings("serial") -public class CustomUser extends User { - - private String nickName; - - public CustomUser(String username, String password, Collection authorities) { - super(username, password, authorities); - } - - public CustomUser(String username, String password, Collection authorities, String nickName) { - super(username, password, authorities); - this.nickName = nickName; - } - - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - -} +package com.baeldung.methodsecurity.entity; + +import java.util.Collection; + +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.User; + +@SuppressWarnings("serial") +public class CustomUser extends User { + + private String nickName; + + public CustomUser(String username, String password, Collection authorities) { + super(username, password, authorities); + } + + public CustomUser(String username, String password, Collection authorities, String nickName) { + super(username, password, authorities); + this.nickName = nickName; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + +} diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/repository/UserRoleRepository.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/repository/UserRoleRepository.java similarity index 97% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/repository/UserRoleRepository.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/repository/UserRoleRepository.java index eef39189a7..20a1f4e85c 100644 --- a/spring-security-core/src/main/java/com/baeldung/methodsecurity/repository/UserRoleRepository.java +++ b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/repository/UserRoleRepository.java @@ -1,58 +1,58 @@ -package com.baeldung.methodsecurity.repository; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; - -import com.baeldung.methodsecurity.entity.CustomUser; - -@Service -public class UserRoleRepository { - - static Map DB_BASED_USER_MAPPING; - - static { - DB_BASED_USER_MAPPING = new LinkedHashMap<>(); - DB_BASED_USER_MAPPING.put("jane", new CustomUser("jane", "1234", getGrantedAuthorities("ROLE_USER", "ROLE_VIEWER"), "jane")); - DB_BASED_USER_MAPPING.put("john", new CustomUser("john", "1234", getGrantedAuthorities("ROLE_EDITOR", "ROLE_ADMIN"), "jane")); - DB_BASED_USER_MAPPING.put("jack", new CustomUser("jack", "1234", getGrantedAuthorities("ROLE_USER", "ROLE_REVIEWER"), "jane")); - } - - private static List getGrantedAuthorities(String... roles) { - ArrayList authorities = new ArrayList<>(); - for (String role : roles) { - authorities.add(new SimpleGrantedAuthority(role)); - } - return authorities; - } - - public CustomUser loadUserByUserName(String username) { - if (DB_BASED_USER_MAPPING.containsKey(username)) { - return DB_BASED_USER_MAPPING.get(username); - } - throw new UsernameNotFoundException("User " + username + " cannot be found"); - } - - public boolean isValidUsername(String username) { - return DB_BASED_USER_MAPPING.containsKey(username); - } - - public boolean isValidRole(String roleName) { - return roleName.startsWith("ROLE_"); - } - - public List getAllUsernames() { - List usernames = new ArrayList<>(); - usernames.add("jane"); - usernames.add("john"); - usernames.add("jack"); - return usernames; - } - -} +package com.baeldung.methodsecurity.repository; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +import com.baeldung.methodsecurity.entity.CustomUser; + +@Service +public class UserRoleRepository { + + static Map DB_BASED_USER_MAPPING; + + static { + DB_BASED_USER_MAPPING = new LinkedHashMap<>(); + DB_BASED_USER_MAPPING.put("jane", new CustomUser("jane", "1234", getGrantedAuthorities("ROLE_USER", "ROLE_VIEWER"), "jane")); + DB_BASED_USER_MAPPING.put("john", new CustomUser("john", "1234", getGrantedAuthorities("ROLE_EDITOR", "ROLE_ADMIN"), "jane")); + DB_BASED_USER_MAPPING.put("jack", new CustomUser("jack", "1234", getGrantedAuthorities("ROLE_USER", "ROLE_REVIEWER"), "jane")); + } + + private static List getGrantedAuthorities(String... roles) { + ArrayList authorities = new ArrayList<>(); + for (String role : roles) { + authorities.add(new SimpleGrantedAuthority(role)); + } + return authorities; + } + + public CustomUser loadUserByUserName(String username) { + if (DB_BASED_USER_MAPPING.containsKey(username)) { + return DB_BASED_USER_MAPPING.get(username); + } + throw new UsernameNotFoundException("User " + username + " cannot be found"); + } + + public boolean isValidUsername(String username) { + return DB_BASED_USER_MAPPING.containsKey(username); + } + + public boolean isValidRole(String roleName) { + return roleName.startsWith("ROLE_"); + } + + public List getAllUsernames() { + List usernames = new ArrayList<>(); + usernames.add("jane"); + usernames.add("john"); + usernames.add("jack"); + return usernames; + } + +} diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/CustomUserDetailsService.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/CustomUserDetailsService.java similarity index 97% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/service/CustomUserDetailsService.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/CustomUserDetailsService.java index 685621b55f..e6828b32a1 100644 --- a/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/CustomUserDetailsService.java +++ b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/CustomUserDetailsService.java @@ -1,20 +1,20 @@ -package com.baeldung.methodsecurity.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.stereotype.Service; - -import com.baeldung.methodsecurity.repository.UserRoleRepository; - -@Service("userDetailService") -public class CustomUserDetailsService implements UserDetailsService { - - @Autowired - UserRoleRepository userRoleRepo; - - @Override - public UserDetails loadUserByUsername(String username) { - return userRoleRepo.loadUserByUserName(username); - } +package com.baeldung.methodsecurity.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.stereotype.Service; + +import com.baeldung.methodsecurity.repository.UserRoleRepository; + +@Service("userDetailService") +public class CustomUserDetailsService implements UserDetailsService { + + @Autowired + UserRoleRepository userRoleRepo; + + @Override + public UserDetails loadUserByUsername(String username) { + return userRoleRepo.loadUserByUserName(username); + } } \ No newline at end of file diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/SystemService.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/SystemService.java similarity index 95% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/service/SystemService.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/SystemService.java index 623d51d34f..7e60f701ad 100644 --- a/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/SystemService.java +++ b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/SystemService.java @@ -1,18 +1,18 @@ -package com.baeldung.methodsecurity.service; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.stereotype.Service; - -@Service -@PreAuthorize("hasRole('ROLE_ADMIN')") -public class SystemService { - - public String getSystemYear(){ - return "2017"; - } - - public String getSystemDate(){ - return "31-12-2017"; - } - -} +package com.baeldung.methodsecurity.service; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.stereotype.Service; + +@Service +@PreAuthorize("hasRole('ROLE_ADMIN')") +public class SystemService { + + public String getSystemYear(){ + return "2017"; + } + + public String getSystemDate(){ + return "31-12-2017"; + } + +} diff --git a/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/UserRoleService.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/UserRoleService.java similarity index 97% rename from spring-security-core/src/main/java/com/baeldung/methodsecurity/service/UserRoleService.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/UserRoleService.java index 4d090fd90c..1579044700 100644 --- a/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/UserRoleService.java +++ b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/methodsecurity/service/UserRoleService.java @@ -1,109 +1,109 @@ -package com.baeldung.methodsecurity.service; - -import java.util.List; -import java.util.stream.Collectors; - -import javax.annotation.security.RolesAllowed; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.annotation.Secured; -import org.springframework.security.access.prepost.PostAuthorize; -import org.springframework.security.access.prepost.PostFilter; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.security.access.prepost.PreFilter; -import org.springframework.security.core.context.SecurityContext; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.stereotype.Service; - -import com.baeldung.methodsecurity.annotation.IsViewer; -import com.baeldung.methodsecurity.entity.CustomUser; -import com.baeldung.methodsecurity.repository.UserRoleRepository; - -@Service -public class UserRoleService { - - @Autowired - UserRoleRepository userRoleRepository; - - @Secured("ROLE_VIEWER") - public String getUsername() { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return securityContext.getAuthentication().getName(); - } - - @Secured({ "ROLE_VIEWER", "ROLE_EDITOR" }) - public boolean isValidUsername(String username) { - return userRoleRepository.isValidUsername(username); - } - - @RolesAllowed("ROLE_VIEWER") - public String getUsername2() { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return securityContext.getAuthentication().getName(); - } - - @RolesAllowed({ "ROLE_VIEWER", "ROLE_EDITOR" }) - public boolean isValidUsername2(String username) { - return userRoleRepository.isValidUsername(username); - } - - @PreAuthorize("hasRole('ROLE_VIEWER')") - public String getUsernameInUpperCase() { - return getUsername().toUpperCase(); - } - - @PreAuthorize("hasAuthority('SYS_ADMIN')") - public String getUsernameLC() { - return getUsername().toLowerCase(); - } - - @PreAuthorize("hasRole('ROLE_VIEWER') or hasRole('ROLE_EDITOR')") - public boolean isValidUsername3(String username) { - return userRoleRepository.isValidUsername(username); - } - - @PreAuthorize("#username == authentication.principal.username") - public String getMyRoles(String username) { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return securityContext.getAuthentication().getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.joining(",")); - } - - @PostAuthorize("#username == authentication.principal.username") - public String getMyRoles2(String username) { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return securityContext.getAuthentication().getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.joining(",")); - } - - @PostAuthorize("returnObject.username == authentication.principal.nickName") - public CustomUser loadUserDetail(String username) { - return userRoleRepository.loadUserByUserName(username); - } - - @PreFilter("filterObject != authentication.principal.username") - public String joinUsernames(List usernames) { - return usernames.stream().collect(Collectors.joining(";")); - } - - @PreFilter(value = "filterObject != authentication.principal.username", filterTarget = "usernames") - public String joinUsernamesAndRoles(List usernames, List roles) { - return usernames.stream().collect(Collectors.joining(";")) + ":" + roles.stream().collect(Collectors.joining(";")); - } - - @PostFilter("filterObject != authentication.principal.username") - public List getAllUsernamesExceptCurrent() { - return userRoleRepository.getAllUsernames(); - } - - @IsViewer - public String getUsername4() { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return securityContext.getAuthentication().getName(); - } - - @PreAuthorize("#username == authentication.principal.username") - @PostAuthorize("returnObject.username == authentication.principal.nickName") - public CustomUser securedLoadUserDetail(String username) { - return userRoleRepository.loadUserByUserName(username); - } - -} +package com.baeldung.methodsecurity.service; + +import java.util.List; +import java.util.stream.Collectors; + +import javax.annotation.security.RolesAllowed; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.annotation.Secured; +import org.springframework.security.access.prepost.PostAuthorize; +import org.springframework.security.access.prepost.PostFilter; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.security.access.prepost.PreFilter; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Service; + +import com.baeldung.methodsecurity.annotation.IsViewer; +import com.baeldung.methodsecurity.entity.CustomUser; +import com.baeldung.methodsecurity.repository.UserRoleRepository; + +@Service +public class UserRoleService { + + @Autowired + UserRoleRepository userRoleRepository; + + @Secured("ROLE_VIEWER") + public String getUsername() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return securityContext.getAuthentication().getName(); + } + + @Secured({ "ROLE_VIEWER", "ROLE_EDITOR" }) + public boolean isValidUsername(String username) { + return userRoleRepository.isValidUsername(username); + } + + @RolesAllowed("ROLE_VIEWER") + public String getUsername2() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return securityContext.getAuthentication().getName(); + } + + @RolesAllowed({ "ROLE_VIEWER", "ROLE_EDITOR" }) + public boolean isValidUsername2(String username) { + return userRoleRepository.isValidUsername(username); + } + + @PreAuthorize("hasRole('ROLE_VIEWER')") + public String getUsernameInUpperCase() { + return getUsername().toUpperCase(); + } + + @PreAuthorize("hasAuthority('SYS_ADMIN')") + public String getUsernameLC() { + return getUsername().toLowerCase(); + } + + @PreAuthorize("hasRole('ROLE_VIEWER') or hasRole('ROLE_EDITOR')") + public boolean isValidUsername3(String username) { + return userRoleRepository.isValidUsername(username); + } + + @PreAuthorize("#username == authentication.principal.username") + public String getMyRoles(String username) { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return securityContext.getAuthentication().getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.joining(",")); + } + + @PostAuthorize("#username == authentication.principal.username") + public String getMyRoles2(String username) { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return securityContext.getAuthentication().getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.joining(",")); + } + + @PostAuthorize("returnObject.username == authentication.principal.nickName") + public CustomUser loadUserDetail(String username) { + return userRoleRepository.loadUserByUserName(username); + } + + @PreFilter("filterObject != authentication.principal.username") + public String joinUsernames(List usernames) { + return usernames.stream().collect(Collectors.joining(";")); + } + + @PreFilter(value = "filterObject != authentication.principal.username", filterTarget = "usernames") + public String joinUsernamesAndRoles(List usernames, List roles) { + return usernames.stream().collect(Collectors.joining(";")) + ":" + roles.stream().collect(Collectors.joining(";")); + } + + @PostFilter("filterObject != authentication.principal.username") + public List getAllUsernamesExceptCurrent() { + return userRoleRepository.getAllUsernames(); + } + + @IsViewer + public String getUsername4() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return securityContext.getAuthentication().getName(); + } + + @PreAuthorize("#username == authentication.principal.username") + @PostAuthorize("returnObject.username == authentication.principal.nickName") + public CustomUser securedLoadUserDetail(String username) { + return userRoleRepository.loadUserByUserName(username); + } + +} diff --git a/spring-security-core/src/main/java/com/baeldung/repository/TaskRepository.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/repository/TaskRepository.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/repository/TaskRepository.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/repository/TaskRepository.java diff --git a/spring-security-core/src/main/java/com/baeldung/service/TaskService.java b/spring-security-modules/spring-security-core/src/main/java/com/baeldung/service/TaskService.java similarity index 100% rename from spring-security-core/src/main/java/com/baeldung/service/TaskService.java rename to spring-security-modules/spring-security-core/src/main/java/com/baeldung/service/TaskService.java diff --git a/spring-security-core/src/main/resources/application.properties b/spring-security-modules/spring-security-core/src/main/resources/application.properties similarity index 100% rename from spring-security-core/src/main/resources/application.properties rename to spring-security-modules/spring-security-core/src/main/resources/application.properties diff --git a/spring-security-core/src/main/resources/logback.xml b/spring-security-modules/spring-security-core/src/main/resources/logback.xml similarity index 100% rename from spring-security-core/src/main/resources/logback.xml rename to spring-security-modules/spring-security-core/src/main/resources/logback.xml diff --git a/spring-security-core/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-core/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-core/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-core/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-core/src/test/java/com/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-core/src/test/java/com/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-security-core/src/test/java/com/baeldung/methodsecurity/ClassLevelSecurityIntegrationTest.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/ClassLevelSecurityIntegrationTest.java similarity index 97% rename from spring-security-core/src/test/java/com/baeldung/methodsecurity/ClassLevelSecurityIntegrationTest.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/ClassLevelSecurityIntegrationTest.java index 943bfda72c..d5ebdaa33b 100644 --- a/spring-security-core/src/test/java/com/baeldung/methodsecurity/ClassLevelSecurityIntegrationTest.java +++ b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/ClassLevelSecurityIntegrationTest.java @@ -1,50 +1,50 @@ -package com.baeldung.methodsecurity; - -import static org.junit.Assert.*; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.test.context.support.WithMockUser; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.methodsecurity.service.SystemService; - -@RunWith(SpringRunner.class) -@ContextConfiguration -public class ClassLevelSecurityIntegrationTest { - - @Autowired - SystemService systemService; - - @Configuration - @ComponentScan("com.baeldung.methodsecurity.*") - public static class SpringConfig { - - } - - @Test - @WithMockUser(username="john",roles={"ADMIN"}) - public void givenRoleAdmin_whenCallGetSystemYear_return2017(){ - String systemYear = systemService.getSystemYear(); - assertEquals("2017",systemYear); - } - - @Test(expected=AccessDeniedException.class) - @WithMockUser(username="john",roles={"VIEWER"}) - public void givenRoleViewer_whenCallGetSystemYear_returnAccessDenied(){ - String systemYear = systemService.getSystemYear(); - assertEquals("2017",systemYear); - } - - @Test - @WithMockUser(username="john",roles={"ADMIN"}) - public void givenRoleAdmin_whenCallGetSystemDate_returnDate(){ - String systemYear = systemService.getSystemDate(); - assertEquals("31-12-2017",systemYear); - } -} +package com.baeldung.methodsecurity; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import com.baeldung.methodsecurity.service.SystemService; + +@RunWith(SpringRunner.class) +@ContextConfiguration +public class ClassLevelSecurityIntegrationTest { + + @Autowired + SystemService systemService; + + @Configuration + @ComponentScan("com.baeldung.methodsecurity.*") + public static class SpringConfig { + + } + + @Test + @WithMockUser(username="john",roles={"ADMIN"}) + public void givenRoleAdmin_whenCallGetSystemYear_return2017(){ + String systemYear = systemService.getSystemYear(); + assertEquals("2017",systemYear); + } + + @Test(expected=AccessDeniedException.class) + @WithMockUser(username="john",roles={"VIEWER"}) + public void givenRoleViewer_whenCallGetSystemYear_returnAccessDenied(){ + String systemYear = systemService.getSystemYear(); + assertEquals("2017",systemYear); + } + + @Test + @WithMockUser(username="john",roles={"ADMIN"}) + public void givenRoleAdmin_whenCallGetSystemDate_returnDate(){ + String systemYear = systemService.getSystemDate(); + assertEquals("31-12-2017",systemYear); + } +} diff --git a/spring-security-core/src/test/java/com/baeldung/methodsecurity/MethodSecurityIntegrationTest.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/MethodSecurityIntegrationTest.java similarity index 97% rename from spring-security-core/src/test/java/com/baeldung/methodsecurity/MethodSecurityIntegrationTest.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/MethodSecurityIntegrationTest.java index 81b150f43e..0ad01d9954 100644 --- a/spring-security-core/src/test/java/com/baeldung/methodsecurity/MethodSecurityIntegrationTest.java +++ b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/MethodSecurityIntegrationTest.java @@ -1,177 +1,177 @@ -package com.baeldung.methodsecurity; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; -import org.springframework.security.test.context.support.WithAnonymousUser; -import org.springframework.security.test.context.support.WithMockUser; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.methodsecurity.service.UserRoleService; - -@RunWith(SpringRunner.class) -@ContextConfiguration -public class MethodSecurityIntegrationTest { - - @Autowired - UserRoleService userRoleService; - - @Configuration - @ComponentScan("com.baeldung.methodsecurity.*") - public static class SpringConfig { - - } - - @Test(expected = AuthenticationCredentialsNotFoundException.class) - public void givenNoSecurity_whenCallGetUsername_thenReturnException() { - String userName = userRoleService.getUsername(); - assertEquals("john", userName); - } - - @Test - @WithMockUser(username = "john", roles = { "VIEWER" }) - public void givenRoleViewer_whenCallGetUsername_thenReturnUsername() { - String userName = userRoleService.getUsername(); - assertEquals("john", userName); - } - - @Test - @WithMockUser(username = "john", roles = { "EDITOR" }) - public void givenUsernameJohn_whenCallIsValidUsername_thenReturnTrue() { - boolean isValid = userRoleService.isValidUsername("john"); - assertEquals(true, isValid); - } - - @Test(expected = AccessDeniedException.class) - @WithMockUser(username = "john", roles = { "ADMIN" }) - public void givenRoleAdmin_whenCallGetUsername_thenReturnAccessDenied() { - userRoleService.getUsername(); - } - - @Test(expected = AccessDeniedException.class) - @WithMockUser(username = "john", roles = { "USER" }) - public void givenRoleUser_whenCallGetUsername2_thenReturnAccessDenied() { - userRoleService.getUsername2(); - } - - @Test - @WithMockUser(username = "john", roles = { "VIEWER", "EDITOR" }) - public void givenRoleViewer_whenCallGetUsername2_thenReturnUsername() { - String userName = userRoleService.getUsername2(); - assertEquals("john", userName); - } - - @Test - @WithMockUser(username = "john", roles = { "VIEWER" }) - public void givenUsernameJerry_whenCallIsValidUsername2_thenReturnFalse() { - boolean isValid = userRoleService.isValidUsername2("jerry"); - assertEquals(false, isValid); - } - - @Test - @WithMockUser(username = "JOHN", authorities = { "SYS_ADMIN" }) - public void givenAuthoritySysAdmin_whenCallGetUsernameLC_thenReturnUsername() { - String username = userRoleService.getUsernameLC(); - assertEquals("john", username); - } - - @Test - @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) - public void givenUserJohn_whenCallGetMyRolesWithJohn_thenReturnRoles() { - String roles = userRoleService.getMyRoles("john"); - assertEquals("ROLE_ADMIN,ROLE_USER,ROLE_VIEWER", roles); - } - - @Test(expected = AccessDeniedException.class) - @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) - public void givenUserJane_whenCallGetMyRolesWithJane_thenAccessDenied() { - userRoleService.getMyRoles("jane"); - } - - @Test - @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) - public void givenUserJohn_whenCallGetMyRoles2WithJohn_thenReturnRoles() { - String roles = userRoleService.getMyRoles2("john"); - assertEquals("ROLE_ADMIN,ROLE_USER,ROLE_VIEWER", roles); - } - - @Test(expected = AccessDeniedException.class) - @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) - public void givenUserJane_whenCallGetMyRoles2WithJane_thenAccessDenied() { - userRoleService.getMyRoles2("jane"); - } - - @Test(expected = AccessDeniedException.class) - @WithAnonymousUser - public void givenAnomynousUser_whenCallGetUsername_thenAccessDenied() { - userRoleService.getUsername(); - } - - @Test - @WithMockJohnViewer - public void givenMockedJohnViewer_whenCallGetUsername_thenReturnUsername() { - String userName = userRoleService.getUsername(); - assertEquals("john", userName); - } - - @Test - @WithMockUser(username = "jane") - public void givenListContainCurrentUsername_whenJoinUsernames_thenReturnUsernames() { - List usernames = new ArrayList<>(); - usernames.add("jane"); - usernames.add("john"); - usernames.add("jack"); - String containCurrentUser = userRoleService.joinUsernames(usernames); - assertEquals("john;jack", containCurrentUser); - } - - @Test - @WithMockUser(username = "john") - public void givenListContainCurrentUsername_whenCallJoinUsernamesAndRoles_thenReturnUsernameAndRoles() { - List usernames = new ArrayList<>(); - usernames.add("jane"); - usernames.add("john"); - usernames.add("jack"); - - List roles = new ArrayList<>(); - roles.add("ROLE_ADMIN"); - roles.add("ROLE_TEST"); - - String containCurrentUser = userRoleService.joinUsernamesAndRoles(usernames, roles); - assertEquals("jane;jack:ROLE_ADMIN;ROLE_TEST", containCurrentUser); - } - - @Test - @WithMockUser(username = "john") - public void givenUserJohn_whenCallGetAllUsernamesExceptCurrent_thenReturnOtherusernames() { - List others = userRoleService.getAllUsernamesExceptCurrent(); - assertEquals(2, others.size()); - assertTrue(others.contains("jane")); - assertTrue(others.contains("jack")); - } - - @Test - @WithMockUser(username = "john", roles = { "VIEWER" }) - public void givenRoleViewer_whenCallGetUsername4_thenReturnUsername() { - String userName = userRoleService.getUsername4(); - assertEquals("john", userName); - } - - @Test(expected = AccessDeniedException.class) - @WithMockUser(username = "john") - public void givenDefaultRole_whenCallGetUsername4_thenAccessDenied() { - userRoleService.getUsername4(); - } - +package com.baeldung.methodsecurity; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; +import org.springframework.security.test.context.support.WithAnonymousUser; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import com.baeldung.methodsecurity.service.UserRoleService; + +@RunWith(SpringRunner.class) +@ContextConfiguration +public class MethodSecurityIntegrationTest { + + @Autowired + UserRoleService userRoleService; + + @Configuration + @ComponentScan("com.baeldung.methodsecurity.*") + public static class SpringConfig { + + } + + @Test(expected = AuthenticationCredentialsNotFoundException.class) + public void givenNoSecurity_whenCallGetUsername_thenReturnException() { + String userName = userRoleService.getUsername(); + assertEquals("john", userName); + } + + @Test + @WithMockUser(username = "john", roles = { "VIEWER" }) + public void givenRoleViewer_whenCallGetUsername_thenReturnUsername() { + String userName = userRoleService.getUsername(); + assertEquals("john", userName); + } + + @Test + @WithMockUser(username = "john", roles = { "EDITOR" }) + public void givenUsernameJohn_whenCallIsValidUsername_thenReturnTrue() { + boolean isValid = userRoleService.isValidUsername("john"); + assertEquals(true, isValid); + } + + @Test(expected = AccessDeniedException.class) + @WithMockUser(username = "john", roles = { "ADMIN" }) + public void givenRoleAdmin_whenCallGetUsername_thenReturnAccessDenied() { + userRoleService.getUsername(); + } + + @Test(expected = AccessDeniedException.class) + @WithMockUser(username = "john", roles = { "USER" }) + public void givenRoleUser_whenCallGetUsername2_thenReturnAccessDenied() { + userRoleService.getUsername2(); + } + + @Test + @WithMockUser(username = "john", roles = { "VIEWER", "EDITOR" }) + public void givenRoleViewer_whenCallGetUsername2_thenReturnUsername() { + String userName = userRoleService.getUsername2(); + assertEquals("john", userName); + } + + @Test + @WithMockUser(username = "john", roles = { "VIEWER" }) + public void givenUsernameJerry_whenCallIsValidUsername2_thenReturnFalse() { + boolean isValid = userRoleService.isValidUsername2("jerry"); + assertEquals(false, isValid); + } + + @Test + @WithMockUser(username = "JOHN", authorities = { "SYS_ADMIN" }) + public void givenAuthoritySysAdmin_whenCallGetUsernameLC_thenReturnUsername() { + String username = userRoleService.getUsernameLC(); + assertEquals("john", username); + } + + @Test + @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) + public void givenUserJohn_whenCallGetMyRolesWithJohn_thenReturnRoles() { + String roles = userRoleService.getMyRoles("john"); + assertEquals("ROLE_ADMIN,ROLE_USER,ROLE_VIEWER", roles); + } + + @Test(expected = AccessDeniedException.class) + @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) + public void givenUserJane_whenCallGetMyRolesWithJane_thenAccessDenied() { + userRoleService.getMyRoles("jane"); + } + + @Test + @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) + public void givenUserJohn_whenCallGetMyRoles2WithJohn_thenReturnRoles() { + String roles = userRoleService.getMyRoles2("john"); + assertEquals("ROLE_ADMIN,ROLE_USER,ROLE_VIEWER", roles); + } + + @Test(expected = AccessDeniedException.class) + @WithMockUser(username = "john", roles = { "ADMIN", "USER", "VIEWER" }) + public void givenUserJane_whenCallGetMyRoles2WithJane_thenAccessDenied() { + userRoleService.getMyRoles2("jane"); + } + + @Test(expected = AccessDeniedException.class) + @WithAnonymousUser + public void givenAnomynousUser_whenCallGetUsername_thenAccessDenied() { + userRoleService.getUsername(); + } + + @Test + @WithMockJohnViewer + public void givenMockedJohnViewer_whenCallGetUsername_thenReturnUsername() { + String userName = userRoleService.getUsername(); + assertEquals("john", userName); + } + + @Test + @WithMockUser(username = "jane") + public void givenListContainCurrentUsername_whenJoinUsernames_thenReturnUsernames() { + List usernames = new ArrayList<>(); + usernames.add("jane"); + usernames.add("john"); + usernames.add("jack"); + String containCurrentUser = userRoleService.joinUsernames(usernames); + assertEquals("john;jack", containCurrentUser); + } + + @Test + @WithMockUser(username = "john") + public void givenListContainCurrentUsername_whenCallJoinUsernamesAndRoles_thenReturnUsernameAndRoles() { + List usernames = new ArrayList<>(); + usernames.add("jane"); + usernames.add("john"); + usernames.add("jack"); + + List roles = new ArrayList<>(); + roles.add("ROLE_ADMIN"); + roles.add("ROLE_TEST"); + + String containCurrentUser = userRoleService.joinUsernamesAndRoles(usernames, roles); + assertEquals("jane;jack:ROLE_ADMIN;ROLE_TEST", containCurrentUser); + } + + @Test + @WithMockUser(username = "john") + public void givenUserJohn_whenCallGetAllUsernamesExceptCurrent_thenReturnOtherusernames() { + List others = userRoleService.getAllUsernamesExceptCurrent(); + assertEquals(2, others.size()); + assertTrue(others.contains("jane")); + assertTrue(others.contains("jack")); + } + + @Test + @WithMockUser(username = "john", roles = { "VIEWER" }) + public void givenRoleViewer_whenCallGetUsername4_thenReturnUsername() { + String userName = userRoleService.getUsername4(); + assertEquals("john", userName); + } + + @Test(expected = AccessDeniedException.class) + @WithMockUser(username = "john") + public void givenDefaultRole_whenCallGetUsername4_thenAccessDenied() { + userRoleService.getUsername4(); + } + } \ No newline at end of file diff --git a/spring-security-core/src/test/java/com/baeldung/methodsecurity/MockUserAtClassLevelIntegrationTest.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/MockUserAtClassLevelIntegrationTest.java similarity index 96% rename from spring-security-core/src/test/java/com/baeldung/methodsecurity/MockUserAtClassLevelIntegrationTest.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/MockUserAtClassLevelIntegrationTest.java index fead89f75a..e7a2a2c828 100644 --- a/spring-security-core/src/test/java/com/baeldung/methodsecurity/MockUserAtClassLevelIntegrationTest.java +++ b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/MockUserAtClassLevelIntegrationTest.java @@ -1,35 +1,35 @@ -package com.baeldung.methodsecurity; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.test.context.support.WithMockUser; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.methodsecurity.service.UserRoleService; - -@RunWith(SpringRunner.class) -@ContextConfiguration -@WithMockUser(username = "john", roles = { "VIEWER" }) -public class MockUserAtClassLevelIntegrationTest { - - @Test - public void givenRoleViewer_whenCallGetUsername_thenReturnUsername() { - String currentUserName = userService.getUsername(); - assertEquals("john", currentUserName); - } - - @Autowired - UserRoleService userService; - - @Configuration - @ComponentScan("com.baeldung.methodsecurity.*") - public static class SpringConfig { - - } -} +package com.baeldung.methodsecurity; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import com.baeldung.methodsecurity.service.UserRoleService; + +@RunWith(SpringRunner.class) +@ContextConfiguration +@WithMockUser(username = "john", roles = { "VIEWER" }) +public class MockUserAtClassLevelIntegrationTest { + + @Test + public void givenRoleViewer_whenCallGetUsername_thenReturnUsername() { + String currentUserName = userService.getUsername(); + assertEquals("john", currentUserName); + } + + @Autowired + UserRoleService userService; + + @Configuration + @ComponentScan("com.baeldung.methodsecurity.*") + public static class SpringConfig { + + } +} diff --git a/spring-security-core/src/test/java/com/baeldung/methodsecurity/UserDetailsIntegrationTest.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/UserDetailsIntegrationTest.java similarity index 97% rename from spring-security-core/src/test/java/com/baeldung/methodsecurity/UserDetailsIntegrationTest.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/UserDetailsIntegrationTest.java index d43a26a5ff..c1298b1124 100644 --- a/spring-security-core/src/test/java/com/baeldung/methodsecurity/UserDetailsIntegrationTest.java +++ b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/UserDetailsIntegrationTest.java @@ -1,57 +1,57 @@ -package com.baeldung.methodsecurity; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.test.context.support.WithUserDetails; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.methodsecurity.entity.CustomUser; -import com.baeldung.methodsecurity.service.UserRoleService; - -@RunWith(SpringRunner.class) -@ContextConfiguration -public class UserDetailsIntegrationTest { - - @Autowired - UserRoleService userService; - - @Configuration - @ComponentScan("com.baeldung.methodsecurity.*") - public static class SpringConfig { - - } - - @Test - @WithUserDetails(value = "john", userDetailsServiceBeanName = "userDetailService") - public void whenJohn_callLoadUserDetail_thenOK() { - CustomUser user = userService.loadUserDetail("jane"); - assertEquals("jane", user.getNickName()); - } - - @Test - @WithUserDetails(value = "jane", userDetailsServiceBeanName = "userDetailService") - public void givenJane_callSecuredLoadUserDetailWithJane_thenOK() { - CustomUser user = userService.securedLoadUserDetail("jane"); - assertEquals("jane", user.getNickName()); - assertEquals("jane", user.getUsername()); - } - - @Test(expected = AccessDeniedException.class) - @WithUserDetails(value = "john", userDetailsServiceBeanName = "userDetailService") - public void givenJohn_callSecuredLoadUserDetailWithJane_thenAccessDenied() { - userService.securedLoadUserDetail("jane"); - } - - @Test(expected = AccessDeniedException.class) - @WithUserDetails(value = "john", userDetailsServiceBeanName = "userDetailService") - public void givenJohn_callSecuredLoadUserDetailWithJohn_thenAccessDenied() { - userService.securedLoadUserDetail("john"); - } -} +package com.baeldung.methodsecurity; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.test.context.support.WithUserDetails; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import com.baeldung.methodsecurity.entity.CustomUser; +import com.baeldung.methodsecurity.service.UserRoleService; + +@RunWith(SpringRunner.class) +@ContextConfiguration +public class UserDetailsIntegrationTest { + + @Autowired + UserRoleService userService; + + @Configuration + @ComponentScan("com.baeldung.methodsecurity.*") + public static class SpringConfig { + + } + + @Test + @WithUserDetails(value = "john", userDetailsServiceBeanName = "userDetailService") + public void whenJohn_callLoadUserDetail_thenOK() { + CustomUser user = userService.loadUserDetail("jane"); + assertEquals("jane", user.getNickName()); + } + + @Test + @WithUserDetails(value = "jane", userDetailsServiceBeanName = "userDetailService") + public void givenJane_callSecuredLoadUserDetailWithJane_thenOK() { + CustomUser user = userService.securedLoadUserDetail("jane"); + assertEquals("jane", user.getNickName()); + assertEquals("jane", user.getUsername()); + } + + @Test(expected = AccessDeniedException.class) + @WithUserDetails(value = "john", userDetailsServiceBeanName = "userDetailService") + public void givenJohn_callSecuredLoadUserDetailWithJane_thenAccessDenied() { + userService.securedLoadUserDetail("jane"); + } + + @Test(expected = AccessDeniedException.class) + @WithUserDetails(value = "john", userDetailsServiceBeanName = "userDetailService") + public void givenJohn_callSecuredLoadUserDetailWithJohn_thenAccessDenied() { + userService.securedLoadUserDetail("john"); + } +} diff --git a/spring-security-core/src/test/java/com/baeldung/methodsecurity/WithMockJohnViewer.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/WithMockJohnViewer.java similarity index 97% rename from spring-security-core/src/test/java/com/baeldung/methodsecurity/WithMockJohnViewer.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/WithMockJohnViewer.java index f05a6bc20e..51c3904331 100644 --- a/spring-security-core/src/test/java/com/baeldung/methodsecurity/WithMockJohnViewer.java +++ b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/methodsecurity/WithMockJohnViewer.java @@ -1,10 +1,10 @@ -package com.baeldung.methodsecurity; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import org.springframework.security.test.context.support.WithMockUser; - -@Retention(RetentionPolicy.RUNTIME) -@WithMockUser(value="john",roles="VIEWER") +package com.baeldung.methodsecurity; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import org.springframework.security.test.context.support.WithMockUser; + +@Retention(RetentionPolicy.RUNTIME) +@WithMockUser(value="john",roles="VIEWER") public @interface WithMockJohnViewer { } \ No newline at end of file diff --git a/spring-security-core/src/test/java/com/baeldung/test/LiveTest.java b/spring-security-modules/spring-security-core/src/test/java/com/baeldung/test/LiveTest.java similarity index 100% rename from spring-security-core/src/test/java/com/baeldung/test/LiveTest.java rename to spring-security-modules/spring-security-core/src/test/java/com/baeldung/test/LiveTest.java diff --git a/spring-security-core/src/test/resources/.gitignore b/spring-security-modules/spring-security-core/src/test/resources/.gitignore similarity index 100% rename from spring-security-core/src/test/resources/.gitignore rename to spring-security-modules/spring-security-core/src/test/resources/.gitignore diff --git a/spring-security-cors/README.md b/spring-security-modules/spring-security-cors/README.md similarity index 100% rename from spring-security-cors/README.md rename to spring-security-modules/spring-security-cors/README.md diff --git a/spring-security-cors/pom.xml b/spring-security-modules/spring-security-cors/pom.xml similarity index 100% rename from spring-security-cors/pom.xml rename to spring-security-modules/spring-security-cors/pom.xml diff --git a/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/SpringBootSecurityApplication.java b/spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/SpringBootSecurityApplication.java similarity index 100% rename from spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/SpringBootSecurityApplication.java rename to spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/SpringBootSecurityApplication.java diff --git a/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/config/WebSecurityConfig.java b/spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/config/WebSecurityConfig.java similarity index 100% rename from spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/config/WebSecurityConfig.java rename to spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/basicauth/config/WebSecurityConfig.java diff --git a/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/controller/ResourceController.java b/spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/controller/ResourceController.java similarity index 96% rename from spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/controller/ResourceController.java rename to spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/controller/ResourceController.java index 7292c7f4f4..5d7d9f7770 100644 --- a/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/controller/ResourceController.java +++ b/spring-security-modules/spring-security-cors/src/main/java/com/baeldung/springbootsecuritycors/controller/ResourceController.java @@ -1,17 +1,17 @@ -package com.baeldung.springbootsecuritycors.controller; - -import java.security.Principal; - -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@CrossOrigin("http://localhost:4200") -public class ResourceController { - - @GetMapping("/user") - public String user(Principal principal) { - return principal.getName(); - } -} +package com.baeldung.springbootsecuritycors.controller; + +import java.security.Principal; + +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@CrossOrigin("http://localhost:4200") +public class ResourceController { + + @GetMapping("/user") + public String user(Principal principal) { + return principal.getName(); + } +} diff --git a/spring-security-cors/src/test/java/com/baeldung/springbootsecuritycors/ResourceControllerTest.java b/spring-security-modules/spring-security-cors/src/test/java/com/baeldung/springbootsecuritycors/ResourceControllerTest.java similarity index 97% rename from spring-security-cors/src/test/java/com/baeldung/springbootsecuritycors/ResourceControllerTest.java rename to spring-security-modules/spring-security-cors/src/test/java/com/baeldung/springbootsecuritycors/ResourceControllerTest.java index b45529ca5f..a471eb922f 100644 --- a/spring-security-cors/src/test/java/com/baeldung/springbootsecuritycors/ResourceControllerTest.java +++ b/spring-security-modules/spring-security-cors/src/test/java/com/baeldung/springbootsecuritycors/ResourceControllerTest.java @@ -1,42 +1,42 @@ -package com.baeldung.springbootsecuritycors; - -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.web.context.WebApplicationContext; - -import com.baeldung.springbootsecuritycors.basicauth.SpringBootSecurityApplication; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = { SpringBootSecurityApplication.class }) -public class ResourceControllerTest { - - private MockMvc mockMvc; - - @Autowired - private WebApplicationContext wac; - - @Before - public void setUp() { - this.mockMvc = MockMvcBuilders.webAppContextSetup(wac) - .apply(SecurityMockMvcConfigurers.springSecurity()) - .build(); - } - - @Test - public void givenPreFlightRequest_whenPerfomed_shouldReturnOK() throws Exception { - mockMvc.perform(options("/user") - .header("Access-Control-Request-Method", "GET") - .header("Origin", "http://localhost:4200")) - .andExpect(status().isOk()); - } -} +package com.baeldung.springbootsecuritycors; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.web.context.WebApplicationContext; + +import com.baeldung.springbootsecuritycors.basicauth.SpringBootSecurityApplication; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = { SpringBootSecurityApplication.class }) +public class ResourceControllerTest { + + private MockMvc mockMvc; + + @Autowired + private WebApplicationContext wac; + + @Before + public void setUp() { + this.mockMvc = MockMvcBuilders.webAppContextSetup(wac) + .apply(SecurityMockMvcConfigurers.springSecurity()) + .build(); + } + + @Test + public void givenPreFlightRequest_whenPerfomed_shouldReturnOK() throws Exception { + mockMvc.perform(options("/user") + .header("Access-Control-Request-Method", "GET") + .header("Origin", "http://localhost:4200")) + .andExpect(status().isOk()); + } +} diff --git a/spring-security-kerberos/README.md b/spring-security-modules/spring-security-kerberos/README.md similarity index 100% rename from spring-security-kerberos/README.md rename to spring-security-modules/spring-security-kerberos/README.md diff --git a/spring-security-kerberos/pom.xml b/spring-security-modules/spring-security-kerberos/pom.xml similarity index 97% rename from spring-security-kerberos/pom.xml rename to spring-security-modules/spring-security-kerberos/pom.xml index 7da1f1792b..6846bdf063 100644 --- a/spring-security-kerberos/pom.xml +++ b/spring-security-modules/spring-security-kerberos/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-security-kerberos/src/main/java/org/baeldung/Application.java b/spring-security-modules/spring-security-kerberos/src/main/java/org/baeldung/Application.java similarity index 100% rename from spring-security-kerberos/src/main/java/org/baeldung/Application.java rename to spring-security-modules/spring-security-kerberos/src/main/java/org/baeldung/Application.java diff --git a/spring-security-kerberos/src/main/java/org/baeldung/config/WebSecurityConfig.java b/spring-security-modules/spring-security-kerberos/src/main/java/org/baeldung/config/WebSecurityConfig.java similarity index 100% rename from spring-security-kerberos/src/main/java/org/baeldung/config/WebSecurityConfig.java rename to spring-security-modules/spring-security-kerberos/src/main/java/org/baeldung/config/WebSecurityConfig.java diff --git a/spring-security-kerberos/src/main/java/org/baeldung/security/DummyUserDetailsService.java b/spring-security-modules/spring-security-kerberos/src/main/java/org/baeldung/security/DummyUserDetailsService.java similarity index 100% rename from spring-security-kerberos/src/main/java/org/baeldung/security/DummyUserDetailsService.java rename to spring-security-modules/spring-security-kerberos/src/main/java/org/baeldung/security/DummyUserDetailsService.java diff --git a/spring-security-mvc-boot/README.md b/spring-security-modules/spring-security-mvc-boot/README.md similarity index 100% rename from spring-security-mvc-boot/README.md rename to spring-security-modules/spring-security-mvc-boot/README.md diff --git a/spring-security-mvc-boot/WebContent/META-INF/MANIFEST.MF b/spring-security-modules/spring-security-mvc-boot/WebContent/META-INF/MANIFEST.MF similarity index 100% rename from spring-security-mvc-boot/WebContent/META-INF/MANIFEST.MF rename to spring-security-modules/spring-security-mvc-boot/WebContent/META-INF/MANIFEST.MF diff --git a/spring-security-mvc-boot/pom.xml b/spring-security-modules/spring-security-mvc-boot/pom.xml similarity index 99% rename from spring-security-mvc-boot/pom.xml rename to spring-security-modules/spring-security-mvc-boot/pom.xml index f4e50cce4c..489ec2d427 100644 --- a/spring-security-mvc-boot/pom.xml +++ b/spring-security-modules/spring-security-mvc-boot/pom.xml @@ -13,7 +13,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/AppConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/AppConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/AppConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/AppConfig.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/SpringSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/SpringSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/SpringSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/SpringSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/TweetRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/TweetRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/TweetRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/TweetRepository.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/UserRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/UserRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/UserRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/data/repositories/UserRepository.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/models/AppUser.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/AppUser.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/models/AppUser.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/AppUser.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/security/AppUserPrincipal.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/security/AppUserPrincipal.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/security/AppUserPrincipal.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/security/AppUserPrincipal.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/security/CustomUserDetailsService.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/security/CustomUserDetailsService.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/security/CustomUserDetailsService.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/security/CustomUserDetailsService.java diff --git a/spring-security-mvc-boot/src/main/java/com/baeldung/util/DummyContentUtil.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/util/DummyContentUtil.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/com/baeldung/util/DummyContentUtil.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/util/DummyContentUtil.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/Application.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/Application.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/Application.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/Application.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MvcConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MvcConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MvcConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/MvcConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/SecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/config/SecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/SetupData.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/SetupData.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/SetupData.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/SetupData.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Foo.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Foo.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Foo.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Foo.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Organization.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Organization.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Organization.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Organization.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Privilege.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Privilege.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Privilege.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/Privilege.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/User.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/User.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/User.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/persistence/model/User.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/custom/web/MainController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/web/MainController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/custom/web/MainController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/custom/web/MainController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ip/IpApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/IpApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ip/IpApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/IpApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ip/web/MainController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/web/MainController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ip/web/MainController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ip/web/MainController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/PagesController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/PagesController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/PagesController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multipleentrypoints/PagesController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/UsersController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/UsersController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/UsersController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/multiplelogin/UsersController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Role.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Role.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Role.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/Role.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/User.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/User.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/User.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/model/User.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/MinuteBasedVoter.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/MinuteBasedVoter.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/voter/MinuteBasedVoter.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/MinuteBasedVoter.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterApplication.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterApplication.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterApplication.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterApplication.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterMvcConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterMvcConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterMvcConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/VoterMvcConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/WebSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java similarity index 100% rename from spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java rename to spring-security-modules/spring-security-mvc-boot/src/main/java/org/baeldung/voter/XmlSecurityConfig.java diff --git a/spring-security-mvc-boot/src/main/resources/application-defaults.properties b/spring-security-modules/spring-security-mvc-boot/src/main/resources/application-defaults.properties similarity index 100% rename from spring-security-mvc-boot/src/main/resources/application-defaults.properties rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/application-defaults.properties diff --git a/spring-security-mvc-boot/src/main/resources/application-mysql.properties b/spring-security-modules/spring-security-mvc-boot/src/main/resources/application-mysql.properties similarity index 100% rename from spring-security-mvc-boot/src/main/resources/application-mysql.properties rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/application-mysql.properties diff --git a/spring-security-mvc-boot/src/main/resources/application-postgre.properties b/spring-security-modules/spring-security-mvc-boot/src/main/resources/application-postgre.properties similarity index 100% rename from spring-security-mvc-boot/src/main/resources/application-postgre.properties rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/application-postgre.properties diff --git a/spring-security-mvc-boot/src/main/resources/application-ssl.properties b/spring-security-modules/spring-security-mvc-boot/src/main/resources/application-ssl.properties similarity index 100% rename from spring-security-mvc-boot/src/main/resources/application-ssl.properties rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/application-ssl.properties diff --git a/spring-security-mvc-boot/src/main/resources/application.properties b/spring-security-modules/spring-security-mvc-boot/src/main/resources/application.properties similarity index 100% rename from spring-security-mvc-boot/src/main/resources/application.properties rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/application.properties diff --git a/spring-security-mvc-boot/src/main/resources/data-mysql.sql b/spring-security-modules/spring-security-mvc-boot/src/main/resources/data-mysql.sql similarity index 100% rename from spring-security-mvc-boot/src/main/resources/data-mysql.sql rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/data-mysql.sql diff --git a/spring-security-mvc-boot/src/main/resources/data-postgre.sql b/spring-security-modules/spring-security-mvc-boot/src/main/resources/data-postgre.sql similarity index 100% rename from spring-security-mvc-boot/src/main/resources/data-postgre.sql rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/data-postgre.sql diff --git a/spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 b/spring-security-modules/spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 similarity index 100% rename from spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 diff --git a/spring-security-mvc-boot/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-boot/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-boot/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/logback.xml diff --git a/spring-security-mvc-boot/src/main/resources/persistence-h2.properties b/spring-security-modules/spring-security-mvc-boot/src/main/resources/persistence-h2.properties similarity index 100% rename from spring-security-mvc-boot/src/main/resources/persistence-h2.properties rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/persistence-h2.properties diff --git a/spring-security-mvc-boot/src/main/resources/schema-mysql.sql b/spring-security-modules/spring-security-mvc-boot/src/main/resources/schema-mysql.sql similarity index 100% rename from spring-security-mvc-boot/src/main/resources/schema-mysql.sql rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/schema-mysql.sql diff --git a/spring-security-mvc-boot/src/main/resources/schema-postgre.sql b/spring-security-modules/spring-security-mvc-boot/src/main/resources/schema-postgre.sql similarity index 100% rename from spring-security-mvc-boot/src/main/resources/schema-postgre.sql rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/schema-postgre.sql diff --git a/spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml b/spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml similarity index 100% rename from spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-custom-voter.xml diff --git a/spring-security-mvc-boot/src/main/resources/spring-security-ip.xml b/spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-ip.xml similarity index 100% rename from spring-security-mvc-boot/src/main/resources/spring-security-ip.xml rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-ip.xml diff --git a/spring-security-mvc-boot/src/main/resources/spring-security-multiple-auth-providers.xml b/spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-multiple-auth-providers.xml similarity index 100% rename from spring-security-mvc-boot/src/main/resources/spring-security-multiple-auth-providers.xml rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-multiple-auth-providers.xml diff --git a/spring-security-mvc-boot/src/main/resources/spring-security-multiple-entry.xml b/spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-multiple-entry.xml similarity index 100% rename from spring-security-mvc-boot/src/main/resources/spring-security-multiple-entry.xml rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/spring-security-multiple-entry.xml diff --git a/spring-security-mvc-boot/src/main/resources/templates/403.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/403.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/403.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/403.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/adminPage.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/adminPage.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/adminPage.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/adminPage.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/index.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/index.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/index.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/index.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/login.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/login.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/login.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/login.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/loginAdmin.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/loginAdmin.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/loginAdmin.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/loginAdmin.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/loginUser.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/loginUser.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/loginUser.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/loginUser.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/login.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/login.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/login.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/login.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/loginWithWarning.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/loginWithWarning.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/loginWithWarning.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/loginWithWarning.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/multipleHttpLinks.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/multipleHttpLinks.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/multipleHttpLinks.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/multipleHttpLinks.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myAdminPage.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myAdminPage.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myAdminPage.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myAdminPage.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myGuestPage.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myGuestPage.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myGuestPage.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myGuestPage.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myPrivateUserPage.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myPrivateUserPage.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myPrivateUserPage.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myPrivateUserPage.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myUserPage.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myUserPage.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myUserPage.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/multipleHttpElems/myUserPage.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/private.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/private.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/private.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/private.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/protectedLinks.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/protectedLinks.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/protectedLinks.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/protectedLinks.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/home.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/home.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/home.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/home.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/login.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/login.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/login.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/login.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyauthority.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyauthority.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyauthority.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyauthority.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbynothing.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbynothing.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbynothing.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbynothing.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyrole.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyrole.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyrole.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/rolesauthorities/protectedbyrole.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html diff --git a/spring-security-mvc-boot/src/main/resources/templates/userPage.html b/spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/userPage.html similarity index 100% rename from spring-security-mvc-boot/src/main/resources/templates/userPage.html rename to spring-security-modules/spring-security-mvc-boot/src/main/resources/templates/userPage.html diff --git a/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/ApplicationLiveTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/ApplicationLiveTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/web/ApplicationLiveTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/ApplicationLiveTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/IpLiveTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/IpLiveTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/web/IpLiveTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/IpLiveTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java similarity index 100% rename from spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java rename to spring-security-modules/spring-security-mvc-boot/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java diff --git a/spring-security-mvc-custom/.gitignore b/spring-security-modules/spring-security-mvc-custom/.gitignore similarity index 100% rename from spring-security-mvc-custom/.gitignore rename to spring-security-modules/spring-security-mvc-custom/.gitignore diff --git a/spring-security-mvc-custom/README.md b/spring-security-modules/spring-security-mvc-custom/README.md similarity index 100% rename from spring-security-mvc-custom/README.md rename to spring-security-modules/spring-security-mvc-custom/README.md diff --git a/spring-security-mvc-custom/pom.xml b/spring-security-modules/spring-security-mvc-custom/pom.xml similarity index 99% rename from spring-security-mvc-custom/pom.xml rename to spring-security-modules/spring-security-mvc-custom/pom.xml index 86aa117c91..fe8c749c59 100644 --- a/spring-security-mvc-custom/pom.xml +++ b/spring-security-modules/spring-security-mvc-custom/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/spring/MvcConfig.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/spring/MvcConfig.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/spring/MvcConfig.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/spring/SecSecurityConfig.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/spring/SecSecurityConfig.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/spring/SecSecurityConfig.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/BankController.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/BankController.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/BankController.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/BankController.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/FooController.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/FooController.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/FooController.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/FooController.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/LoginController.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/LoginController.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/LoginController.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/LoginController.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/PrintUserController.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/PrintUserController.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/PrintUserController.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/controller/PrintUserController.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/dto/Foo.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/dto/Foo.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/dto/Foo.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/dto/Foo.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/LoggerInterceptor.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/LoggerInterceptor.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/LoggerInterceptor.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/LoggerInterceptor.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/SessionTimerInterceptor.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/SessionTimerInterceptor.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/SessionTimerInterceptor.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/SessionTimerInterceptor.java diff --git a/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/UserInterceptor.java b/spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/UserInterceptor.java similarity index 100% rename from spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/UserInterceptor.java rename to spring-security-modules/spring-security-mvc-custom/src/main/java/org/baeldung/web/interceptor/UserInterceptor.java diff --git a/spring-security-mvc-custom/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-custom/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-custom/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-custom/src/main/resources/logback.xml diff --git a/spring-security-mvc-custom/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-mvc-custom/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-mvc-custom/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-custom/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/mvc-servlet.xml similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/mvc-servlet.xml rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/mvc-servlet.xml diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/anonymous.jsp b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/anonymous.jsp similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/view/anonymous.jsp rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/anonymous.jsp diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/console.jsp b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/console.jsp similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/view/console.jsp rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/console.jsp diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/csrfHome.jsp b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/csrfHome.jsp similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/view/csrfHome.jsp rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/csrfHome.jsp diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/view/homepage.jsp rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/login.jsp similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/view/login.jsp rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/view/login.jsp diff --git a/spring-security-mvc-custom/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-mvc-custom/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-mvc-custom/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfAbstractIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfAbstractIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfAbstractIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfAbstractIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfDisabledIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfDisabledIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfDisabledIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfDisabledIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfEnabledIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfEnabledIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfEnabledIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/csrf/CsrfEnabledIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityConfig.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityConfig.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityConfig.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityConfig.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/ManualSecurityIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithCsrfConfig.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithCsrfConfig.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithCsrfConfig.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithCsrfConfig.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithoutCsrfConfig.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithoutCsrfConfig.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithoutCsrfConfig.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/security/spring/SecurityWithoutCsrfConfig.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/LoggerInterceptorIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/LoggerInterceptorIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/LoggerInterceptorIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/LoggerInterceptorIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/SessionTimerInterceptorIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/SessionTimerInterceptorIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/SessionTimerInterceptorIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/SessionTimerInterceptorIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/UserInterceptorIntegrationTest.java b/spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/UserInterceptorIntegrationTest.java similarity index 100% rename from spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/UserInterceptorIntegrationTest.java rename to spring-security-modules/spring-security-mvc-custom/src/test/java/org/baeldung/web/interceptor/UserInterceptorIntegrationTest.java diff --git a/spring-security-mvc-custom/src/test/resources/.gitignore b/spring-security-modules/spring-security-mvc-custom/src/test/resources/.gitignore similarity index 100% rename from spring-security-mvc-custom/src/test/resources/.gitignore rename to spring-security-modules/spring-security-mvc-custom/src/test/resources/.gitignore diff --git a/spring-security-mvc-digest-auth/.gitignore b/spring-security-modules/spring-security-mvc-digest-auth/.gitignore similarity index 100% rename from spring-security-mvc-digest-auth/.gitignore rename to spring-security-modules/spring-security-mvc-digest-auth/.gitignore diff --git a/spring-security-mvc-digest-auth/README.md b/spring-security-modules/spring-security-mvc-digest-auth/README.md similarity index 100% rename from spring-security-mvc-digest-auth/README.md rename to spring-security-modules/spring-security-mvc-digest-auth/README.md diff --git a/spring-security-mvc-digest-auth/pom.xml b/spring-security-modules/spring-security-mvc-digest-auth/pom.xml similarity index 99% rename from spring-security-mvc-digest-auth/pom.xml rename to spring-security-modules/spring-security-mvc-digest-auth/pom.xml index 25fe71e804..8061235c71 100644 --- a/spring-security-mvc-digest-auth/pom.xml +++ b/spring-security-modules/spring-security-mvc-digest-auth/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-4 0.0.1-SNAPSHOT - ../parent-spring-4 + ../../parent-spring-4 diff --git a/spring-security-mvc-digest-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java b/spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java similarity index 100% rename from spring-security-mvc-digest-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java diff --git a/spring-security-mvc-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryDigestAuth.java b/spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryDigestAuth.java similarity index 100% rename from spring-security-mvc-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryDigestAuth.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryDigestAuth.java diff --git a/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/ClientConfig.java b/spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/ClientConfig.java similarity index 100% rename from spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/ClientConfig.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/ClientConfig.java diff --git a/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/MvcConfig.java similarity index 100% rename from spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/MvcConfig.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/MvcConfig.java diff --git a/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java similarity index 100% rename from spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java diff --git a/spring-security-mvc-digest-auth/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-digest-auth/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-digest-auth/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/resources/logback.xml diff --git a/spring-security-mvc-digest-auth/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-mvc-digest-auth/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-mvc-digest-auth/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-modules/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/mvc-servlet.xml similarity index 100% rename from spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/mvc-servlet.xml rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/mvc-servlet.xml diff --git a/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-modules/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/view/homepage.jsp rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-mvc-digest-auth/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java b/spring-security-modules/spring-security-mvc-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java similarity index 100% rename from spring-security-mvc-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java rename to spring-security-modules/spring-security-mvc-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java diff --git a/spring-security-mvc-digest-auth/src/test/resources/.gitignore b/spring-security-modules/spring-security-mvc-digest-auth/src/test/resources/.gitignore similarity index 100% rename from spring-security-mvc-digest-auth/src/test/resources/.gitignore rename to spring-security-modules/spring-security-mvc-digest-auth/src/test/resources/.gitignore diff --git a/spring-security-mvc-jsonview/.gitignore b/spring-security-modules/spring-security-mvc-jsonview/.gitignore similarity index 100% rename from spring-security-mvc-jsonview/.gitignore rename to spring-security-modules/spring-security-mvc-jsonview/.gitignore diff --git a/spring-security-mvc-jsonview/README.md b/spring-security-modules/spring-security-mvc-jsonview/README.md similarity index 100% rename from spring-security-mvc-jsonview/README.md rename to spring-security-modules/spring-security-mvc-jsonview/README.md diff --git a/spring-security-mvc-jsonview/pom.xml b/spring-security-modules/spring-security-mvc-jsonview/pom.xml similarity index 99% rename from spring-security-mvc-jsonview/pom.xml rename to spring-security-modules/spring-security-mvc-jsonview/pom.xml index aef7293fa7..f6ba997c62 100644 --- a/spring-security-mvc-jsonview/pom.xml +++ b/spring-security-modules/spring-security-mvc-jsonview/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/AppInitializer.java b/spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/AppInitializer.java similarity index 100% rename from spring-security-mvc-jsonview/src/main/java/com/baeldung/AppInitializer.java rename to spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/AppInitializer.java diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/ItemsController.java b/spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/ItemsController.java similarity index 100% rename from spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/ItemsController.java rename to spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/ItemsController.java diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/View.java b/spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/View.java similarity index 100% rename from spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/View.java rename to spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/controller/View.java diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/model/Item.java b/spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/model/Item.java similarity index 100% rename from spring-security-mvc-jsonview/src/main/java/com/baeldung/model/Item.java rename to spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/model/Item.java diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/AppConfig.java b/spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/AppConfig.java similarity index 100% rename from spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/AppConfig.java rename to spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/AppConfig.java diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java b/spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java similarity index 100% rename from spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java rename to spring-security-modules/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java diff --git a/spring-security-mvc-jsonview/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-jsonview/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-jsonview/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-jsonview/src/main/resources/logback.xml diff --git a/spring-security-mvc-jsonview/src/test/java/com/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-jsonview/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-jsonview/src/test/java/com/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-jsonview/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-jsonview/src/test/java/com/baeldung/security/SpringSecurityJsonViewIntegrationTest.java b/spring-security-modules/spring-security-mvc-jsonview/src/test/java/com/baeldung/security/SpringSecurityJsonViewIntegrationTest.java similarity index 100% rename from spring-security-mvc-jsonview/src/test/java/com/baeldung/security/SpringSecurityJsonViewIntegrationTest.java rename to spring-security-modules/spring-security-mvc-jsonview/src/test/java/com/baeldung/security/SpringSecurityJsonViewIntegrationTest.java diff --git a/spring-security-mvc-ldap/README.md b/spring-security-modules/spring-security-mvc-ldap/README.md similarity index 100% rename from spring-security-mvc-ldap/README.md rename to spring-security-modules/spring-security-mvc-ldap/README.md diff --git a/spring-security-mvc-ldap/pom.xml b/spring-security-modules/spring-security-mvc-ldap/pom.xml similarity index 97% rename from spring-security-mvc-ldap/pom.xml rename to spring-security-modules/spring-security-mvc-ldap/pom.xml index ad4bc2eefe..2f227d7908 100644 --- a/spring-security-mvc-ldap/pom.xml +++ b/spring-security-modules/spring-security-mvc-ldap/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-security-mvc-ldap/src/main/java/org/baeldung/SampleLDAPApplication.java b/spring-security-modules/spring-security-mvc-ldap/src/main/java/org/baeldung/SampleLDAPApplication.java similarity index 100% rename from spring-security-mvc-ldap/src/main/java/org/baeldung/SampleLDAPApplication.java rename to spring-security-modules/spring-security-mvc-ldap/src/main/java/org/baeldung/SampleLDAPApplication.java diff --git a/spring-security-mvc-ldap/src/main/java/org/baeldung/controller/MyController.java b/spring-security-modules/spring-security-mvc-ldap/src/main/java/org/baeldung/controller/MyController.java similarity index 100% rename from spring-security-mvc-ldap/src/main/java/org/baeldung/controller/MyController.java rename to spring-security-modules/spring-security-mvc-ldap/src/main/java/org/baeldung/controller/MyController.java diff --git a/spring-security-mvc-ldap/src/main/java/org/baeldung/security/SecurityConfig.java b/spring-security-modules/spring-security-mvc-ldap/src/main/java/org/baeldung/security/SecurityConfig.java similarity index 100% rename from spring-security-mvc-ldap/src/main/java/org/baeldung/security/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-ldap/src/main/java/org/baeldung/security/SecurityConfig.java diff --git a/spring-security-mvc-ldap/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/logback.xml diff --git a/spring-security-mvc-ldap/src/main/resources/static/css/bootstrap.min.css b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/static/css/bootstrap.min.css similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/static/css/bootstrap.min.css rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/static/css/bootstrap.min.css diff --git a/spring-security-mvc-ldap/src/main/resources/templates/error.html b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/templates/error.html similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/templates/error.html rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/templates/error.html diff --git a/spring-security-mvc-ldap/src/main/resources/templates/home.html b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/templates/home.html similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/templates/home.html rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/templates/home.html diff --git a/spring-security-mvc-ldap/src/main/resources/templates/login.html b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/templates/login.html similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/templates/login.html rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/templates/login.html diff --git a/spring-security-mvc-ldap/src/main/resources/users.ldif b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/users.ldif similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/users.ldif rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/users.ldif diff --git a/spring-security-mvc-ldap/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-mvc-ldap/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-mvc-ldap/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-ldap/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-ldap/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-ldap/src/test/resources/.gitignore b/spring-security-modules/spring-security-mvc-ldap/src/test/resources/.gitignore similarity index 100% rename from spring-security-mvc-ldap/src/test/resources/.gitignore rename to spring-security-modules/spring-security-mvc-ldap/src/test/resources/.gitignore diff --git a/spring-security-mvc-login/.gitignore b/spring-security-modules/spring-security-mvc-login/.gitignore similarity index 100% rename from spring-security-mvc-login/.gitignore rename to spring-security-modules/spring-security-mvc-login/.gitignore diff --git a/spring-security-mvc-login/README.md b/spring-security-modules/spring-security-mvc-login/README.md similarity index 100% rename from spring-security-mvc-login/README.md rename to spring-security-modules/spring-security-mvc-login/README.md diff --git a/spring-security-mvc-login/pom.xml b/spring-security-modules/spring-security-mvc-login/pom.xml similarity index 99% rename from spring-security-mvc-login/pom.xml rename to spring-security-modules/spring-security-mvc-login/pom.xml index 5a564667e4..4e0fe00176 100644 --- a/spring-security-mvc-login/pom.xml +++ b/spring-security-modules/spring-security-mvc-login/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/AppInitializer.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/controller/SecuredResourceController.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAccessDeniedHandler.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomAuthenticationFailureHandler.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/CustomLogoutSuccessHandler.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/RefererAuthenticationSuccessHandler.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/security/config/SecSecurityConfig.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/config/SecSecurityConfig.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/security/config/SecSecurityConfig.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/security/config/SecSecurityConfig.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/spring/ChannelSecSecurityConfig.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/spring/MvcConfig.java diff --git a/spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java b/spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java similarity index 100% rename from spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java rename to spring-security-modules/spring-security-mvc-login/src/main/java/com/baeldung/spring/RedirectionSecurityConfig.java diff --git a/spring-security-mvc-login/src/main/resources/RedirectionWebSecurityConfig.xml b/spring-security-modules/spring-security-mvc-login/src/main/resources/RedirectionWebSecurityConfig.xml similarity index 100% rename from spring-security-mvc-login/src/main/resources/RedirectionWebSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-login/src/main/resources/RedirectionWebSecurityConfig.xml diff --git a/spring-security-mvc-login/src/main/resources/channelWebSecurityConfig.xml b/spring-security-modules/spring-security-mvc-login/src/main/resources/channelWebSecurityConfig.xml similarity index 100% rename from spring-security-mvc-login/src/main/resources/channelWebSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-login/src/main/resources/channelWebSecurityConfig.xml diff --git a/spring-security-mvc-login/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-login/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-login/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-login/src/main/resources/logback.xml diff --git a/spring-security-mvc-login/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-mvc-login/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-mvc-login/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-login/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/mvc-servlet.xml similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/mvc-servlet.xml rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/mvc-servlet.xml diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/view/accessDenied.jsp b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/accessDenied.jsp similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/view/accessDenied.jsp rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/accessDenied.jsp diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/view/admin/adminpage.jsp b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/admin/adminpage.jsp similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/view/admin/adminpage.jsp rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/admin/adminpage.jsp diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/view/anonymous.jsp b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/anonymous.jsp similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/view/anonymous.jsp rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/anonymous.jsp diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/view/homepage.jsp rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/login.jsp similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/view/login.jsp rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/view/login.jsp diff --git a/spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml b/spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml similarity index 100% rename from spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml rename to spring-security-modules/spring-security-mvc-login/src/main/webapp/WEB-INF/web-old.xml diff --git a/spring-security-mvc-login/src/test/java/com/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-login/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-login/src/test/java/com/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-login/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java b/spring-security-modules/spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java similarity index 100% rename from spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java rename to spring-security-modules/spring-security-mvc-login/src/test/java/com/baeldung/security/FormLoginUnitTest.java diff --git a/spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java b/spring-security-modules/spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java similarity index 100% rename from spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java rename to spring-security-modules/spring-security-mvc-login/src/test/java/com/baeldung/security/RedirectionSecurityIntegrationTest.java diff --git a/spring-security-mvc-login/src/test/resources/.gitignore b/spring-security-modules/spring-security-mvc-login/src/test/resources/.gitignore similarity index 100% rename from spring-security-mvc-login/src/test/resources/.gitignore rename to spring-security-modules/spring-security-mvc-login/src/test/resources/.gitignore diff --git a/spring-security-mvc-login/src/test/resources/mvc-servlet.xml b/spring-security-modules/spring-security-mvc-login/src/test/resources/mvc-servlet.xml similarity index 100% rename from spring-security-mvc-login/src/test/resources/mvc-servlet.xml rename to spring-security-modules/spring-security-mvc-login/src/test/resources/mvc-servlet.xml diff --git a/spring-security-mvc-persisted-remember-me/.gitignore b/spring-security-modules/spring-security-mvc-persisted-remember-me/.gitignore similarity index 100% rename from spring-security-mvc-persisted-remember-me/.gitignore rename to spring-security-modules/spring-security-mvc-persisted-remember-me/.gitignore diff --git a/spring-security-mvc-persisted-remember-me/README.md b/spring-security-modules/spring-security-mvc-persisted-remember-me/README.md similarity index 100% rename from spring-security-mvc-persisted-remember-me/README.md rename to spring-security-modules/spring-security-mvc-persisted-remember-me/README.md diff --git a/spring-security-mvc-persisted-remember-me/pom.xml b/spring-security-modules/spring-security-mvc-persisted-remember-me/pom.xml similarity index 99% rename from spring-security-mvc-persisted-remember-me/pom.xml rename to spring-security-modules/spring-security-mvc-persisted-remember-me/pom.xml index 282cd51450..9410793222 100644 --- a/spring-security-mvc-persisted-remember-me/pom.xml +++ b/spring-security-modules/spring-security-mvc-persisted-remember-me/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-4 0.0.1-SNAPSHOT - ../parent-spring-4 + ../../parent-spring-4 diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/controller/MyController.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/controller/MyController.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/controller/MyController.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/controller/MyController.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityRole.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityRole.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityRole.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityRole.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityWebApplicationInitializer.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityWebApplicationInitializer.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityWebApplicationInitializer.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/security/SecurityWebApplicationInitializer.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/service/MyUserDetailsService.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/MvcConfig.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/MvcConfig.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/MvcConfig.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/PersistenceConfig.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/java/org/baeldung/spring/SecurityConfig.java diff --git a/spring-security-mvc-persisted-remember-me/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/logback.xml diff --git a/spring-security-mvc-persisted-remember-me/src/main/resources/persisted_logins_create_table.sql b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/persisted_logins_create_table.sql similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/resources/persisted_logins_create_table.sql rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/persisted_logins_create_table.sql diff --git a/spring-security-mvc-persisted-remember-me/src/main/resources/persistence-h2.properties b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/persistence-h2.properties similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/resources/persistence-h2.properties rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/persistence-h2.properties diff --git a/spring-security-mvc-persisted-remember-me/src/main/resources/persistence-postgres.properties b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/persistence-postgres.properties similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/resources/persistence-postgres.properties rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/persistence-postgres.properties diff --git a/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/mvc-servlet.xml similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/mvc-servlet.xml rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/mvc-servlet.xml diff --git a/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/anonymous.jsp b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/anonymous.jsp similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/anonymous.jsp rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/anonymous.jsp diff --git a/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/console.jsp b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/console.jsp similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/console.jsp rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/console.jsp diff --git a/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/homepage.jsp rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/login.jsp similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/login.jsp rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/view/login.jsp diff --git a/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-mvc-persisted-remember-me/src/test/resources/.gitignore b/spring-security-modules/spring-security-mvc-persisted-remember-me/src/test/resources/.gitignore similarity index 100% rename from spring-security-mvc-persisted-remember-me/src/test/resources/.gitignore rename to spring-security-modules/spring-security-mvc-persisted-remember-me/src/test/resources/.gitignore diff --git a/spring-security-mvc-socket/.gitignore b/spring-security-modules/spring-security-mvc-socket/.gitignore similarity index 100% rename from spring-security-mvc-socket/.gitignore rename to spring-security-modules/spring-security-mvc-socket/.gitignore diff --git a/spring-security-mvc-socket/README.md b/spring-security-modules/spring-security-mvc-socket/README.md similarity index 100% rename from spring-security-mvc-socket/README.md rename to spring-security-modules/spring-security-mvc-socket/README.md diff --git a/spring-security-mvc-socket/pom.xml b/spring-security-modules/spring-security-mvc-socket/pom.xml similarity index 99% rename from spring-security-mvc-socket/pom.xml rename to spring-security-modules/spring-security-mvc-socket/pom.xml index e9941192ad..ff8cc708e3 100644 --- a/spring-security-mvc-socket/pom.xml +++ b/spring-security-modules/spring-security-mvc-socket/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-spring-4 0.0.1-SNAPSHOT - ../parent-spring-4 + ../../parent-spring-4 diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/Constants.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/Constants.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/Constants.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/Constants.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/AppConfig.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/AppConfig.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/AppConfig.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/AppConfig.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/DataStoreConfig.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/DataStoreConfig.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/DataStoreConfig.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/DataStoreConfig.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SecurityConfig.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SecurityConfig.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SecurityConfig.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketBrokerConfig.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketBrokerConfig.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketBrokerConfig.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketBrokerConfig.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketSecurityConfig.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketSecurityConfig.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketSecurityConfig.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/SocketSecurityConfig.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/WebAppInitializer.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/WebAppInitializer.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/WebAppInitializer.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/config/WebAppInitializer.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/CsrfTokenController.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/CsrfTokenController.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/CsrfTokenController.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/CsrfTokenController.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/SocketController.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/SocketController.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/SocketController.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/controllers/SocketController.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/Role.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/Role.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/Role.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/Role.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/User.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/User.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/User.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/domain/User.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/repositories/UserRepository.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/repositories/UserRepository.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/repositories/UserRepository.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/repositories/UserRepository.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomAccessDeniedHandler.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomAccessDeniedHandler.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomAccessDeniedHandler.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomAccessDeniedHandler.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomDaoAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomDaoAuthenticationProvider.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomDaoAuthenticationProvider.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomDaoAuthenticationProvider.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLoginSuccessHandler.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLoginSuccessHandler.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLoginSuccessHandler.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLoginSuccessHandler.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLogoutSuccessHandler.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLogoutSuccessHandler.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLogoutSuccessHandler.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomLogoutSuccessHandler.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomUserDetailsService.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomUserDetailsService.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomUserDetailsService.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/CustomUserDetailsService.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/SecurityWebApplicationInitializer.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/SecurityWebApplicationInitializer.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/SecurityWebApplicationInitializer.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/security/SecurityWebApplicationInitializer.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/Message.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/Message.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/Message.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/Message.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/OutputMessage.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/OutputMessage.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/OutputMessage.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/socket/OutputMessage.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/user/CustomUserDetails.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/user/CustomUserDetails.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/user/CustomUserDetails.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsecuredsockets/transfer/user/CustomUserDetails.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/config/WebSocketMessageBrokerConfig.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/config/WebSocketMessageBrokerConfig.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/config/WebSocketMessageBrokerConfig.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/config/WebSocketMessageBrokerConfig.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/RestAPIController.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/RestAPIController.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/RestAPIController.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/RestAPIController.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/WebSocketController.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/WebSocketController.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/WebSocketController.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/controllers/WebSocketController.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Greeting.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Greeting.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Greeting.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Greeting.java diff --git a/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Message.java b/spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Message.java similarity index 100% rename from spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Message.java rename to spring-security-modules/spring-security-mvc-socket/src/main/java/com/baeldung/springsockets/models/Message.java diff --git a/spring-security-mvc-socket/src/main/resources/data.sql b/spring-security-modules/spring-security-mvc-socket/src/main/resources/data.sql similarity index 100% rename from spring-security-mvc-socket/src/main/resources/data.sql rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/data.sql diff --git a/spring-security-mvc-socket/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc-socket/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc-socket/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/logback.xml diff --git a/spring-security-mvc-socket/src/main/resources/schema.sql b/spring-security-modules/spring-security-mvc-socket/src/main/resources/schema.sql similarity index 100% rename from spring-security-mvc-socket/src/main/resources/schema.sql rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/schema.sql diff --git a/spring-security-mvc-socket/src/main/resources/static/rest.html b/spring-security-modules/spring-security-mvc-socket/src/main/resources/static/rest.html similarity index 100% rename from spring-security-mvc-socket/src/main/resources/static/rest.html rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/static/rest.html diff --git a/spring-security-mvc-socket/src/main/resources/static/rest.js b/spring-security-modules/spring-security-mvc-socket/src/main/resources/static/rest.js similarity index 100% rename from spring-security-mvc-socket/src/main/resources/static/rest.js rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/static/rest.js diff --git a/spring-security-mvc-socket/src/main/resources/static/ws.html b/spring-security-modules/spring-security-mvc-socket/src/main/resources/static/ws.html similarity index 100% rename from spring-security-mvc-socket/src/main/resources/static/ws.html rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/static/ws.html diff --git a/spring-security-mvc-socket/src/main/resources/static/ws.js b/spring-security-modules/spring-security-mvc-socket/src/main/resources/static/ws.js similarity index 100% rename from spring-security-mvc-socket/src/main/resources/static/ws.js rename to spring-security-modules/spring-security-mvc-socket/src/main/resources/static/ws.js diff --git a/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/denied.jsp b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/denied.jsp similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/denied.jsp rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/denied.jsp diff --git a/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/index.jsp similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/index.jsp rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/index.jsp diff --git a/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/login.jsp b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/login.jsp similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/login.jsp rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/login.jsp diff --git a/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/socket.jsp b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/socket.jsp similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/socket.jsp rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/socket.jsp diff --git a/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/success.jsp b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/success.jsp similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/success.jsp rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/WEB-INF/jsp/success.jsp diff --git a/spring-security-mvc-socket/src/main/webapp/resources/scripts/app.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/app.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/scripts/app.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/app.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/indexController.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/indexController.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/indexController.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/indexController.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/socketController.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/socketController.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/socketController.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/socketController.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/successController.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/successController.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/successController.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/controllers/successController.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/scripts/routes/router.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/routes/router.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/scripts/routes/router.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/routes/router.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/scripts/services/SocketService.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/services/SocketService.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/scripts/services/SocketService.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/scripts/services/SocketService.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/styles/app.css b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/app.css similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/styles/app.css rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/app.css diff --git a/spring-security-mvc-socket/src/main/webapp/resources/styles/denied.css b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/denied.css similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/styles/denied.css rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/denied.css diff --git a/spring-security-mvc-socket/src/main/webapp/resources/styles/index.css b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/index.css similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/styles/index.css rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/index.css diff --git a/spring-security-mvc-socket/src/main/webapp/resources/styles/login.css b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/login.css similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/styles/login.css rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/login.css diff --git a/spring-security-mvc-socket/src/main/webapp/resources/styles/socket.css b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/socket.css similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/styles/socket.css rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/socket.css diff --git a/spring-security-mvc-socket/src/main/webapp/resources/styles/success.css b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/success.css similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/styles/success.css rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/styles/success.css diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js.map b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js.map similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js.map rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular-route.min.js.map diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js.map b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js.map similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js.map rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/angular/angular.min.js.map diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/jquery/jquery.min.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/jquery/jquery.min.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/jquery/jquery.min.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/jquery/jquery.min.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js.map b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js.map similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js.map rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/sockjs/sockjs.min.js.map diff --git a/spring-security-mvc-socket/src/main/webapp/resources/vendor/stomp/stomp.min.js b/spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/stomp/stomp.min.js similarity index 100% rename from spring-security-mvc-socket/src/main/webapp/resources/vendor/stomp/stomp.min.js rename to spring-security-modules/spring-security-mvc-socket/src/main/webapp/resources/vendor/stomp/stomp.min.js diff --git a/spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc-socket/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-mvc/.gitignore b/spring-security-modules/spring-security-mvc/.gitignore similarity index 100% rename from spring-security-mvc/.gitignore rename to spring-security-modules/spring-security-mvc/.gitignore diff --git a/spring-security-mvc/README.md b/spring-security-modules/spring-security-mvc/README.md similarity index 100% rename from spring-security-mvc/README.md rename to spring-security-modules/spring-security-mvc/README.md diff --git a/spring-security-mvc/pom.xml b/spring-security-modules/spring-security-mvc/pom.xml similarity index 97% rename from spring-security-mvc/pom.xml rename to spring-security-modules/spring-security-mvc/pom.xml index d8f8372142..7da047707a 100644 --- a/spring-security-mvc/pom.xml +++ b/spring-security-modules/spring-security-mvc/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-mvc/src/main/java/com/baeldung/monitoring/MetricRegistrySingleton.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/monitoring/MetricRegistrySingleton.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/monitoring/MetricRegistrySingleton.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/monitoring/MetricRegistrySingleton.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/SpringSessionApplication.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/SpringSessionApplication.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/SpringSessionApplication.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/SpringSessionApplication.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/bean/Constants.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/bean/Constants.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/bean/Constants.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/bean/Constants.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/bean/Foo.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/bean/Foo.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/bean/Foo.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/bean/Foo.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/filter/SessionFilter.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/filter/SessionFilter.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/filter/SessionFilter.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/filter/SessionFilter.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/security/config/SecSecurityConfig.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/security/config/SecSecurityConfig.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/security/config/SecSecurityConfig.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/security/config/SecSecurityConfig.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/web/FooController.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/web/FooController.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/web/FooController.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/web/FooController.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/web/SessionRestController.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/web/SessionRestController.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/web/SessionRestController.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/web/SessionRestController.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/session/web/config/MvcConfig.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/web/config/MvcConfig.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/session/web/config/MvcConfig.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/session/web/config/MvcConfig.java diff --git a/spring-security-mvc/src/main/java/com/baeldung/web/SessionListenerWithMetrics.java b/spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/web/SessionListenerWithMetrics.java similarity index 100% rename from spring-security-mvc/src/main/java/com/baeldung/web/SessionListenerWithMetrics.java rename to spring-security-modules/spring-security-mvc/src/main/java/com/baeldung/web/SessionListenerWithMetrics.java diff --git a/spring-security-mvc/src/main/resources/application.properties b/spring-security-modules/spring-security-mvc/src/main/resources/application.properties similarity index 100% rename from spring-security-mvc/src/main/resources/application.properties rename to spring-security-modules/spring-security-mvc/src/main/resources/application.properties diff --git a/spring-security-mvc/src/main/resources/logback.xml b/spring-security-modules/spring-security-mvc/src/main/resources/logback.xml similarity index 100% rename from spring-security-mvc/src/main/resources/logback.xml rename to spring-security-modules/spring-security-mvc/src/main/resources/logback.xml diff --git a/spring-security-mvc/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-mvc/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-mvc/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-mvc/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/mvc-servlet.xml similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/mvc-servlet.xml rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/mvc-servlet.xml diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/view/anonymous.jsp b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/anonymous.jsp similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/view/anonymous.jsp rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/anonymous.jsp diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/view/console.jsp b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/console.jsp similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/view/console.jsp rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/console.jsp diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/view/homepage.jsp rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/view/invalidSession.jsp b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/invalidSession.jsp similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/view/invalidSession.jsp rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/invalidSession.jsp diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/login.jsp similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/view/login.jsp rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/login.jsp diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/view/sessionExpired.jsp b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/sessionExpired.jsp similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/view/sessionExpired.jsp rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/view/sessionExpired.jsp diff --git a/spring-security-mvc/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-mvc/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-mvc/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-mvc/src/test/java/com/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-mvc/src/test/java/com/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-mvc/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-security-mvc/src/test/java/com/baeldung/session/SessionConfigurationLiveTest.java b/spring-security-modules/spring-security-mvc/src/test/java/com/baeldung/session/SessionConfigurationLiveTest.java similarity index 100% rename from spring-security-mvc/src/test/java/com/baeldung/session/SessionConfigurationLiveTest.java rename to spring-security-modules/spring-security-mvc/src/test/java/com/baeldung/session/SessionConfigurationLiveTest.java diff --git a/spring-security-mvc/src/test/resources/.gitignore b/spring-security-modules/spring-security-mvc/src/test/resources/.gitignore similarity index 100% rename from spring-security-mvc/src/test/resources/.gitignore rename to spring-security-modules/spring-security-mvc/src/test/resources/.gitignore diff --git a/spring-security-openid/README.md b/spring-security-modules/spring-security-openid/README.md similarity index 100% rename from spring-security-openid/README.md rename to spring-security-modules/spring-security-openid/README.md diff --git a/spring-security-openid/pom.xml b/spring-security-modules/spring-security-openid/pom.xml similarity index 97% rename from spring-security-openid/pom.xml rename to spring-security-modules/spring-security-openid/pom.xml index a67f5043e4..970182dc3b 100644 --- a/spring-security-openid/pom.xml +++ b/spring-security-modules/spring-security-openid/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-openid/src/main/java/org/baeldung/config/GoogleOpenIdConnectConfig.java b/spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/GoogleOpenIdConnectConfig.java similarity index 100% rename from spring-security-openid/src/main/java/org/baeldung/config/GoogleOpenIdConnectConfig.java rename to spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/GoogleOpenIdConnectConfig.java diff --git a/spring-security-openid/src/main/java/org/baeldung/config/HomeController.java b/spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/HomeController.java similarity index 100% rename from spring-security-openid/src/main/java/org/baeldung/config/HomeController.java rename to spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/HomeController.java diff --git a/spring-security-openid/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/SecurityConfig.java similarity index 100% rename from spring-security-openid/src/main/java/org/baeldung/config/SecurityConfig.java rename to spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/SecurityConfig.java diff --git a/spring-security-openid/src/main/java/org/baeldung/config/SpringOpenidApplication.java b/spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/SpringOpenidApplication.java similarity index 100% rename from spring-security-openid/src/main/java/org/baeldung/config/SpringOpenidApplication.java rename to spring-security-modules/spring-security-openid/src/main/java/org/baeldung/config/SpringOpenidApplication.java diff --git a/spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectFilter.java b/spring-security-modules/spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectFilter.java similarity index 100% rename from spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectFilter.java rename to spring-security-modules/spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectFilter.java diff --git a/spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectUserDetails.java b/spring-security-modules/spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectUserDetails.java similarity index 100% rename from spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectUserDetails.java rename to spring-security-modules/spring-security-openid/src/main/java/org/baeldung/security/OpenIdConnectUserDetails.java diff --git a/spring-security-openid/src/main/resources/application.properties b/spring-security-modules/spring-security-openid/src/main/resources/application.properties similarity index 100% rename from spring-security-openid/src/main/resources/application.properties rename to spring-security-modules/spring-security-openid/src/main/resources/application.properties diff --git a/spring-security-openid/src/main/resources/logback.xml b/spring-security-modules/spring-security-openid/src/main/resources/logback.xml similarity index 100% rename from spring-security-openid/src/main/resources/logback.xml rename to spring-security-modules/spring-security-openid/src/main/resources/logback.xml diff --git a/spring-security-openid/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-openid/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-openid/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-openid/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-react/.gitignore b/spring-security-modules/spring-security-react/.gitignore similarity index 100% rename from spring-security-react/.gitignore rename to spring-security-modules/spring-security-react/.gitignore diff --git a/spring-security-react/README.md b/spring-security-modules/spring-security-react/README.md similarity index 100% rename from spring-security-react/README.md rename to spring-security-modules/spring-security-react/README.md diff --git a/spring-security-react/pom.xml b/spring-security-modules/spring-security-react/pom.xml similarity index 99% rename from spring-security-react/pom.xml rename to spring-security-modules/spring-security-react/pom.xml index 96ef1c5a04..19240fe88c 100644 --- a/spring-security-react/pom.xml +++ b/spring-security-modules/spring-security-react/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-4 0.0.1-SNAPSHOT - ../parent-spring-4 + ../../parent-spring-4 diff --git a/spring-security-react/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-security-modules/spring-security-react/src/main/java/org/baeldung/spring/MvcConfig.java similarity index 100% rename from spring-security-react/src/main/java/org/baeldung/spring/MvcConfig.java rename to spring-security-modules/spring-security-react/src/main/java/org/baeldung/spring/MvcConfig.java diff --git a/spring-security-react/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-modules/spring-security-react/src/main/java/org/baeldung/spring/SecSecurityConfig.java similarity index 100% rename from spring-security-react/src/main/java/org/baeldung/spring/SecSecurityConfig.java rename to spring-security-modules/spring-security-react/src/main/java/org/baeldung/spring/SecSecurityConfig.java diff --git a/spring-security-react/src/main/resources/logback.xml b/spring-security-modules/spring-security-react/src/main/resources/logback.xml similarity index 100% rename from spring-security-react/src/main/resources/logback.xml rename to spring-security-modules/spring-security-react/src/main/resources/logback.xml diff --git a/spring-security-react/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/mvc-servlet.xml similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/mvc-servlet.xml rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/mvc-servlet.xml diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/accessDenied.jsp b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/accessDenied.jsp similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/accessDenied.jsp rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/accessDenied.jsp diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/admin/adminpage.jsp b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/admin/adminpage.jsp similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/admin/adminpage.jsp rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/admin/adminpage.jsp diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/anonymous.jsp b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/anonymous.jsp similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/anonymous.jsp rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/anonymous.jsp diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/homepage.jsp b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/homepage.jsp rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/.babelrc b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.babelrc similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/.babelrc rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.babelrc diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintignore b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintignore similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintignore rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintignore diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintrc b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintrc similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintrc rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.eslintrc diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/.gitignore b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.gitignore similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/.gitignore rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/.gitignore diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/package.json b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package.json similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/package.json rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package.json diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/public/favicon.ico b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/public/favicon.ico similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/public/favicon.ico rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/public/favicon.ico diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/public/index.html b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/public/index.html similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/public/index.html rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/public/index.html diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/public/manifest.json b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/public/manifest.json similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/public/manifest.json rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/public/manifest.json diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/src/Form.js b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/Form.js similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/src/Form.js rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/Form.js diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/src/Input.js b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/Input.js similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/src/Input.js rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/Input.js diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.css b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.css similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.css rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.css diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.js b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.js similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.js rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/index.js diff --git a/spring-security-react/src/main/webapp/WEB-INF/view/react/src/registerServiceWorker.js b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/registerServiceWorker.js similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/view/react/src/registerServiceWorker.js rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/src/registerServiceWorker.js diff --git a/spring-security-react/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-react/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-react/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-rest-basic-auth/.gitignore b/spring-security-modules/spring-security-rest-basic-auth/.gitignore similarity index 100% rename from spring-security-rest-basic-auth/.gitignore rename to spring-security-modules/spring-security-rest-basic-auth/.gitignore diff --git a/spring-security-rest-basic-auth/README.md b/spring-security-modules/spring-security-rest-basic-auth/README.md similarity index 100% rename from spring-security-rest-basic-auth/README.md rename to spring-security-modules/spring-security-rest-basic-auth/README.md diff --git a/spring-security-rest-basic-auth/pom.xml b/spring-security-modules/spring-security-rest-basic-auth/pom.xml similarity index 99% rename from spring-security-rest-basic-auth/pom.xml rename to spring-security-modules/spring-security-rest-basic-auth/pom.xml index 5bb74fa6e6..416882b3d4 100644 --- a/spring-security-rest-basic-auth/pom.xml +++ b/spring-security-modules/spring-security-rest-basic-auth/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/basic/MyBasicAuthenticationEntryPoint.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomFilter.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomFilter.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomFilter.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomFilter.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomWebSecurityConfigurerAdapter.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomWebSecurityConfigurerAdapter.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomWebSecurityConfigurerAdapter.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/filter/CustomWebSecurityConfigurerAdapter.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/WebConfig.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/WebConfig.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/WebConfig.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/spring/WebConfig.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/BarController.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/BarController.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/BarController.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/BarController.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/FooController.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/FooController.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/FooController.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/controller/FooController.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Bar.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Bar.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Bar.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Bar.java diff --git a/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Foo.java b/spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Foo.java similarity index 100% rename from spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Foo.java rename to spring-security-modules/spring-security-rest-basic-auth/src/main/java/org/baeldung/web/dto/Foo.java diff --git a/spring-security-rest-basic-auth/src/main/resources/logback.xml b/spring-security-modules/spring-security-rest-basic-auth/src/main/resources/logback.xml similarity index 100% rename from spring-security-rest-basic-auth/src/main/resources/logback.xml rename to spring-security-modules/spring-security-rest-basic-auth/src/main/resources/logback.xml diff --git a/spring-security-rest-basic-auth/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-rest-basic-auth/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-rest-basic-auth/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-rest-basic-auth/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-rest-basic-auth/src/main/webapp/WEB-INF/api-servlet.xml b/spring-security-modules/spring-security-rest-basic-auth/src/main/webapp/WEB-INF/api-servlet.xml similarity index 100% rename from spring-security-rest-basic-auth/src/main/webapp/WEB-INF/api-servlet.xml rename to spring-security-modules/spring-security-rest-basic-auth/src/main/webapp/WEB-INF/api-servlet.xml diff --git a/spring-security-rest-basic-auth/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-rest-basic-auth/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-rest-basic-auth/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-rest-basic-auth/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-rest-basic-auth/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-rest-basic-auth/src/test/resources/.gitignore b/spring-security-modules/spring-security-rest-basic-auth/src/test/resources/.gitignore similarity index 100% rename from spring-security-rest-basic-auth/src/test/resources/.gitignore rename to spring-security-modules/spring-security-rest-basic-auth/src/test/resources/.gitignore diff --git a/spring-security-rest-custom/README.md b/spring-security-modules/spring-security-rest-custom/README.md similarity index 100% rename from spring-security-rest-custom/README.md rename to spring-security-modules/spring-security-rest-custom/README.md diff --git a/spring-security-rest-custom/pom.xml b/spring-security-modules/spring-security-rest-custom/pom.xml similarity index 99% rename from spring-security-rest-custom/pom.xml rename to spring-security-modules/spring-security-rest-custom/pom.xml index d8e53d5b38..d9072ec8a2 100644 --- a/spring-security-rest-custom/pom.xml +++ b/spring-security-modules/spring-security-rest-custom/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/config/MainWebAppInitializer.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/MainWebAppInitializer.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/config/MainWebAppInitializer.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/MainWebAppInitializer.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/config/child/MethodSecurityConfig.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/child/MethodSecurityConfig.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/config/child/MethodSecurityConfig.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/child/MethodSecurityConfig.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/config/child/WebConfig.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/child/WebConfig.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/config/child/WebConfig.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/child/WebConfig.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/SecurityConfig.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/ServiceConfig.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/ServiceConfig.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/config/parent/ServiceConfig.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/config/parent/ServiceConfig.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/security/AuthenticationFacade.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/AuthenticationFacade.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/security/AuthenticationFacade.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/AuthenticationFacade.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/security/CustomAuthenticationProvider.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/CustomAuthenticationProvider.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/security/CustomAuthenticationProvider.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/CustomAuthenticationProvider.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/security/IAuthenticationFacade.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/IAuthenticationFacade.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/security/IAuthenticationFacade.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/IAuthenticationFacade.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/service/FooService.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/service/FooService.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/service/FooService.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/service/FooService.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/service/IFooService.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/service/IFooService.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/service/IFooService.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/service/IFooService.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/service/RunAsService.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/service/RunAsService.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/service/RunAsService.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/service/RunAsService.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/FooController.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/FooController.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/FooController.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/FooController.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithCustomInterfaceController.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithCustomInterfaceController.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithCustomInterfaceController.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithCustomInterfaceController.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithHTTPServletRequestController.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithHTTPServletRequestController.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithHTTPServletRequestController.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/GetUserWithHTTPServletRequestController.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/RunAsController.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/RunAsController.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/RunAsController.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/RunAsController.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController1.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController1.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController1.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController1.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController3.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController3.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController3.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/SecurityController3.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/ViewController.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/ViewController.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/controller/ViewController.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/controller/ViewController.java diff --git a/spring-security-rest-custom/src/main/java/org/baeldung/web/dto/Foo.java b/spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/dto/Foo.java similarity index 100% rename from spring-security-rest-custom/src/main/java/org/baeldung/web/dto/Foo.java rename to spring-security-modules/spring-security-rest-custom/src/main/java/org/baeldung/web/dto/Foo.java diff --git a/spring-security-rest-custom/src/main/resources/foo.properties b/spring-security-modules/spring-security-rest-custom/src/main/resources/foo.properties similarity index 100% rename from spring-security-rest-custom/src/main/resources/foo.properties rename to spring-security-modules/spring-security-rest-custom/src/main/resources/foo.properties diff --git a/spring-security-rest-custom/src/main/resources/logback.xml b/spring-security-modules/spring-security-rest-custom/src/main/resources/logback.xml similarity index 100% rename from spring-security-rest-custom/src/main/resources/logback.xml rename to spring-security-modules/spring-security-rest-custom/src/main/resources/logback.xml diff --git a/spring-security-rest-custom/src/main/resources/prop.xml b/spring-security-modules/spring-security-rest-custom/src/main/resources/prop.xml similarity index 100% rename from spring-security-rest-custom/src/main/resources/prop.xml rename to spring-security-modules/spring-security-rest-custom/src/main/resources/prop.xml diff --git a/spring-security-rest-custom/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-rest-custom/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-rest-custom/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-rest-custom/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-rest-custom/src/main/webapp/WEB-INF/templates/index.html b/spring-security-modules/spring-security-rest-custom/src/main/webapp/WEB-INF/templates/index.html similarity index 100% rename from spring-security-rest-custom/src/main/webapp/WEB-INF/templates/index.html rename to spring-security-modules/spring-security-rest-custom/src/main/webapp/WEB-INF/templates/index.html diff --git a/spring-security-rest-custom/src/main/webapp/WEB-INF/templates/runas.html b/spring-security-modules/spring-security-rest-custom/src/main/webapp/WEB-INF/templates/runas.html similarity index 100% rename from spring-security-rest-custom/src/main/webapp/WEB-INF/templates/runas.html rename to spring-security-modules/spring-security-rest-custom/src/main/webapp/WEB-INF/templates/runas.html diff --git a/spring-security-rest-custom/src/main/webapp/WEB-INF/web_old.xml b/spring-security-modules/spring-security-rest-custom/src/main/webapp/WEB-INF/web_old.xml similarity index 100% rename from spring-security-rest-custom/src/main/webapp/WEB-INF/web_old.xml rename to spring-security-modules/spring-security-rest-custom/src/main/webapp/WEB-INF/web_old.xml diff --git a/spring-security-rest-custom/src/test/resources/.gitignore b/spring-security-modules/spring-security-rest-custom/src/test/resources/.gitignore similarity index 100% rename from spring-security-rest-custom/src/test/resources/.gitignore rename to spring-security-modules/spring-security-rest-custom/src/test/resources/.gitignore diff --git a/spring-security-rest/.gitignore b/spring-security-modules/spring-security-rest/.gitignore similarity index 100% rename from spring-security-rest/.gitignore rename to spring-security-modules/spring-security-rest/.gitignore diff --git a/spring-security-rest/README.md b/spring-security-modules/spring-security-rest/README.md similarity index 100% rename from spring-security-rest/README.md rename to spring-security-modules/spring-security-rest/README.md diff --git a/spring-security-rest/pom.xml b/spring-security-modules/spring-security-rest/pom.xml similarity index 99% rename from spring-security-rest/pom.xml rename to spring-security-modules/spring-security-rest/pom.xml index 6b29d6ea7f..9410f08378 100644 --- a/spring-security-rest/pom.xml +++ b/spring-security-modules/spring-security-rest/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-security-rest/src/main/java/org/baeldung/errorhandling/ApiError.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/errorhandling/ApiError.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/errorhandling/ApiError.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/errorhandling/ApiError.java diff --git a/spring-security-rest/src/main/java/org/baeldung/errorhandling/CustomRestExceptionHandler.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/errorhandling/CustomRestExceptionHandler.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/errorhandling/CustomRestExceptionHandler.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/errorhandling/CustomRestExceptionHandler.java diff --git a/spring-security-rest/src/main/java/org/baeldung/persistence/model/Foo.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/persistence/model/Foo.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/persistence/model/Foo.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/persistence/model/Foo.java diff --git a/spring-security-rest/src/main/java/org/baeldung/security/SecurityJavaConfig.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/security/SecurityJavaConfig.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/security/SecurityJavaConfig.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/security/SecurityJavaConfig.java diff --git a/spring-security-rest/src/main/java/org/baeldung/security/web/MySavedRequestAwareAuthenticationSuccessHandler.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/security/web/MySavedRequestAwareAuthenticationSuccessHandler.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/security/web/MySavedRequestAwareAuthenticationSuccessHandler.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/security/web/MySavedRequestAwareAuthenticationSuccessHandler.java diff --git a/spring-security-rest/src/main/java/org/baeldung/security/web/RestAuthenticationEntryPoint.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/security/web/RestAuthenticationEntryPoint.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/security/web/RestAuthenticationEntryPoint.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/security/web/RestAuthenticationEntryPoint.java diff --git a/spring-security-rest/src/main/java/org/baeldung/spring/ClientWebConfig.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/spring/ClientWebConfig.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/spring/ClientWebConfig.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/spring/ClientWebConfig.java diff --git a/spring-security-rest/src/main/java/org/baeldung/spring/SecurityXmlConfig.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/spring/SecurityXmlConfig.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/spring/SecurityXmlConfig.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/spring/SecurityXmlConfig.java diff --git a/spring-security-rest/src/main/java/org/baeldung/spring/WebConfig.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/spring/WebConfig.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/spring/WebConfig.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/spring/WebConfig.java diff --git a/spring-security-rest/src/main/java/org/baeldung/swagger2/SwaggerConfig.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/swagger2/SwaggerConfig.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/swagger2/SwaggerConfig.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/swagger2/SwaggerConfig.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/AsyncController.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/controller/CustomController.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/CustomController.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/controller/CustomController.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/CustomController.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/controller/FooController.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/FooController.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/controller/FooController.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/FooController.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/controller/RootController.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/RootController.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/controller/RootController.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/controller/RootController.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/error/CustomAccessDeniedHandler.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/error/CustomAccessDeniedHandler.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/error/CustomAccessDeniedHandler.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/error/CustomAccessDeniedHandler.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/error/RestResponseEntityExceptionHandler.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncService.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncService.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/service/AsyncService.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncService.java diff --git a/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java b/spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java similarity index 100% rename from spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java rename to spring-security-modules/spring-security-rest/src/main/java/org/baeldung/web/service/AsyncServiceImpl.java diff --git a/spring-security-rest/src/main/resources/logback.xml b/spring-security-modules/spring-security-rest/src/main/resources/logback.xml similarity index 100% rename from spring-security-rest/src/main/resources/logback.xml rename to spring-security-modules/spring-security-rest/src/main/resources/logback.xml diff --git a/spring-security-rest/src/main/resources/webSecurityConfig.xml b/spring-security-modules/spring-security-rest/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-security-rest/src/main/resources/webSecurityConfig.xml rename to spring-security-modules/spring-security-rest/src/main/resources/webSecurityConfig.xml diff --git a/spring-security-rest/src/main/webapp/WEB-INF/api-servlet.xml b/spring-security-modules/spring-security-rest/src/main/webapp/WEB-INF/api-servlet.xml similarity index 100% rename from spring-security-rest/src/main/webapp/WEB-INF/api-servlet.xml rename to spring-security-modules/spring-security-rest/src/main/webapp/WEB-INF/api-servlet.xml diff --git a/spring-security-rest/src/main/webapp/WEB-INF/view/csrfAttacker.jsp b/spring-security-modules/spring-security-rest/src/main/webapp/WEB-INF/view/csrfAttacker.jsp similarity index 100% rename from spring-security-rest/src/main/webapp/WEB-INF/view/csrfAttacker.jsp rename to spring-security-modules/spring-security-rest/src/main/webapp/WEB-INF/view/csrfAttacker.jsp diff --git a/spring-security-rest/src/main/webapp/WEB-INF/web.xml b/spring-security-modules/spring-security-rest/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-security-rest/src/main/webapp/WEB-INF/web.xml rename to spring-security-modules/spring-security-rest/src/main/webapp/WEB-INF/web.xml diff --git a/spring-security-rest/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-rest/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-rest/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-rest/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-rest/src/test/java/org/baeldung/errorhandling/FooLiveTest.java b/spring-security-modules/spring-security-rest/src/test/java/org/baeldung/errorhandling/FooLiveTest.java similarity index 100% rename from spring-security-rest/src/test/java/org/baeldung/errorhandling/FooLiveTest.java rename to spring-security-modules/spring-security-rest/src/test/java/org/baeldung/errorhandling/FooLiveTest.java diff --git a/spring-security-rest/src/test/java/org/baeldung/web/AsyncControllerIntegrationTest.java b/spring-security-modules/spring-security-rest/src/test/java/org/baeldung/web/AsyncControllerIntegrationTest.java similarity index 100% rename from spring-security-rest/src/test/java/org/baeldung/web/AsyncControllerIntegrationTest.java rename to spring-security-modules/spring-security-rest/src/test/java/org/baeldung/web/AsyncControllerIntegrationTest.java diff --git a/spring-security-rest/src/test/java/org/baeldung/web/SwaggerLiveTest.java b/spring-security-modules/spring-security-rest/src/test/java/org/baeldung/web/SwaggerLiveTest.java similarity index 100% rename from spring-security-rest/src/test/java/org/baeldung/web/SwaggerLiveTest.java rename to spring-security-modules/spring-security-rest/src/test/java/org/baeldung/web/SwaggerLiveTest.java diff --git a/spring-security-rest/src/test/java/org/baeldung/web/TestConfig.java b/spring-security-modules/spring-security-rest/src/test/java/org/baeldung/web/TestConfig.java similarity index 100% rename from spring-security-rest/src/test/java/org/baeldung/web/TestConfig.java rename to spring-security-modules/spring-security-rest/src/test/java/org/baeldung/web/TestConfig.java diff --git a/spring-security-rest/src/test/resources/.gitignore b/spring-security-modules/spring-security-rest/src/test/resources/.gitignore similarity index 100% rename from spring-security-rest/src/test/resources/.gitignore rename to spring-security-modules/spring-security-rest/src/test/resources/.gitignore diff --git a/spring-security-sso/README.md b/spring-security-modules/spring-security-sso/README.md similarity index 100% rename from spring-security-sso/README.md rename to spring-security-modules/spring-security-sso/README.md diff --git a/spring-security-sso/pom.xml b/spring-security-modules/spring-security-sso/pom.xml similarity index 95% rename from spring-security-sso/pom.xml rename to spring-security-modules/spring-security-sso/pom.xml index c921cf1867..3d9c1bf595 100644 --- a/spring-security-sso/pom.xml +++ b/spring-security-modules/spring-security-sso/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-sso/spring-security-sso-auth-server/pom.xml b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/pom.xml similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/pom.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/pom.xml diff --git a/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthServerConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthServerConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthServerConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthServerConfig.java diff --git a/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/AuthorizationServerApplication.java diff --git a/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/SecurityConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/SecurityConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/SecurityConfig.java diff --git a/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/UserController.java b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/UserController.java similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/UserController.java rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/java/org/baeldung/config/UserController.java diff --git a/spring-security-sso/spring-security-sso-auth-server/src/main/resources/application.properties b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/resources/application.properties similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/main/resources/application.properties rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/resources/application.properties diff --git a/spring-security-sso/spring-security-sso-auth-server/src/main/resources/logback.xml b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/resources/logback.xml similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/main/resources/logback.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/main/resources/logback.xml diff --git a/spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/UserInfoEndpointLiveTest.java b/spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/UserInfoEndpointLiveTest.java similarity index 100% rename from spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/UserInfoEndpointLiveTest.java rename to spring-security-modules/spring-security-sso/spring-security-sso-auth-server/src/test/java/org/baeldung/UserInfoEndpointLiveTest.java diff --git a/spring-security-sso/spring-security-sso-kerberos/.gitignore b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/.gitignore similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/.gitignore rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/.gitignore diff --git a/spring-security-sso/spring-security-sso-kerberos/README.md b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/README.md similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/README.md rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/README.md diff --git a/spring-security-sso/spring-security-sso-kerberos/pom.xml b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/pom.xml similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/pom.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/pom.xml diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/KerberosClientApp.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/KerberosClientApp.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/KerberosClientApp.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/KerberosClientApp.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/SampleClient.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/SampleClient.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/SampleClient.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/SampleClient.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/AppConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/AppConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/AppConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/AppConfig.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/KerberosConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/KerberosConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/KerberosConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/client/config/KerberosConfig.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/KerberosMiniKdc.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/KerberosMiniKdc.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/KerberosMiniKdc.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/KerberosMiniKdc.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/MiniKdcConfigBuilder.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/MiniKdcConfigBuilder.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/MiniKdcConfigBuilder.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/kdc/MiniKdcConfigBuilder.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/KerberizedServerApp.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/KerberizedServerApp.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/KerberizedServerApp.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/KerberizedServerApp.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/MvcConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/MvcConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/MvcConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/MvcConfig.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/WebSecurityConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/WebSecurityConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/WebSecurityConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/config/WebSecurityConfig.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/controller/SampleController.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/controller/SampleController.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/controller/SampleController.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/controller/SampleController.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/service/DummyUserDetailsService.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/service/DummyUserDetailsService.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/service/DummyUserDetailsService.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/java/kerberos/server/service/DummyUserDetailsService.java diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/resources/application.properties b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/application.properties similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/resources/application.properties rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/application.properties diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc-krb5.conf b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc-krb5.conf similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc-krb5.conf rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc-krb5.conf diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc.ldiff b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc.ldiff similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc.ldiff rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/minikdc.ldiff diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/hello.html b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/hello.html similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/hello.html rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/hello.html diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/home.html b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/home.html similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/home.html rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/home.html diff --git a/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/login.html b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/login.html similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/login.html rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/main/resources/templates/login.html diff --git a/spring-security-sso/spring-security-sso-kerberos/src/test/java/kerberos/client/SampleClientManualTest.java b/spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/test/java/kerberos/client/SampleClientManualTest.java similarity index 100% rename from spring-security-sso/spring-security-sso-kerberos/src/test/java/kerberos/client/SampleClientManualTest.java rename to spring-security-modules/spring-security-sso/spring-security-sso-kerberos/src/test/java/kerberos/client/SampleClientManualTest.java diff --git a/spring-security-sso/spring-security-sso-ui-2/pom.xml b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/pom.xml similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/pom.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/pom.xml diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiApplication.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiApplication.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiApplication.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiApplication.java diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiSecurityConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiSecurityConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiSecurityConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiSecurityConfig.java diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/java/org/baeldung/config/UiWebConfig.java diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/resources/application.yml b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/application.yml similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/resources/application.yml rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/application.yml diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/resources/logback.xml b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/logback.xml similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/resources/logback.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/logback.xml diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/index.html b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/index.html similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/index.html rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/index.html diff --git a/spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/securedPage.html b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/securedPage.html similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/securedPage.html rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/main/resources/templates/securedPage.html diff --git a/spring-security-sso/spring-security-sso-ui-2/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui-2/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui-2/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-sso/spring-security-sso-ui/pom.xml b/spring-security-modules/spring-security-sso/spring-security-sso-ui/pom.xml similarity index 100% rename from spring-security-sso/spring-security-sso-ui/pom.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/pom.xml diff --git a/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiApplication.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiApplication.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiApplication.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiApplication.java diff --git a/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiSecurityConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiSecurityConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiSecurityConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiSecurityConfig.java diff --git a/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/java/org/baeldung/config/UiWebConfig.java diff --git a/spring-security-sso/spring-security-sso-ui/src/main/resources/application.yml b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/application.yml similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/resources/application.yml rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/application.yml diff --git a/spring-security-sso/spring-security-sso-ui/src/main/resources/logback.xml b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/logback.xml similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/resources/logback.xml rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/logback.xml diff --git a/spring-security-sso/spring-security-sso-ui/src/main/resources/templates/index.html b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/templates/index.html similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/resources/templates/index.html rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/templates/index.html diff --git a/spring-security-sso/spring-security-sso-ui/src/main/resources/templates/securedPage.html b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/templates/securedPage.html similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/main/resources/templates/securedPage.html rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/main/resources/templates/securedPage.html diff --git a/spring-security-sso/spring-security-sso-ui/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-sso/spring-security-sso-ui/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-sso/spring-security-sso-ui/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-sso/spring-security-sso-ui/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-stormpath/README.md b/spring-security-modules/spring-security-stormpath/README.md similarity index 100% rename from spring-security-stormpath/README.md rename to spring-security-modules/spring-security-stormpath/README.md diff --git a/spring-security-stormpath/pom.xml b/spring-security-modules/spring-security-stormpath/pom.xml similarity index 97% rename from spring-security-stormpath/pom.xml rename to spring-security-modules/spring-security-stormpath/pom.xml index 28e8736ca0..81a7c40aef 100644 --- a/spring-security-stormpath/pom.xml +++ b/spring-security-modules/spring-security-stormpath/pom.xml @@ -21,7 +21,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-security-stormpath/src/main/java/com/baeldung/Application.java b/spring-security-modules/spring-security-stormpath/src/main/java/com/baeldung/Application.java similarity index 100% rename from spring-security-stormpath/src/main/java/com/baeldung/Application.java rename to spring-security-modules/spring-security-stormpath/src/main/java/com/baeldung/Application.java diff --git a/spring-security-stormpath/src/main/java/com/baeldung/security/SecurityConfiguration.java b/spring-security-modules/spring-security-stormpath/src/main/java/com/baeldung/security/SecurityConfiguration.java similarity index 100% rename from spring-security-stormpath/src/main/java/com/baeldung/security/SecurityConfiguration.java rename to spring-security-modules/spring-security-stormpath/src/main/java/com/baeldung/security/SecurityConfiguration.java diff --git a/spring-security-stormpath/src/main/resources/application.properties b/spring-security-modules/spring-security-stormpath/src/main/resources/application.properties similarity index 100% rename from spring-security-stormpath/src/main/resources/application.properties rename to spring-security-modules/spring-security-stormpath/src/main/resources/application.properties diff --git a/spring-security-stormpath/src/main/resources/logback.xml b/spring-security-modules/spring-security-stormpath/src/main/resources/logback.xml similarity index 100% rename from spring-security-stormpath/src/main/resources/logback.xml rename to spring-security-modules/spring-security-stormpath/src/main/resources/logback.xml diff --git a/spring-security-thymeleaf/README.MD b/spring-security-modules/spring-security-thymeleaf/README.MD similarity index 100% rename from spring-security-thymeleaf/README.MD rename to spring-security-modules/spring-security-thymeleaf/README.MD diff --git a/spring-security-thymeleaf/pom.xml b/spring-security-modules/spring-security-thymeleaf/pom.xml similarity index 97% rename from spring-security-thymeleaf/pom.xml rename to spring-security-modules/spring-security-thymeleaf/pom.xml index e6decbf0e5..a4ecbaff21 100644 --- a/spring-security-thymeleaf/pom.xml +++ b/spring-security-modules/spring-security-thymeleaf/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SecurityConfiguration.java b/spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SecurityConfiguration.java similarity index 97% rename from spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SecurityConfiguration.java rename to spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SecurityConfiguration.java index 0a4344db4d..f7f8cfb708 100644 --- a/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SecurityConfiguration.java +++ b/spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SecurityConfiguration.java @@ -1,50 +1,50 @@ -package com.baeldung.springsecuritythymeleaf; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.web.util.matcher.AntPathRequestMatcher; - -@Configuration -@EnableWebSecurity -public class SecurityConfiguration extends WebSecurityConfigurerAdapter { - - @Override - protected void configure(HttpSecurity http) throws Exception { - http.authorizeRequests() - .anyRequest() - .authenticated() - .and() - .formLogin() - .loginPage("/login") - .permitAll() - .successForwardUrl("/index") - .and() - .logout() - .permitAll() - .logoutRequestMatcher(new AntPathRequestMatcher("/logout")) - .logoutSuccessUrl("/login"); - } - - @Autowired - public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { - auth.inMemoryAuthentication() - .withUser("user") - .password(passwordEncoder().encode("password")) - .roles("USER") - .and() - .withUser("admin") - .password(passwordEncoder().encode("admin")) - .roles("ADMIN"); - } - - @Bean - public BCryptPasswordEncoder passwordEncoder() { - return new BCryptPasswordEncoder(); - } -} +package com.baeldung.springsecuritythymeleaf; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; + +@Configuration +@EnableWebSecurity +public class SecurityConfiguration extends WebSecurityConfigurerAdapter { + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.authorizeRequests() + .anyRequest() + .authenticated() + .and() + .formLogin() + .loginPage("/login") + .permitAll() + .successForwardUrl("/index") + .and() + .logout() + .permitAll() + .logoutRequestMatcher(new AntPathRequestMatcher("/logout")) + .logoutSuccessUrl("/login"); + } + + @Autowired + public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { + auth.inMemoryAuthentication() + .withUser("user") + .password(passwordEncoder().encode("password")) + .roles("USER") + .and() + .withUser("admin") + .password(passwordEncoder().encode("admin")) + .roles("ADMIN"); + } + + @Bean + public BCryptPasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } +} diff --git a/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplication.java b/spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplication.java similarity index 100% rename from spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplication.java rename to spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplication.java diff --git a/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/ViewController.java b/spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/ViewController.java similarity index 95% rename from spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/ViewController.java rename to spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/ViewController.java index a2337f9db5..bb8f04d965 100644 --- a/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/ViewController.java +++ b/spring-security-modules/spring-security-thymeleaf/src/main/java/com/baeldung/springsecuritythymeleaf/ViewController.java @@ -1,18 +1,18 @@ -package com.baeldung.springsecuritythymeleaf; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -@Controller -public class ViewController { - - @RequestMapping("/login") - public String login() { - return "login"; - } - - @RequestMapping({ "/index", "/" }) - public String index() { - return "index"; - } -} +package com.baeldung.springsecuritythymeleaf; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +public class ViewController { + + @RequestMapping("/login") + public String login() { + return "login"; + } + + @RequestMapping({ "/index", "/" }) + public String index() { + return "index"; + } +} diff --git a/spring-security-thymeleaf/src/main/resources/application.properties b/spring-security-modules/spring-security-thymeleaf/src/main/resources/application.properties similarity index 100% rename from spring-security-thymeleaf/src/main/resources/application.properties rename to spring-security-modules/spring-security-thymeleaf/src/main/resources/application.properties diff --git a/spring-security-thymeleaf/src/main/resources/logback.xml b/spring-security-modules/spring-security-thymeleaf/src/main/resources/logback.xml similarity index 100% rename from spring-security-thymeleaf/src/main/resources/logback.xml rename to spring-security-modules/spring-security-thymeleaf/src/main/resources/logback.xml diff --git a/spring-security-thymeleaf/src/main/resources/templates/index.html b/spring-security-modules/spring-security-thymeleaf/src/main/resources/templates/index.html similarity index 97% rename from spring-security-thymeleaf/src/main/resources/templates/index.html rename to spring-security-modules/spring-security-thymeleaf/src/main/resources/templates/index.html index 27426ec496..a419655d9e 100644 --- a/spring-security-thymeleaf/src/main/resources/templates/index.html +++ b/spring-security-modules/spring-security-thymeleaf/src/main/resources/templates/index.html @@ -1,18 +1,18 @@ - - - -Welcome to Spring Security Thymeleaf tutorial - - -

Welcome

-

Spring Security Thymeleaf tutorial

-
Text visible to user.
-
Text visible to admin.
-
Text visible only to - authenticated users.
- Authenticated username: -
- Authenticated user roles: -
- + + + +Welcome to Spring Security Thymeleaf tutorial + + +

Welcome

+

Spring Security Thymeleaf tutorial

+
Text visible to user.
+
Text visible to admin.
+
Text visible only to + authenticated users.
+ Authenticated username: +
+ Authenticated user roles: +
+ \ No newline at end of file diff --git a/spring-security-thymeleaf/src/main/resources/templates/login.html b/spring-security-modules/spring-security-thymeleaf/src/main/resources/templates/login.html similarity index 97% rename from spring-security-thymeleaf/src/main/resources/templates/login.html rename to spring-security-modules/spring-security-thymeleaf/src/main/resources/templates/login.html index 0177f7d8e8..f4a32e0911 100644 --- a/spring-security-thymeleaf/src/main/resources/templates/login.html +++ b/spring-security-modules/spring-security-thymeleaf/src/main/resources/templates/login.html @@ -1,15 +1,15 @@ - - - -Custom Login Page - - -

Custom Login Page

-
- : : -
- + + + +Custom Login Page + + +

Custom Login Page

+
+ : : +
+ \ No newline at end of file diff --git a/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplicationIntegrationTest.java b/spring-security-modules/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplicationIntegrationTest.java similarity index 100% rename from spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplicationIntegrationTest.java rename to spring-security-modules/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/SpringSecurityThymeleafApplicationIntegrationTest.java diff --git a/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/ViewControllerIntegrationTest.java b/spring-security-modules/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/ViewControllerIntegrationTest.java similarity index 97% rename from spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/ViewControllerIntegrationTest.java rename to spring-security-modules/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/ViewControllerIntegrationTest.java index d2e7354d2d..c87d1bacc3 100644 --- a/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/ViewControllerIntegrationTest.java +++ b/spring-security-modules/spring-security-thymeleaf/src/test/java/com/baeldung/springsecuritythymeleaf/ViewControllerIntegrationTest.java @@ -1,27 +1,27 @@ -package com.baeldung.springsecuritythymeleaf; - -import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; - -@RunWith(SpringRunner.class) -@WebMvcTest -public class ViewControllerIntegrationTest { - - @Autowired - MockMvc mockMvc; - - @Test - public void givenUser_whenPerformingGet_thenReturnsIndex() throws Exception { - mockMvc.perform(get("/index").with(user("user").password("password"))).andExpect(status().isOk()).andExpect(view().name("index")); - } - -} +package com.baeldung.springsecuritythymeleaf; + +import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; + +@RunWith(SpringRunner.class) +@WebMvcTest +public class ViewControllerIntegrationTest { + + @Autowired + MockMvc mockMvc; + + @Test + public void givenUser_whenPerformingGet_thenReturnsIndex() throws Exception { + mockMvc.perform(get("/index").with(user("user").password("password"))).andExpect(status().isOk()).andExpect(view().name("index")); + } + +} diff --git a/spring-security-x509/README.md b/spring-security-modules/spring-security-x509/README.md similarity index 100% rename from spring-security-x509/README.md rename to spring-security-modules/spring-security-x509/README.md diff --git a/spring-security-x509/keystore/Makefile b/spring-security-modules/spring-security-x509/keystore/Makefile similarity index 100% rename from spring-security-x509/keystore/Makefile rename to spring-security-modules/spring-security-x509/keystore/Makefile diff --git a/spring-security-x509/keystore/keystore.jks b/spring-security-modules/spring-security-x509/keystore/keystore.jks similarity index 100% rename from spring-security-x509/keystore/keystore.jks rename to spring-security-modules/spring-security-x509/keystore/keystore.jks diff --git a/spring-security-x509/pom.xml b/spring-security-modules/spring-security-x509/pom.xml similarity index 95% rename from spring-security-x509/pom.xml rename to spring-security-modules/spring-security-x509/pom.xml index 5b44a13bf5..a4ff908eed 100644 --- a/spring-security-x509/pom.xml +++ b/spring-security-modules/spring-security-x509/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-security-x509/spring-security-x509-basic-auth/pom.xml b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/pom.xml similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/pom.xml rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/pom.xml diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/application.properties b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/application.properties similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/main/resources/application.properties rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/application.properties diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/logback.xml b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/logback.xml similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/main/resources/logback.xml rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/logback.xml diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/templates/user.html b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/templates/user.html similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/main/resources/templates/user.html rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/main/resources/templates/user.html diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java diff --git a/spring-security-x509/spring-security-x509-basic-auth/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-x509/spring-security-x509-basic-auth/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-x509/spring-security-x509-basic-auth/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-security-x509/spring-security-x509-client-auth/pom.xml b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/pom.xml similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/pom.xml rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/pom.xml diff --git a/spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/UserController.java diff --git a/spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/java/com/baeldung/spring/security/x509/X509AuthenticationServer.java diff --git a/spring-security-x509/spring-security-x509-client-auth/src/main/resources/application.properties b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/application.properties similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/main/resources/application.properties rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/application.properties diff --git a/spring-security-x509/spring-security-x509-client-auth/src/main/resources/keystore.jks b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/keystore.jks similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/main/resources/keystore.jks rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/keystore.jks diff --git a/spring-security-x509/spring-security-x509-client-auth/src/main/resources/logback.xml b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/logback.xml similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/main/resources/logback.xml rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/logback.xml diff --git a/spring-security-x509/spring-security-x509-client-auth/src/main/resources/templates/user.html b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/templates/user.html similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/main/resources/templates/user.html rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/main/resources/templates/user.html diff --git a/spring-security-x509/spring-security-x509-client-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/test/java/com/baeldung/spring/security/x509/X509AuthenticationServerIntegrationTest.java diff --git a/spring-security-x509/spring-security-x509-client-auth/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-x509/spring-security-x509-client-auth/src/test/java/org/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-x509/spring-security-x509-client-auth/src/test/java/org/baeldung/SpringContextTest.java