feat(user-service): Naver Oauth 로그인 추가.
Naver Oauth 로그인 추가.
This commit is contained in:
@@ -21,7 +21,7 @@ spring:
|
||||
predicates:
|
||||
- Path=/customer-frontend-service/**
|
||||
filters:
|
||||
- RewritePath=/owner-frontend-service/(?<segment>.*),/$\{segment}
|
||||
- RewritePath=/customer-frontend-service/(?<segment>.*),/$\{segment}
|
||||
- id: order-service
|
||||
uri: lb://ORDER-SERVCIE
|
||||
predicates:
|
||||
|
||||
@@ -7,9 +7,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@Slf4j
|
||||
@RequestMapping("/")
|
||||
public class CustomerController {
|
||||
|
||||
@GetMapping("/")
|
||||
public String index(){
|
||||
return "/index";
|
||||
}
|
||||
|
||||
@GetMapping("/food-home")
|
||||
public String hello(){
|
||||
|
||||
|
||||
@@ -5,11 +5,7 @@
|
||||
|
||||
<div layout:fragment="content" id="page">
|
||||
|
||||
<script type="text/javascript" >
|
||||
function init(){
|
||||
|
||||
}
|
||||
</script>
|
||||
<div class="page-content header-clear-medium" >
|
||||
|
||||
<div class="splide single-slider slider-no-dots slider-no-arrows mb-4" id="single-slider-1">
|
||||
|
||||
481
customer-frontend-service/src/main/resources/templates/index.html
Executable file
481
customer-frontend-service/src/main/resources/templates/index.html
Executable file
@@ -0,0 +1,481 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layouts/layout}">
|
||||
|
||||
<div layout:fragment="content" id="page">
|
||||
|
||||
<div id="footer-bar" class="footer-bar-1">
|
||||
<a href="index.html" class="active-nav"><i class="fa fa-home"></i><span>Home</span></a>
|
||||
<a href="index-components.html"><i class="fa fa-star"></i><span>Features</span></a>
|
||||
<a href="index-pages.html"><i class="fa fa-heart"></i><span>Pages</span></a>
|
||||
<a href="index-search.html"><i class="fa fa-search"></i><span>Search</span></a>
|
||||
<a href="#" data-menu="menu-settings"><i class="fa fa-cog"></i><span>Settings</span></a>
|
||||
</div>
|
||||
|
||||
<div class="page-content header-clear-small">
|
||||
|
||||
<div class="splide single-slider slider-no-arrows slider-no-dots" id="single-slider-home">
|
||||
<div class="splide__track">
|
||||
<div class="splide__list">
|
||||
<div class="splide__slide">
|
||||
<div class="card rounded-m shadow-l mx-3">
|
||||
<div class="card-bottom text-center mb-0">
|
||||
<h1 class="color-white font-700 mb-n1">StickyMobile</h1>
|
||||
<p class="color-white opacity-80 mb-4">The Menu Everyone Requested.</p>
|
||||
</div>
|
||||
<div class="card-overlay bg-gradient"></div>
|
||||
<img class="img-fluid" src="images/pictures/13.jpg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<div class="card rounded-m shadow-l mx-3">
|
||||
<div class="card-bottom text-center mb-0">
|
||||
<h1 class="color-white font-700 mb-n1">Carefuly Built</h1>
|
||||
<p class="color-white opacity-80 mb-4">Flexibility, Speed, Ease of Use.</p>
|
||||
</div>
|
||||
<div class="card-overlay bg-gradient"></div>
|
||||
<img class="img-fluid" src="images/pictures/28.jpg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<div class="card rounded-m shadow-l mx-3">
|
||||
<div class="card-bottom text-center mb-0">
|
||||
<h1 class="color-white font-700 mb-n1">Elite Quality</h1>
|
||||
<p class="color-white opacity-80 mb-4">Mobile Website, App or PWA Ready.</p>
|
||||
</div>
|
||||
<div class="card-overlay bg-gradient"></div>
|
||||
<img class="img-fluid" src="images/pictures/29.jpg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="splide single-slider slider-no-arrows slider-no-dots" id="single-slider-cta">
|
||||
<div class="splide__track">
|
||||
<div class="splide__list">
|
||||
<div class="splide__slide">
|
||||
<div class="card card-style">
|
||||
<div class="content mb-0">
|
||||
<h1 class="text-center mb-0">Call to Actions</h1>
|
||||
<p class="text-center color-highlight mt-n1 font-12">Sticky comes Prepared for You</p>
|
||||
<p class="boxed-text-xl mt-n3">
|
||||
Call to action are highly important, but we can't choose a style for you, so we created a few!
|
||||
</p>
|
||||
<a href="#" class="btn btn-m btn-center-l bg-red-dark text-uppercase font-900 text-uppercase rounded-s shadow-xl mb-4">Swipe Left to Begin</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="splide__slide">
|
||||
<div class="card card-style">
|
||||
<div class="content">
|
||||
<h1 class="text-center mb-0">Let's get Social</h1>
|
||||
<p class="text-center color-highlight mt-n1 font-12">Follow & Get in Touch with Us</p>
|
||||
<p class="boxed-text-xl mt-n3">
|
||||
It's easy. Just add your links and you're ready to go. Social links are wildely available in Sticky
|
||||
</p>
|
||||
<p class="text-center pb-2">
|
||||
<a href="#" class="icon icon-s rounded-s shadow-xl color-white bg-facebook"><i class="fab fa-facebook-f"></i></a>
|
||||
<a href="#" class="icon icon-s rounded-s shadow-xl color-white bg-phone ms-2 me-2"><i class="fa fa-phone"></i></a>
|
||||
<a href="#" class="icon icon-s rounded-s shadow-xl color-white bg-twitter"><i class="fab fa-twitter"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="splide__slide">
|
||||
<div class="card card-style">
|
||||
<div class="content mb-0">
|
||||
<h1 class="text-center mb-0">This or That?</h1>
|
||||
<p class="text-center color-highlight mt-n1 font-12">Which is your Favorite?</p>
|
||||
<p class="boxed-text-xl mt-n3">
|
||||
Multiple choices are awesome, highlighting them is even easier with our Call to Actions
|
||||
</p>
|
||||
<p class="text-center mt-n3 mb-0 pb-0">
|
||||
<a href="#" class="btn btn-m bg-green-dark text-uppercase font-900 text-uppercase rounded-s shadow-xl mb-4 mt-3">Call Now</a>
|
||||
<a href="#" class="icon icon-m rounded-s opacity-40 color-theme ms-3 me-3">or</a>
|
||||
<a href="#" class="btn btn-m bg-red-dark text-uppercase font-900 text-uppercase rounded-s shadow-xl mb-4 mt-3">GET A QUOTE</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="splide__slide">
|
||||
<div class="card card-style">
|
||||
<div class="content mb-0">
|
||||
<h1 class="text-center mb-0">Direct Action</h1>
|
||||
<p class="text-center color-highlight mt-n1 mb-2 font-12">Invite Users to Tap Button</p>
|
||||
<p class="boxed-text-xl">
|
||||
Make a button stand out at the top of your page so it's easily accessible as a first option.
|
||||
</p>
|
||||
<a href="#" class="btn btn-m btn-center-l bg-red-dark text-uppercase font-900 text-uppercase rounded-s shadow-xl mb-4">Purchase today for $25</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-style">
|
||||
<div class="content mb-0">
|
||||
<h1 class="text-center mb-0">Packed with Goodies</h1>
|
||||
<p class="text-center color-highlight font-11 mt-n1">The Absolute Best Products & Care for You</p>
|
||||
<p class="boxed-text-xl mt-n3">
|
||||
Over 10 years of Experience in Building Gorgeous Products only for you! We are Envato Elite.
|
||||
</p>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
<div class="row me-2 ms-2 mb-0">
|
||||
<div class="col-6 text-center">
|
||||
<i class="fa fa-trophy color-yellow-dark fa-3x"></i>
|
||||
<h2 class="mt-3 mb-1">Future Proof</h2>
|
||||
<p>Built to last, with the latest quality code</p>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<i class="fab fa-cloudscale color-highlight fa-3x"></i>
|
||||
<h2 class="mt-3 mb-1">Powerful</h2>
|
||||
<p>Speed, Features and Flexibility all in One!</p>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<i class="fa fa-check color-green-dark fa-3x"></i>
|
||||
<h2 class="mt-3 mb-1">Easy to Use</h2>
|
||||
<p>Customers love our work for it's ease.</p>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<i class="fa fa-life-ring color-blue-dark fa-3x"></i>
|
||||
<h2 class="mt-3 mb-1">Customer Care</h2>
|
||||
<p>We treat others like we want to be treated.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="splide double-slider slider-no-arrows slider-no-dots" id="double-slider-home-1">
|
||||
<div class="splide__track">
|
||||
<div class="splide__list">
|
||||
<div class="splide__slide">
|
||||
<div data-card-height="250" class="card mx-3 rounded-m shadow-l bg-13">
|
||||
<div class="card-bottom text-center">
|
||||
<h2 class="color-white font-900 mb-0">EazyMobile</h2>
|
||||
<p class="text-center mb-3">
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
</p>
|
||||
<a href="#" class="btn btn-s btn-full text-uppercase font-900 bg-red-dark rounded-s me-2 ms-2 mb-2">Purchase</a>
|
||||
</div>
|
||||
<div class="card-overlay bg-gradient"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<div data-card-height="250" class="card mx-3 rounded-m shadow-l bg-27">
|
||||
<div class="card-bottom text-center">
|
||||
<h2 class="color-white font-900 mb-0">UltraMobile</h2>
|
||||
<p class="text-center mb-3">
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
</p>
|
||||
<a href="#" class="btn btn-s btn-full text-uppercase font-900 bg-red-dark rounded-s me-2 ms-2 mb-2">Purchase</a>
|
||||
</div>
|
||||
<div class="card-overlay bg-gradient"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<div data-card-height="250" class="card mx-3 rounded-m shadow-l bg-17">
|
||||
<div class="card-bottom text-center">
|
||||
<h2 class="color-white font-900 mb-0">KolorMobile</h2>
|
||||
<p class="text-center mb-3">
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
</p>
|
||||
<a href="#" class="btn btn-s btn-full text-uppercase font-900 bg-red-dark rounded-s me-2 ms-2 mb-2">Purchase</a>
|
||||
</div>
|
||||
<div class="card-overlay bg-gradient"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-style">
|
||||
<div class="content mb-4">
|
||||
<h1 class="text-center mb-0">Care & Quality</h1>
|
||||
<p class="text-center color-highlight font-11 mt-n1 pb-0">No stone left unturned, no aspect overlooked.</p>
|
||||
<p class="text-center font-20 mt-n2">
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
<i class="fa fa-star color-yellow-dark"></i>
|
||||
</p>
|
||||
<div class="splide single-slider slider-no-arrows slider-no-dots" id="single-slider-home-quotes">
|
||||
<div class="splide__track">
|
||||
<div class="splide__list">
|
||||
<div class="splide__slide">
|
||||
<h2 class="text-center font-300 line-height-xl content mb-0 mt-0">
|
||||
The code is always great with any Enabled template, the customer support that wins me over always.
|
||||
</h2>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<h2 class="text-center font-300 line-height-xl content mb-0 mt-0">
|
||||
The best support I have ever had, it's so good I purchased another theme. Highlighy Recommended.
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="btn btn-m btn-center-l text-uppercase font-900 bg-red-dark rounded-sm shadow-xl mt-4 mb-0">More Testimonials</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="splide double-slider slider-no-arrows slider-no-dots" id="double-slider-home-2">
|
||||
<div class="splide__track">
|
||||
<div class="splide__list">
|
||||
<div class="splide__slide">
|
||||
<div data-card-height="180" class="card mx-3 rounded-m shadow-l bg-18">
|
||||
<div class="card-top ms-3 mt-3">
|
||||
<i class="fa fa-bolt fa-4x color-red-dark"></i>
|
||||
</div>
|
||||
<div class="card-bottom ms-3">
|
||||
<h2 class="color-white font-900 mb-0">Performance</h2>
|
||||
<p class="color-white font-11 mt-n1 mb-2">Fast and feature filled</p>
|
||||
</div>
|
||||
<div class="card-overlay bg-black opacity-80"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<div data-card-height="180" class="card mx-3 rounded-m shadow-l bg-14">
|
||||
<div class="card-top ms-3 mt-3">
|
||||
<i class="fa fa-trophy fa-4x color-blue-dark"></i>
|
||||
</div>
|
||||
<div class="card-bottom ms-3">
|
||||
<h2 class="color-white font-900 mb-0">Elite Care</h2>
|
||||
<p class="color-white font-11 mt-n1 mb-2">Built by the Best for You</p>
|
||||
</div>
|
||||
<div class="card-overlay bg-black opacity-80"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splide__slide">
|
||||
<div data-card-height="180" class="card mx-3 rounded-m shadow-l bg-3">
|
||||
<div class="card-top ms-3 mt-3">
|
||||
<i class="fa fa-star fa-4x color-yellow-dark"></i>
|
||||
</div>
|
||||
<div class="card-bottom ms-3">
|
||||
<h2 class="color-white font-900 mb-0">Quality</h2>
|
||||
<p class="color-white font-11 mt-n1 mb-2">Built with Care and Detail</p>
|
||||
</div>
|
||||
<div class="card-overlay bg-black opacity-80"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-style">
|
||||
<div class="content mt-0 mb-0">
|
||||
<div class="list-group list-custom-large">
|
||||
<a href="#" data-toggle-theme data-trigger-switch="toggle-dark-home" class="border-0">
|
||||
<i class="fa font-12 fa-moon rounded-s bg-highlight color-white me-3"></i>
|
||||
<span class="font-600">Dark Mode</span>
|
||||
<strong>Sticky will Remember</strong>
|
||||
<div class="custom-control scale-switch ios-switch">
|
||||
<input data-toggle-theme type="checkbox" class="ios-input" id="toggle-dark-home">
|
||||
<label class="custom-control-label" for="toggle-dark-home"></label>
|
||||
</div>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card card-style">
|
||||
<div class="content mb-0">
|
||||
<h1 class="text-center mb-0">Get Sticky Today</h1>
|
||||
<p class="text-center color-highlight font-11 mt-n1 pb-0">Tons of Awesome Features just for You.</p>
|
||||
<p class="boxed-text-xl mt-n3">
|
||||
Fast, easy to use and filled with features. Get Sticky Today and give your site the Mobile Feeling it deserves.
|
||||
</p>
|
||||
<a href="#" class="btn btn-m btn-center-l text-uppercase font-900 bg-red-dark rounded-sm shadow-xl mb-4">Purchase Now - $25</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer card card-style">
|
||||
<a href="#" class="footer-title"><span class="color-highlight">StickyMobile</span></a>
|
||||
<p class="footer-text"><span>Made with <i class="fa fa-heart color-highlight font-16 ps-2 pe-2"></i> by Enabled</span><br><br>Powered by the best Mobile Website Developer on Envato Market. Elite Quality. Elite Products.</p>
|
||||
<div class="text-center mb-3">
|
||||
<a href="#" class="icon icon-xs rounded-sm shadow-l me-1 bg-facebook"><i class="fab fa-facebook-f"></i></a>
|
||||
<a href="#" class="icon icon-xs rounded-sm shadow-l me-1 bg-twitter"><i class="fab fa-twitter"></i></a>
|
||||
<a href="#" class="icon icon-xs rounded-sm shadow-l me-1 bg-phone"><i class="fa fa-phone"></i></a>
|
||||
<a href="#" data-menu="menu-share" class="icon icon-xs rounded-sm me-1 shadow-l bg-red-dark"><i class="fa fa-share-alt"></i></a>
|
||||
<a href="#" class="back-to-top icon icon-xs rounded-sm shadow-l bg-dark-light"><i class="fa fa-angle-up"></i></a>
|
||||
</div>
|
||||
<p class="footer-copyright">Copyright © Enabled <span id="copyright-year">2017</span>. All Rights Reserved.</p>
|
||||
<p class="footer-links"><a href="#" class="color-highlight">Privacy Policy</a> | <a href="#" class="color-highlight">Terms and Conditions</a> | <a href="#" class="back-to-top color-highlight"> Back to Top</a></p>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- End of Page Content-->
|
||||
<!-- All Menus, Action Sheets, Modals, Notifications, Toasts, Snackbars get Placed outside the <div class="page-content"> -->
|
||||
<div id="menu-settings" class="menu menu-box-bottom menu-box-detached">
|
||||
<div class="menu-title mt-0 pt-0"><h1>Settings</h1><p class="color-highlight">Flexible and Easy to Use</p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||
<div class="divider divider-margins mb-n2"></div>
|
||||
<div class="content">
|
||||
<div class="list-group list-custom-small">
|
||||
<a href="#" data-toggle-theme data-trigger-switch="switch-dark-mode" class="pb-2 ms-n1">
|
||||
<i class="fa font-12 fa-moon rounded-s bg-highlight color-white me-3"></i>
|
||||
<span>Dark Mode</span>
|
||||
<div class="custom-control scale-switch ios-switch">
|
||||
<input data-toggle-theme type="checkbox" class="ios-input" id="switch-dark-mode">
|
||||
<label class="custom-control-label" for="switch-dark-mode"></label>
|
||||
</div>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="list-group list-custom-large">
|
||||
<a data-menu="menu-highlights" href="#">
|
||||
<i class="fa font-14 fa-tint bg-green-dark rounded-s"></i>
|
||||
<span>Page Highlight</span>
|
||||
<strong>16 Colors Highlights Included</strong>
|
||||
<span class="badge bg-highlight color-white">HOT</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<a data-menu="menu-backgrounds" href="#" class="border-0">
|
||||
<i class="fa font-14 fa-cog bg-blue-dark rounded-s"></i>
|
||||
<span>Background Color</span>
|
||||
<strong>10 Page Gradients Included</strong>
|
||||
<span class="badge bg-highlight color-white">NEW</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Menu Settings Highlights-->
|
||||
<div id="menu-highlights" class="menu menu-box-bottom menu-box-detached">
|
||||
<div class="menu-title"><h1>Highlights</h1><p class="color-highlight">Any Element can have a Highlight Color</p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||
<div class="divider divider-margins mb-n2"></div>
|
||||
<div class="content">
|
||||
<div class="highlight-changer">
|
||||
<a href="#" data-change-highlight="blue"><i class="fa fa-circle color-blue-dark"></i><span class="color-blue-light">Default</span></a>
|
||||
<a href="#" data-change-highlight="red"><i class="fa fa-circle color-red-dark"></i><span class="color-red-light">Red</span></a>
|
||||
<a href="#" data-change-highlight="orange"><i class="fa fa-circle color-orange-dark"></i><span class="color-orange-light">Orange</span></a>
|
||||
<a href="#" data-change-highlight="pink2"><i class="fa fa-circle color-pink2-dark"></i><span class="color-pink-dark">Pink</span></a>
|
||||
<a href="#" data-change-highlight="magenta"><i class="fa fa-circle color-magenta-dark"></i><span class="color-magenta-light">Purple</span></a>
|
||||
<a href="#" data-change-highlight="aqua"><i class="fa fa-circle color-aqua-dark"></i><span class="color-aqua-light">Aqua</span></a>
|
||||
<a href="#" data-change-highlight="teal"><i class="fa fa-circle color-teal-dark"></i><span class="color-teal-light">Teal</span></a>
|
||||
<a href="#" data-change-highlight="mint"><i class="fa fa-circle color-mint-dark"></i><span class="color-mint-light">Mint</span></a>
|
||||
<a href="#" data-change-highlight="green"><i class="fa fa-circle color-green-light"></i><span class="color-green-light">Green</span></a>
|
||||
<a href="#" data-change-highlight="grass"><i class="fa fa-circle color-green-dark"></i><span class="color-green-dark">Grass</span></a>
|
||||
<a href="#" data-change-highlight="sunny"><i class="fa fa-circle color-yellow-light"></i><span class="color-yellow-light">Sunny</span></a>
|
||||
<a href="#" data-change-highlight="yellow"><i class="fa fa-circle color-yellow-dark"></i><span class="color-yellow-light">Goldish</span></a>
|
||||
<a href="#" data-change-highlight="brown"><i class="fa fa-circle color-brown-dark"></i><span class="color-brown-light">Wood</span></a>
|
||||
<a href="#" data-change-highlight="night"><i class="fa fa-circle color-dark-dark"></i><span class="color-dark-light">Night</span></a>
|
||||
<a href="#" data-change-highlight="dark"><i class="fa fa-circle color-dark-light"></i><span class="color-dark-light">Dark</span></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<a href="#" data-menu="menu-settings" class="mb-3 btn btn-full btn-m rounded-sm bg-highlight shadow-xl text-uppercase font-900 mt-4">Back to Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Menu Settings Backgrounds-->
|
||||
<div id="menu-backgrounds" class="menu menu-box-bottom menu-box-detached">
|
||||
<div class="menu-title"><h1>Backgrounds</h1><p class="color-highlight">Change Page Color Behind Content Boxes</p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||
<div class="divider divider-margins mb-n2"></div>
|
||||
<div class="content">
|
||||
<div class="background-changer">
|
||||
<a href="#" data-change-background="default"><i class="bg-theme"></i><span class="color-dark-dark">Default</span></a>
|
||||
<a href="#" data-change-background="plum"><i class="body-plum"></i><span class="color-plum-dark">Plum</span></a>
|
||||
<a href="#" data-change-background="magenta"><i class="body-magenta"></i><span class="color-dark-dark">Magenta</span></a>
|
||||
<a href="#" data-change-background="dark"><i class="body-dark"></i><span class="color-dark-dark">Dark</span></a>
|
||||
<a href="#" data-change-background="violet"><i class="body-violet"></i><span class="color-violet-dark">Violet</span></a>
|
||||
<a href="#" data-change-background="red"><i class="body-red"></i><span class="color-red-dark">Red</span></a>
|
||||
<a href="#" data-change-background="green"><i class="body-green"></i><span class="color-green-dark">Green</span></a>
|
||||
<a href="#" data-change-background="sky"><i class="body-sky"></i><span class="color-sky-dark">Sky</span></a>
|
||||
<a href="#" data-change-background="orange"><i class="body-orange"></i><span class="color-orange-dark">Orange</span></a>
|
||||
<a href="#" data-change-background="yellow"><i class="body-yellow"></i><span class="color-yellow-dark">Yellow</span></a>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<a href="#" data-menu="menu-settings" class="mb-3 btn btn-full btn-m rounded-sm bg-highlight shadow-xl text-uppercase font-900 mt-4">Back to Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Menu Share -->
|
||||
<div id="menu-share" class="menu menu-box-bottom menu-box-detached">
|
||||
<div class="menu-title mt-n1"><h1>Share the Love</h1><p class="color-highlight">Just Tap the Social Icon. We'll add the Link</p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||
<div class="content mb-0">
|
||||
<div class="divider mb-0"></div>
|
||||
<div class="list-group list-custom-small list-icon-0">
|
||||
<a href="auto_generated" class="shareToFacebook external-link">
|
||||
<i class="font-18 fab fa-facebook-square color-facebook"></i>
|
||||
<span class="font-13">Facebook</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<a href="auto_generated" class="shareToTwitter external-link">
|
||||
<i class="font-18 fab fa-twitter-square color-twitter"></i>
|
||||
<span class="font-13">Twitter</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<a href="auto_generated" class="shareToLinkedIn external-link">
|
||||
<i class="font-18 fab fa-linkedin color-linkedin"></i>
|
||||
<span class="font-13">LinkedIn</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<a href="auto_generated" class="shareToWhatsApp external-link">
|
||||
<i class="font-18 fab fa-whatsapp-square color-whatsapp"></i>
|
||||
<span class="font-13">WhatsApp</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
<a href="auto_generated" class="shareToMail external-link border-0">
|
||||
<i class="font-18 fa fa-envelope-square color-mail"></i>
|
||||
<span class="font-13">Email</span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Be sure this is on your main visiting page, for example, the index.html page-->
|
||||
<!-- Install Prompt for Android -->
|
||||
<div id="menu-install-pwa-android" class="menu menu-box-bottom menu-box-detached rounded-l">
|
||||
<div class="boxed-text-l mt-4 pb-3">
|
||||
<img class="rounded-l mb-3" src="app/icons/icon-128x128.png" alt="img" width="90">
|
||||
<h4 class="mt-3">Add Sticky on your Home Screen</h4>
|
||||
<p>
|
||||
Install Sticky on your home screen, and access it just like a regular app. It really is that simple!
|
||||
</p>
|
||||
<a href="#" class="pwa-install btn btn-s rounded-s shadow-l text-uppercase font-900 bg-highlight mb-2">Add to Home Screen</a><br>
|
||||
<a href="#" class="pwa-dismiss close-menu color-gray-dark text-uppercase font-900 opacity-60 font-10 pt-2">Maybe later</a>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Install instructions for iOS -->
|
||||
<div id="menu-install-pwa-ios"
|
||||
class="menu menu-box-bottom menu-box-detached rounded-l">
|
||||
<div class="boxed-text-xl mt-4 pb-3">
|
||||
<img class="rounded-l mb-3" src="app/icons/icon-128x128.png" alt="img" width="90">
|
||||
<h4 class="mt-3">Add Sticky on your Home Screen</h4>
|
||||
<p class="mb-0 pb-0">
|
||||
Install Sticky, and access it like a regular app. Open your Safari menu and tap "Add to Home Screen".
|
||||
</p>
|
||||
<div class="clearfix pt-3"></div>
|
||||
<a href="#" class="pwa-dismiss close-menu color-highlight text-uppercase font-700">Maybe later</a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" >
|
||||
function init(){
|
||||
alert()
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.justpickup.userservice.domain.user.dto;
|
||||
|
||||
import com.justpickup.userservice.domain.user.entity.AuthType;
|
||||
import com.justpickup.userservice.domain.user.entity.Customer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OAuthAttributeDto {
|
||||
private Map<String, Object> attributes; // OAuth2 반환하는 유저정보 MAP
|
||||
private String nameAttributeKey;
|
||||
private String name;
|
||||
private String email;
|
||||
private AuthType authType;
|
||||
|
||||
|
||||
public OAuthAttributeDto(Map<String, Object> attributes, String nameAttributeKey, String name, String email) {
|
||||
this.attributes = attributes;
|
||||
this.nameAttributeKey = nameAttributeKey;
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public static OAuthAttributeDto of(String registrationId, String userNameAttributeName, Map<String, Object> attributes){
|
||||
// 여기서 네이버와 카카오 등 구분 (ofNaver, ofKakao)
|
||||
if("naver".equals(registrationId))
|
||||
return ofNaver(userNameAttributeName , attributes);
|
||||
|
||||
return ofGoogle(userNameAttributeName, attributes);
|
||||
}
|
||||
|
||||
private static OAuthAttributeDto ofNaver(String userNameAttributeName, Map<String, Object> attributes) {
|
||||
Map<String, Object> response = (Map<String, Object>) attributes.get("response");
|
||||
return OAuthAttributeDto.builder()
|
||||
.name((String) response.get("name"))
|
||||
.email((String) response.get("email"))
|
||||
.nameAttributeKey("id")
|
||||
.attributes(response)
|
||||
.authType(AuthType.NAVER)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
private static OAuthAttributeDto ofGoogle(String userNameAttributeName, Map<String, Object> attributes) {
|
||||
return OAuthAttributeDto.builder()
|
||||
.name((String) attributes.get("name"))
|
||||
.email((String) attributes.get("email"))
|
||||
.nameAttributeKey(userNameAttributeName)
|
||||
.attributes(attributes)
|
||||
.authType(AuthType.GOOGLE)
|
||||
.build();
|
||||
}
|
||||
|
||||
public Customer toEntity(OAuthAttributeDto attributeDto){
|
||||
return new Customer(email,"temp",name,null, attributeDto.getAuthType());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.justpickup.userservice.domain.user.entity;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum Role {
|
||||
GUEST("ROLE_GUEST", "손님"),
|
||||
USER("ROLE_USER", "일반 사용자");
|
||||
|
||||
private final String key;
|
||||
private final String title;
|
||||
}
|
||||
@@ -1,23 +1,14 @@
|
||||
package com.justpickup.userservice.domain.user.service;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.justpickup.userservice.domain.user.dto.CustomerDto;
|
||||
import com.justpickup.userservice.domain.user.dto.OAuthAttributeDto;
|
||||
import com.justpickup.userservice.domain.user.entity.AuthType;
|
||||
import com.justpickup.userservice.domain.user.entity.Customer;
|
||||
import com.justpickup.userservice.domain.user.exception.NotExistUserException;
|
||||
import com.justpickup.userservice.domain.user.repository.CustomerRepository;
|
||||
import lombok.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.data.annotation.ReadOnlyProperty;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService;
|
||||
import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
|
||||
@@ -27,14 +18,10 @@ import org.springframework.security.oauth2.core.user.DefaultOAuth2User;
|
||||
import org.springframework.security.oauth2.core.user.OAuth2User;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@@ -43,7 +30,7 @@ import java.util.function.Function;
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
private final CustomerRepository customerRepository;
|
||||
private final HttpSession httpSession;
|
||||
private final HttpServletResponse response;
|
||||
private final Environment env;
|
||||
|
||||
@Override
|
||||
@@ -98,7 +85,7 @@ public class UserServiceImpl implements UserService {
|
||||
.orElse(attributeDto.toEntity(attributeDto))
|
||||
);
|
||||
|
||||
httpSession.setAttribute("user", new SessionCustomer(customer)); // SessionUser (직렬화된 dto 클래스 사용)
|
||||
// TODO: 2022/02/16 Response에 token 담아 보내기
|
||||
|
||||
return new DefaultOAuth2User(
|
||||
Collections.singleton(new SimpleGrantedAuthority(customer.getRole().getKey()))
|
||||
@@ -108,11 +95,11 @@ public class UserServiceImpl implements UserService {
|
||||
}
|
||||
|
||||
@Getter
|
||||
public class SessionCustomer implements Serializable {
|
||||
public static class UserPayload implements Serializable {
|
||||
private String name;
|
||||
private String email;
|
||||
|
||||
public SessionCustomer(Customer user){
|
||||
public UserPayload(Customer user){
|
||||
this.name = user.getName();
|
||||
this.email = user.getEmail();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class WebSecurity extends WebSecurityConfigurerAdapter {
|
||||
.logoutSuccessUrl("/")
|
||||
.and()
|
||||
.oauth2Login()
|
||||
.defaultSuccessUrl("http://just-pickup.com:8000/customer-frontend-service/")
|
||||
.userInfoEndpoint()
|
||||
.userService(userService);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user