Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rwinch committed May 21, 2013
1 parent f90453b commit 27d70fe
Show file tree
Hide file tree
Showing 70 changed files with 333 additions and 265 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The following configuration
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/signup","/about").permitAll()
Expand Down Expand Up @@ -129,7 +129,7 @@ The following configuration
@Configuration
@Order(1)
public static class ApiWebSecurityConfigurationAdapter extends WebSecurityConfigurerAdapter {
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.antMatcher("/api/**")
.authorizeUrls()
Expand All @@ -150,7 +150,7 @@ The following configuration
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/signup","/about").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.method.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

Expand All @@ -30,7 +30,7 @@ protected void registerAuthentication(

@Override
protected void configure(
HttpConfigurator http) throws Exception {
HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/users**","/sessions/**").hasRole("ADMIN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.method.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

Expand All @@ -30,7 +30,7 @@ protected void registerAuthentication(
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/users**","/sessions/**").hasRole("ADMIN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

Expand Down Expand Up @@ -35,7 +35,7 @@ protected void registerAuthentication(AuthenticationRegistry builder) throws Exc
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/users**","/sessions/**").hasRole("ADMIN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.springframework.ldap.core.support.BaseLdapPathContextSource;
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;
import org.springframework.security.ldap.DefaultSpringSecurityContextSource;
Expand Down Expand Up @@ -36,7 +36,7 @@ protected void registerAuthentication(
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/users**","/sessions/**").hasRole("ADMIN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.oauth.examples.sparklr.oauth.SparklrUserApprovalHandler;
import org.springframework.security.oauth2.config.annotation.authentication.InMemoryClientDetailsServiceBuilder;
Expand Down Expand Up @@ -66,7 +66,7 @@ public void configure(WebSecurityConfiguration builder) throws Exception {
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/oauth/token").fullyAuthenticated()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.springframework.security.config.BeanIds;
import org.springframework.security.config.annotation.authentication.AuthenticationBuilder;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

@Configuration
Expand All @@ -28,7 +28,7 @@ protected AuthenticationManager authenticationManager() throws Exception {
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/oauth/**").hasRole("USER")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;
import org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter;
Expand Down Expand Up @@ -34,7 +34,7 @@ public void configure(WebSecurityConfiguration builder) throws Exception {

@Override
protected void configure(
HttpConfigurator http) throws Exception {
HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/sparklr/**","/facebook/**").hasRole("USER")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;
import org.springframework.security.samples.security.CustomUserDetailsService;
Expand All @@ -19,7 +19,7 @@ public void configure(WebSecurityConfiguration builder) throws Exception {
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/users**","/sessions/**").hasRole("ADMIN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

Expand All @@ -18,7 +18,7 @@ public void configure(WebSecurityConfiguration builder) throws Exception {
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/login").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.method.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

Expand All @@ -29,7 +29,7 @@ protected void registerAuthentication(
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/users**","/sessions/**").hasRole("ADMIN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.SpringSecurityFilterChainBuilder.IgnoredRequestRegistry;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;
Expand Down Expand Up @@ -73,7 +73,7 @@ public void configure(WebSecurityConfiguration builder) throws Exception {
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/favicon.ico","/resources/**","/auth/**","/signup/**","/disconnect/facebook").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.AuthenticationRegistry;
import org.springframework.security.config.annotation.web.EnableWebSecurity;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfiguration;
import org.springframework.security.config.annotation.web.WebSecurityConfigurerAdapter;

Expand All @@ -29,7 +29,7 @@ protected void registerAuthentication(AuthenticationRegistry registry)
}

@Override
protected void configure(HttpConfigurator http) throws Exception {
protected void configure(HttpConfiguration http) throws Exception {
http
.authorizeUrls()
.antMatchers("/login").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

import org.springframework.security.access.expression.SecurityExpressionHandler;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.AbstractConfigurator;
import org.springframework.security.config.annotation.SecurityConfiguratorAdapter;
import org.springframework.security.config.annotation.web.ExceptionHandlingConfigurator;
import org.springframework.security.config.annotation.web.ExpressionUrlAuthorizations;
import org.springframework.security.config.annotation.web.HttpBasicConfigurator;
import org.springframework.security.config.annotation.web.HttpConfigurator;
import org.springframework.security.config.annotation.web.HttpConfiguration;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.oauth2.provider.ClientDetailsService;
import org.springframework.security.oauth2.provider.CompositeTokenGranter;
Expand Down Expand Up @@ -63,7 +63,7 @@
*/
public class OAuth2ServerConfigurator
extends
AbstractConfigurator<DefaultSecurityFilterChain, HttpConfigurator> {
SecurityConfiguratorAdapter<DefaultSecurityFilterChain, HttpConfiguration> {
private AuthenticationEntryPoint authenticationEntryPoint = new OAuth2AuthenticationEntryPoint();
private AccessDeniedHandler accessDeniedHandler = new OAuth2AccessDeniedHandler();

Expand Down Expand Up @@ -106,7 +106,7 @@ private ClientDetailsService clientDetails() {
}

@Override
public void init(HttpConfigurator http) throws Exception {
public void init(HttpConfiguration http) throws Exception {
if(http.getConfigurator(HttpBasicConfigurator.class) == null) {
httpBasicConfigurator = new HttpBasicConfigurator();
httpBasicConfigurator.setBuilder(http);
Expand Down Expand Up @@ -143,7 +143,7 @@ public OAuth2ServerConfigurator resourceId(String resourceId) {
}

@Override
public void configure(HttpConfigurator http) throws Exception {
public void configure(HttpConfiguration http) throws Exception {
if(httpBasicConfigurator != null) {
httpBasicConfigurator.configure(http);
}
Expand All @@ -154,7 +154,7 @@ public void configure(HttpConfigurator http) throws Exception {
}

private AuthenticationManager oauthAuthenticationManager(
HttpConfigurator http) {
HttpConfiguration http) {
OAuth2AuthenticationManager oauthAuthenticationManager = new OAuth2AuthenticationManager();
oauthAuthenticationManager.setResourceId(resourceId);
oauthAuthenticationManager
Expand All @@ -163,12 +163,12 @@ private AuthenticationManager oauthAuthenticationManager(
}

private ResourceServerTokenServices resourceTokenServices(
HttpConfigurator http) {
HttpConfiguration http) {
tokenServices(http);
return this.resourceTokenServices;
}

private AuthorizationServerTokenServices tokenServices(HttpConfigurator http) {
private AuthorizationServerTokenServices tokenServices(HttpConfiguration http) {
if (tokenServices != null) {
return tokenServices;
}
Expand All @@ -193,14 +193,14 @@ AuthorizationCodeServices getAuthorizationCodeServices() {
}

private AuthorizationCodeServices authorizationCodeServices(
HttpConfigurator http) {
HttpConfiguration http) {
if (authorizationCodeServices == null) {
authorizationCodeServices = new InMemoryAuthorizationCodeServices();
}
return authorizationCodeServices;
}

private AuthenticationManager authenticationManager(HttpConfigurator http) {
private AuthenticationManager authenticationManager(HttpConfiguration http) {
return http.authenticationManager();
}

Expand All @@ -212,7 +212,7 @@ ConsumerTokenServices getConsumerTokenServices() {
return consumerTokenServices;
}

private ConsumerTokenServices consumerTokenServices(HttpConfigurator http) {
private ConsumerTokenServices consumerTokenServices(HttpConfiguration http) {
if(consumerTokenServices == null) {
DefaultTokenServices defaultTokenServices = new DefaultTokenServices();
defaultTokenServices.setClientDetailsService(clientDetails());
Expand All @@ -222,7 +222,7 @@ private ConsumerTokenServices consumerTokenServices(HttpConfigurator http) {
return consumerTokenServices;
}

private TokenGranter tokenGranter(HttpConfigurator http) throws Exception {
private TokenGranter tokenGranter(HttpConfiguration http) throws Exception {
if(tokenGranter == null) {
ClientDetailsService clientDetails = clientDetails();
AuthorizationServerTokenServices tokenServices = tokenServices(http);
Expand Down
Loading

0 comments on commit 27d70fe

Please sign in to comment.