From 6ad3ee0e55f4b37d66c32f2e623104a606c815a6 Mon Sep 17 00:00:00 2001 From: vijay-eis Date: Fri, 3 Mar 2023 19:29:35 +0000 Subject: [PATCH 1/6] build(US000000):Preparing for 1.0.8-SNAPSHOT development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f697a8..e1fa5d5 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.vijay mod-spring-sample - 1.0.7-SNAPSHOT + 1.0.8-SNAPSHOT mod-spring-sample mod-spring-sample From fa66ee823abbbc5482a67dcb0f3fd7dc02d045fa Mon Sep 17 00:00:00 2001 From: vijay-eis <95888656+vijay-eis@users.noreply.github.com> Date: Fri, 3 Mar 2023 14:35:51 -0500 Subject: [PATCH 2/6] chore(US00000):Post v1.0.7 release tasks * build(US000000):Setting release version v1.0.0 for the artifact * Update Release Notes for v1.0.0 * build(US000000):Setting release version v1.0.1 for the artifact * Update Release Notes for v1.0.1 * build(US000000):Setting release version v1.0.2 for the artifact * Update Release Notes for v1.0.2 * build(US000000):Setting release version v1.0.3 for the artifact * Update Release Notes for v1.0.3 * build(US000000):Setting release version v1.0.4 for the artifact * build(US000000):Setting release version v1.0.5 for the artifact * Update Release Notes for v1.0.5 * build(US000000):Setting release version v1.0.6 for the artifact * Update Release Notes for v1.0.6 * build(US000000):Setting release version v1.0.7 for the artifact * Update Release Notes for v1.0.7 --- NEWS.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NEWS.md b/NEWS.md index 4b378d0..39b4c97 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,24 @@ +## [v1.0.7](https://gitlab.com/html-validate/html-validate/compare/v1.0.7) (2023-03-03) + +### :stop_sign: Breaking changes :stop_sign: +- [US00021](https://rally1.rallydev.com/#/search?keywords=US00021) Change route to have a smaller name (#13) ([9eb756f482b9a99](https://github.com/vijay-eis/mod-spring-sample/commit/9eb756f482b9a99)) + + +### :sparkle: Features :sparkle: +- [US00022](https://rally1.rallydev.com/#/search?keywords=US00022) Change route to have a bigger name (#14) ([ddcd59cd020540d](https://github.com/vijay-eis/mod-spring-sample/commit/ddcd59cd020540d)) + + +### :lady_beetle: Fixes :lady_beetle: +- [US00021](https://rally1.rallydev.com/#/search?keywords=US00021) Change route to have a smaller name (#13) ([9eb756f482b9a99](https://github.com/vijay-eis/mod-spring-sample/commit/9eb756f482b9a99)) + +## [v1.0.6](https://gitlab.com/html-validate/html-validate/compare/v1.0.6) (2023-03-03) + + + + + + + ## [v1.0.6](https://gitlab.com/html-validate/html-validate/compare/v1.0.6) (2023-03-03) From 96035e15e0972898e25816ae82c4a2fdf3e7dc94 Mon Sep 17 00:00:00 2001 From: vijay Date: Sat, 4 Mar 2023 17:51:35 -0500 Subject: [PATCH 3/6] feat(US00022): Add Auth controller. Test cookies --- .../spring/controller/AuthController.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/main/java/com/vijay/spring/controller/AuthController.java diff --git a/src/main/java/com/vijay/spring/controller/AuthController.java b/src/main/java/com/vijay/spring/controller/AuthController.java new file mode 100644 index 0000000..b3952d5 --- /dev/null +++ b/src/main/java/com/vijay/spring/controller/AuthController.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.vijay.spring.controller; + +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletResponse; +import lombok.extern.log4j.Log4j2; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +@RestController +@Log4j2 +public class AuthController { + @GetMapping("/auth/signin") + @ResponseBody + public ResponseEntity signIn(@RequestParam String credentials, HttpServletResponse response) { + log.info("Signing in.."); + Cookie cookie = new Cookie("token", "A1B2C3D4E5F6G7H8"); + cookie.setHttpOnly(true); + response.addCookie(cookie); + return new ResponseEntity<>("OK",HttpStatus.OK); + } + + @GetMapping("/auth/logout") + @ResponseBody + public ResponseEntity logout(HttpServletResponse response) { + log.info("logging out.."); + Cookie cookie = new Cookie("token", ""); + cookie.setHttpOnly(true); + cookie.setMaxAge(0); + response.addCookie(cookie); + return new ResponseEntity<>(HttpStatus.OK); + } + + @GetMapping("/auth/profile") + @ResponseBody + public ResponseEntity getProfile(@CookieValue(name = "token") String token) { + log.info("Get token.."); + return new ResponseEntity<>(token,HttpStatus.OK); + } +} From 3fefbc68d5f9d19430dadbc1e90230c99ed994bc Mon Sep 17 00:00:00 2001 From: vijay-eis Date: Thu, 13 Jul 2023 13:27:15 -0400 Subject: [PATCH 4/6] fix: Incorrect response message --- src/main/java/com/vijay/spring/controller/AuthController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/vijay/spring/controller/AuthController.java b/src/main/java/com/vijay/spring/controller/AuthController.java index b3952d5..3262de1 100644 --- a/src/main/java/com/vijay/spring/controller/AuthController.java +++ b/src/main/java/com/vijay/spring/controller/AuthController.java @@ -36,7 +36,7 @@ public ResponseEntity signIn(@RequestParam String credentials, HttpServletRes Cookie cookie = new Cookie("token", "A1B2C3D4E5F6G7H8"); cookie.setHttpOnly(true); response.addCookie(cookie); - return new ResponseEntity<>("OK",HttpStatus.OK); + return new ResponseEntity<>("LOGINOK",HttpStatus.OK); } @GetMapping("/auth/logout") From e06b2fde0ea7a01ba81b34967625a6b9eff2ad51 Mon Sep 17 00:00:00 2001 From: vijay-eis Date: Thu, 13 Jul 2023 13:32:07 -0400 Subject: [PATCH 5/6] build(US000000):Setting release version v1.0.8 for the artifact --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e1fa5d5..2191b7f 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.vijay mod-spring-sample - 1.0.8-SNAPSHOT + 1.0.8 mod-spring-sample mod-spring-sample From 105f664d081c651b9489956420fe3a2284d353ab Mon Sep 17 00:00:00 2001 From: vijay-eis Date: Thu, 13 Jul 2023 13:37:55 -0400 Subject: [PATCH 6/6] Update Release Notes for v1.0.8 --- NEWS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NEWS.md b/NEWS.md index 39b4c97..4609468 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,15 @@ +## [v1.0.8](https://gitlab.com/html-validate/html-validate/compare/v1.0.8) (2023-07-13) + + + +### :sparkle: Features :sparkle: +- [US00022](https://rally1.rallydev.com/#/search?keywords=US00022) Add Auth controller. ([96035e15e097289](https://github.com/vijay-eis/mod-spring-sample/commit/96035e15e097289)) + + +### :lady_beetle: Fixes :lady_beetle: +- Incorrect response message ([3fefbc68d5f9d19](https://github.com/vijay-eis/mod-spring-sample/commit/3fefbc68d5f9d19)) + + ## [v1.0.7](https://gitlab.com/html-validate/html-validate/compare/v1.0.7) (2023-03-03) ### :stop_sign: Breaking changes :stop_sign: