@@ -0,0 +1,1989 @@
+/*%0A * Copyright (c) 2018 SienDev company. All rights reserved.%0A *%0A * This is a free software; you can redistribute it and/or modify it under the terms of the%0A * GNU Lesser General Public License as published by the Free Software Foundation;%0A * either version 2.1 of the License, or (at your option) any later version.%0A * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;%0A * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.%0A * See the GNU Lesser General Public License for more details.%0A */%0A%0Apackage corp.siendev.auth.service.config;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;%0Aimport org.springframework.security.config.annotation.web.builders.HttpSecurity;%0Aimport org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;%0Aimport org.springframework.security.web.access.AccessDeniedHandler;%0A%0A@Configuration%0Apublic class AuthServiceSecurityConfig extends WebSecurityConfigurerAdapter %7B%0A%0A    private AccessDeniedHandler accessHandler;%0A%0A    @Override%0A    protected void configure(HttpSecurity http) throws Exception %7B%0A        http.csrf().disable()%0A                .authorizeRequests()%0A                    .antMatchers(%22/%22, %22/admin/**%22).hasAnyRole(%22Admin%22)%0A                    .anyRequest().authenticated()%0A                    .and()%0A                    .formLogin().loginPage(%22/login%22).permitAll()%0A                    .and()%0A                    .logout().permitAll()%0A                    .and()%0A                    .exceptionHandling().accessDeniedHandler(this.accessHandler);%0A    %7D%0A%0A    @Autowired%0A    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception %7B%0A        auth.inMemoryAuthentication().withUser(%22admin%22).password(%22password%22).roles(%22Admin%22);%0A    %7D%0A%7D%0A

add security config