cleanup work
This commit is contained in:
parent
1455c3813f
commit
91a63c4ea8
|
@ -67,8 +67,8 @@
|
|||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>4.1.7.RELEASE</org.springframework.version>
|
||||
<org.springframework.security.version>3.2.8.RELEASE</org.springframework.security.version>
|
||||
<org.springframework.version>4.2.2.RELEASE</org.springframework.version>
|
||||
<org.springframework.security.version>4.0.3.RELEASE</org.springframework.security.version>
|
||||
<oauth.version>2.0.7.RELEASE</oauth.version>
|
||||
|
||||
<!-- marshalling -->
|
||||
|
|
|
@ -8,12 +8,14 @@ import org.springframework.context.annotation.Configuration;
|
|||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
|
||||
import org.springframework.security.oauth2.provider.token.TokenStore;
|
||||
import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore;
|
||||
|
||||
@Configuration
|
||||
@PropertySource({ "classpath:persistence.properties" })
|
||||
public class OAuth2ResourceConfig {
|
||||
@EnableResourceServer
|
||||
public class OAuth2ResourceServerConfig {
|
||||
|
||||
@Autowired
|
||||
private Environment env;
|
|
@ -5,7 +5,6 @@ import static org.apache.commons.lang3.RandomStringUtils.randomNumeric;
|
|||
|
||||
import org.baeldung.web.dto.Foo;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -13,7 +12,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
@EnableResourceServer
|
||||
public class FooController {
|
||||
|
||||
public FooController() {
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore;
|
|||
@Configuration
|
||||
@PropertySource({ "classpath:persistence.properties" })
|
||||
@EnableAuthorizationServer
|
||||
public class AuthServerOAuth2Config extends AuthorizationServerConfigurerAdapter {
|
||||
public class OAuth2AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
private Environment env;
|
|
@ -23,13 +23,13 @@ public class ServerSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
protected void configure(final HttpSecurity http) throws Exception {
|
||||
// @formatter:off
|
||||
http.authorizeRequests()
|
||||
.antMatchers("/login").permitAll()
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.formLogin().permitAll();
|
||||
// .and().formLogin().permitAll()
|
||||
;
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,13 @@
|
|||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator (1).launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
|
|
Loading…
Reference in New Issue