{"id":77680,"date":"2018-06-05T16:00:03","date_gmt":"2018-06-05T13:00:03","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=77680"},"modified":"2018-06-05T12:19:49","modified_gmt":"2018-06-05T09:19:49","slug":"security-spring-boot-password-encoder","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html","title":{"rendered":"Spring Security with Spring Boot 2.0: Password Encoder"},"content":{"rendered":"<p>On a previous <a href=\"https:\/\/www.javacodegeeks.com\/2018\/05\/spring-security-with-spring-boot-2-0-userdetailsservice.html\">post<\/a> we used the user details service in order to provide a way to load our data from a function based on a username given.<\/p>\n<p>The implementation of the user details might be backed by an in-memory mechanism, a sql\/no-sql database etc.<br \/>\nThe options are unlimited.<\/p>\n<p>What we have to pay attention when it comes to password storage is the password hashing.<br \/>\nFor security reasons we want to store passwords in a hashed form.<br \/>\nSupposing someone gets unauthorized access to the table storing our user data. By storing the passwords clear text that person can retrieve the password of every user in the system.<\/p>\n<p>So we want a way to hash our passwords before storing them to database.<br \/>\nAlways be aware that your hashing has to be robust and up to date.<br \/>\nFor example MD5 was very popular in the past but nowadays leads to poor security. Actually it is possible to crack MD5 passwords fairly easy if you use a <a href=\"https:\/\/github.com\/xpn\/CUDA-MD5-Crack\">gpu<\/a>.<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/spring-framework-project.png\"><img decoding=\"async\" class=\"aligncenter wp-image-27777 size-full\" style=\"border: none;\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/spring-framework-project.png\" alt=\"Password Encoder Spring\" width=\"200\" height=\"200\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/spring-framework-project.png 200w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/spring-framework-project-150x150.png 150w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/spring-framework-project-100x100.png 100w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/07\/spring-framework-project-42x42.png 42w\" sizes=\"(max-width: 200px) 100vw, 200px\" \/><\/a><\/p>\n<p>Spring Security provides us with out of the box functionality when it comes to encoding passwords.<br \/>\nPassword encoder is an interface which is used through the authorization process.<\/p>\n<pre class=\"brush:java\">package org.springframework.security.crypto.password;\r\n\r\n\r\npublic interface PasswordEncoder {\r\n\r\n\tString encode(CharSequence rawPassword);\r\n\r\n\tboolean matches(CharSequence rawPassword, String encodedPassword);\r\n\r\n}<\/pre>\n<p>The encode function shall be used to encode your password and the matches function will check if your raw password matches the encoded password. Once your user details service fetches the user information from the database then the password given to authorize shall be validated with the one fetched from the database. In this case spring will use the matches function.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Now spring provides us with various implementations of a password encoder.<br \/>\nLet\u2019s try to create a password encoder bean.<\/p>\n<pre class=\"brush:java\">package com.gkatzioura.security.passwordencoder.security;\r\n\r\nimport org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.Configuration;\r\nimport org.springframework.security.crypto.password.PasswordEncoder;\r\n\r\n@Configuration\r\npublic class PasswordEncoderConfig {\r\n\r\n    @Bean\r\n    public PasswordEncoder passwordEncoder() {\r\n        return new PasswordEncoder() {\r\n            @Override\r\n            public String encode(CharSequence rawPassword) {\r\n                return rawPassword.toString();\r\n            }\r\n\r\n            @Override\r\n            public boolean matches(CharSequence rawPassword, String encodedPassword) {\r\n                return rawPassword.toString().equals(encodedPassword);\r\n            }\r\n        };\r\n    }\r\n}<\/pre>\n<p>This bean is no different that the NoOpPasswordEncoder which comes with spring boot.<br \/>\nNo we are going to do a small experiment and add a custom password encoder.<br \/>\nOur password encoder will compare the clear text password submitted by the user hash it and the compare it with an already hashed password from the equivalent user in our database.<\/p>\n<p>To do the hashing we will use bcrypt.<\/p>\n<pre class=\"brush:java\">@Bean\r\n    public PasswordEncoder customPasswordEncoder() {\r\n\r\n        return new PasswordEncoder() {\r\n\r\n            @Override\r\n            public String encode(CharSequence rawPassword) {\r\n\r\n                return BCrypt.hashpw(rawPassword.toString(), BCrypt.gensalt(4));\r\n            }\r\n\r\n            @Override\r\n            public boolean matches(CharSequence rawPassword, String encodedPassword) {\r\n\r\n                return BCrypt.checkpw(rawPassword.toString(), encodedPassword);\r\n            }\r\n        };\r\n    }<\/pre>\n<p>To test this we will set up our security by using the environmental variables as we\u2019ve seen on a previous <a href=\"https:\/\/www.javacodegeeks.com\/2018\/05\/spring-security-with-spring-boot-2-0-simple-authentication-using-the-servlet-stack.html\">post<\/a>.<\/p>\n<p>First we need to have our password encoded. Our system will not have the password stored in any clear text form.<\/p>\n<pre class=\"brush:bash\">System.out.println(BCrypt.hashpw(\"user-password\",BCrypt.gensalt(4)));\r\n$2a$04$i4UWtMw6surai4dQMhoKSeLddi1XlAh2sSyG58K3ZvBHqVkhz8Y3y<\/pre>\n<p>So what we are gonna do next is to set our environmental variables before running our spring boot application.<\/p>\n<pre class=\"brush:bash\">SPRING_SECURITY_USER_NAME=test-user\r\nSPRING_SECURITY_USER_PASSWORD=$2a$04$i4UWtMw6surai4dQMhoKSeLddi1XlAh2sSyG58K3ZvBHqVkhz8Y3y<\/pre>\n<p>Next step is to go to your login screen and give the credentials user-name and user-password.<br \/>\nAs you can see you have just been authenticated.<br \/>\nBehind the scenes spring hashed the password you submitted and compared to the one existing through the environmental variables.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Emmanouil Gkatziouras, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/egkatzioura.com\/2018\/06\/05\/spring-security-with-spring-boot-2-0-password-encoder\/\" target=\"_blank\" rel=\"noopener\">Spring Security with Spring Boot 2.0: Password Encoder<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>On a previous post we used the user details service in order to provide a way to load our data from a function based on a username given. The implementation of the user details might be backed by an in-memory mechanism, a sql\/no-sql database etc. The options are unlimited. What we have to pay attention &hellip;<\/p>\n","protected":false},"author":936,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30,854,125],"class_list":["post-77680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring","tag-spring-boot","tag-spring-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Security with Spring Boot 2.0: Password Encoder - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"&quot;Interested to learn more about Password Encoder? Then check out our article on Spring Security with Spring Boot 2.0: Password Encoder&quot;\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Security with Spring Boot 2.0: Password Encoder - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"&quot;Interested to learn more about Password Encoder? Then check out our article on Spring Security with Spring Boot 2.0: Password Encoder&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-05T13:00:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Emmanouil Gkatziouras\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Emmanouil Gkatziouras\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html\"},\"author\":{\"name\":\"Emmanouil Gkatziouras\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5eee031b356c7682e1fd24c8297561c6\"},\"headline\":\"Spring Security with Spring Boot 2.0: Password Encoder\",\"datePublished\":\"2018-06-05T13:00:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html\"},\"wordCount\":492,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\",\"Spring Boot\",\"Spring Security\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html\",\"name\":\"Spring Security with Spring Boot 2.0: Password Encoder - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2018-06-05T13:00:03+00:00\",\"description\":\"\\\"Interested to learn more about Password Encoder? Then check out our article on Spring Security with Spring Boot 2.0: Password Encoder\\\"\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/06\\\/security-spring-boot-password-encoder.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Security with Spring Boot 2.0: Password Encoder\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5eee031b356c7682e1fd24c8297561c6\",\"name\":\"Emmanouil Gkatziouras\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c6d031d211ab786ec335687ad6f3f076f93f47e24c92d78041d2f805ee6c291?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c6d031d211ab786ec335687ad6f3f076f93f47e24c92d78041d2f805ee6c291?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c6d031d211ab786ec335687ad6f3f076f93f47e24c92d78041d2f805ee6c291?s=96&d=mm&r=g\",\"caption\":\"Emmanouil Gkatziouras\"},\"description\":\"He is a versatile software engineer with experience in a wide variety of applications\\\/services.He is enthusiastic about new projects, embracing new technologies, and getting to know people in the field of software.\",\"sameAs\":[\"http:\\\/\\\/egkatzioura.wordpress.com\\\/\",\"https:\\\/\\\/gr.linkedin.com\\\/in\\\/gkatziourasemmanouil\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/emmanouil-gkatziouras\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Security with Spring Boot 2.0: Password Encoder - Java Code Geeks","description":"\"Interested to learn more about Password Encoder? Then check out our article on Spring Security with Spring Boot 2.0: Password Encoder\"","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html","og_locale":"en_US","og_type":"article","og_title":"Spring Security with Spring Boot 2.0: Password Encoder - Java Code Geeks","og_description":"\"Interested to learn more about Password Encoder? Then check out our article on Spring Security with Spring Boot 2.0: Password Encoder\"","og_url":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2018-06-05T13:00:03+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Emmanouil Gkatziouras","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Emmanouil Gkatziouras","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html"},"author":{"name":"Emmanouil Gkatziouras","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5eee031b356c7682e1fd24c8297561c6"},"headline":"Spring Security with Spring Boot 2.0: Password Encoder","datePublished":"2018-06-05T13:00:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html"},"wordCount":492,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring","Spring Boot","Spring Security"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html","url":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html","name":"Spring Security with Spring Boot 2.0: Password Encoder - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2018-06-05T13:00:03+00:00","description":"\"Interested to learn more about Password Encoder? Then check out our article on Spring Security with Spring Boot 2.0: Password Encoder\"","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2018\/06\/security-spring-boot-password-encoder.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Security with Spring Boot 2.0: Password Encoder"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5eee031b356c7682e1fd24c8297561c6","name":"Emmanouil Gkatziouras","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c6d031d211ab786ec335687ad6f3f076f93f47e24c92d78041d2f805ee6c291?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c6d031d211ab786ec335687ad6f3f076f93f47e24c92d78041d2f805ee6c291?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c6d031d211ab786ec335687ad6f3f076f93f47e24c92d78041d2f805ee6c291?s=96&d=mm&r=g","caption":"Emmanouil Gkatziouras"},"description":"He is a versatile software engineer with experience in a wide variety of applications\/services.He is enthusiastic about new projects, embracing new technologies, and getting to know people in the field of software.","sameAs":["http:\/\/egkatzioura.wordpress.com\/","https:\/\/gr.linkedin.com\/in\/gkatziourasemmanouil"],"url":"https:\/\/www.javacodegeeks.com\/author\/emmanouil-gkatziouras"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/77680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/936"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=77680"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/77680\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=77680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=77680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=77680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}