{"id":5,"date":"2009-07-09T17:13:10","date_gmt":"2009-07-09T16:13:10","guid":{"rendered":"http:\/\/www.flamingpenguin.co.uk\/blog\/?p=5"},"modified":"2009-07-09T17:14:06","modified_gmt":"2009-07-09T16:14:06","slug":"custom-authenticationprovider-in-spring-security","status":"publish","type":"post","link":"https:\/\/www.flamingpenguin.co.uk\/blog\/2009\/07\/09\/custom-authenticationprovider-in-spring-security\/","title":{"rendered":"Custom AuthenticationProvider in Spring Security"},"content":{"rendered":"<p>In your application context you need <\/p>\n<pre lang=\"xml\">\r\n<beans:beans   xmlns=\"http:\/\/www.springframework.org\/schema\/security\"\r\n               xmlns:beans=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n               xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n               xsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans\r\n                                   http:\/\/www.springframework.org\/schema\/beans\/spring-beans-2.0.xsd\r\n                                   http:\/\/www.springframework.org\/schema\/security\r\n                                   http:\/\/www.springframework.org\/schema\/security\/spring-security-2.0.4.xsd\"> \r\n   <http>\r\n      [...]\r\n   <\/http>\r\n   <beans:bean id=\"myAuthenticationProvider\"\r\n                       class=\"com.example.security.MyAuthenticationProvider\">\r\n      <custom-authentication-provider\/>\r\n   <\/beans:bean>\r\n<\/pre>\n<p>If you are using username and password authentication, your bean can then extend the abstract base class that comes with Spring:<\/p>\n<pre lang=\"java\">\r\norg.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In your application context you need [&#8230;] If you are using username and password authentication, your bean can then extend the abstract base class that comes with Spring: org.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[3,6,5,8],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-java","tag-j2ee","tag-servlet","tag-spring","tag-spring-security"],"_links":{"self":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":0,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingpenguin.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}