Skip to content

Commit

Permalink
Merge pull request #103 from kakawait/refactor/rename-autoconfigure-p…
Browse files Browse the repository at this point in the history
…ackage

Rename autoconfigure package
  • Loading branch information
kakawait authored Jul 3, 2018
2 parents 1f3a93f + 25d62f5 commit b1ebabf
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import com.kakawait.spring.security.cas.userdetails.GrantedAuthoritiesFromAssertionAttributesWithDefaultRolesUserDetailsService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import lombok.Setter;
import lombok.experimental.Accessors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import com.kakawait.spring.security.cas.authentication.DynamicProxyCallbackUrlCasAuthenticationProvider;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import lombok.NonNull;
import org.jasig.cas.client.session.SingleSignOutFilter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import com.kakawait.spring.boot.security.cas.SpringBoot1CasHttpSecurityConfigurerAdapter.SpringBoot1SecurityProperties;
import com.kakawait.spring.boot.security.cas.autoconfigure.SpringBoot1CasHttpSecurityConfigurerAdapter.SpringBoot1SecurityProperties;
import com.kakawait.spring.security.cas.LaxServiceProperties;
import com.kakawait.spring.security.cas.client.ticket.AttributePrincipalProxyTicketProvider;
import com.kakawait.spring.security.cas.client.ticket.ProxyTicketProvider;
Expand Down Expand Up @@ -45,11 +45,11 @@
import java.util.Set;
import java.util.stream.Collectors;

import static com.kakawait.spring.boot.security.cas.CasSecurityAutoConfiguration.CasLoginSecurityConfiguration;
import static com.kakawait.spring.boot.security.cas.CasSecurityAutoConfiguration.DefaultCasSecurityConfigurerAdapter;
import static com.kakawait.spring.boot.security.cas.CasSecurityAutoConfiguration.DynamicCasSecurityConfiguration;
import static com.kakawait.spring.boot.security.cas.CasSecurityAutoConfiguration.StaticCasSecurityConfiguration;
import static com.kakawait.spring.boot.security.cas.CasSecurityProperties.CAS_AUTH_ORDER;
import static com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration.CasLoginSecurityConfiguration;
import static com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration.DefaultCasSecurityConfigurerAdapter;
import static com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration.DynamicCasSecurityConfiguration;
import static com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration.StaticCasSecurityConfiguration;
import static com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityProperties.CAS_AUTH_ORDER;

/**
* @author Thibaud Leprêtre
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import org.springframework.security.config.annotation.SecurityBuilder;
import org.springframework.security.config.annotation.SecurityConfigurer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import lombok.Data;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import lombok.NonNull;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import lombok.Setter;
import lombok.experimental.Accessors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import org.jasig.cas.client.validation.TicketValidator;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import org.springframework.context.ApplicationContext;
import org.springframework.core.annotation.Order;
Expand All @@ -12,7 +12,7 @@
import java.lang.reflect.Method;
import java.util.List;

import static com.kakawait.spring.boot.security.cas.SpringBoot1CasHttpSecurityConfigurerAdapter.SpringBoot1SecurityProperties.SECURITY_PROPERTIES_HEADERS_CLASS;
import static com.kakawait.spring.boot.security.cas.autoconfigure.SpringBoot1CasHttpSecurityConfigurerAdapter.SpringBoot1SecurityProperties.SECURITY_PROPERTIES_HEADERS_CLASS;

/**
* @author Thibaud Leprêtre
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.kakawait.spring.boot.security.cas.CasSecurityAutoConfiguration
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;


import com.kakawait.spring.boot.security.cas.autoconfigure.CasAuthenticationFilterConfigurer;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.junit.Test;
import org.mockito.Mockito;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import com.kakawait.spring.boot.security.cas.autoconfigure.CasAuthenticationProviderSecurityBuilder;
import com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityProperties;
import com.kakawait.spring.security.cas.authentication.DynamicProxyCallbackUrlCasAuthenticationProvider;
import org.jasig.cas.client.validation.TicketValidator;
import org.junit.Before;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;


import com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration;
import com.kakawait.spring.security.cas.LaxServiceProperties;
import com.kakawait.spring.security.cas.client.ticket.AttributePrincipalProxyTicketProvider;
import com.kakawait.spring.security.cas.client.ticket.ProxyTicketProvider;
Expand All @@ -16,7 +17,6 @@
import org.junit.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -173,7 +173,7 @@ public void autoConfigure_WithProxyCallbackPathButWithoutCallbackUrl_RelativePro
public void autoConfigure_EmptyConfiguration_DefaultCasSecurityConfigurerAdapterBean() {
load(EmptyConfiguration.class);

String beanName ="com.kakawait.spring.boot.security.cas.CasSecurityAutoConfiguration$" +
String beanName ="com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityAutoConfiguration$" +
"DefaultCasSecurityConfigurerAdapter";
context.getBean(beanName);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import com.kakawait.spring.boot.security.cas.autoconfigure.CasSingleSignOutFilterConfigurer;
import org.jasig.cas.client.session.SessionMappingStorage;
import org.jasig.cas.client.session.SingleSignOutFilter;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.kakawait.spring.boot.security.cas;
package com.kakawait.spring.boot.security.cas.autoconfigure;

import com.kakawait.spring.boot.security.cas.autoconfigure.CasTicketValidatorBuilder;
import org.jasig.cas.client.proxy.ProxyGrantingTicketStorage;
import org.jasig.cas.client.proxy.ProxyRetriever;
import org.jasig.cas.client.ssl.HttpURLConnectionFactory;
Expand Down Expand Up @@ -36,11 +37,11 @@ public class CasTicketValidatorBuilderTest {
private static final String CAS_SERVER_URL_PREFIX = "http://my.cas.server.base.url/";

private static final String V1_WARN_MESSAGE_TEMPLATE =
"WARN com.kakawait.spring.boot.security.cas.CasTicketValidatorBuilder - " +
"WARN com.kakawait.spring.boot.security.cas.autoconfigure.CasTicketValidatorBuilder - " +
"Configuration \"%s\" isn't possible using protocol version 1, will be omitted!";

private static final String SERVICE_VALIDATOR_WARN_MESSAGE_TEMPLATE =
"WARN com.kakawait.spring.boot.security.cas.CasTicketValidatorBuilder - " +
"WARN com.kakawait.spring.boot.security.cas.autoconfigure.CasTicketValidatorBuilder - " +
"Configuration \"%s\" isn't possible using service ticket validator " +
"(please consider proxy ticket validator), will be omitted!";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.kakawait.sample;

import com.kakawait.spring.boot.security.cas.CasHttpSecurityConfigurer;
import com.kakawait.spring.boot.security.cas.CasSecurityCondition;
import com.kakawait.spring.boot.security.cas.CasSecurityConfigurer;
import com.kakawait.spring.boot.security.cas.CasSecurityConfigurerAdapter;
import com.kakawait.spring.boot.security.cas.CasSecurityProperties;
import com.kakawait.spring.boot.security.cas.autoconfigure.CasHttpSecurityConfigurer;
import com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityCondition;
import com.kakawait.spring.boot.security.cas.autoconfigure.CasSecurityConfigurerAdapter;
import com.kakawait.spring.security.cas.client.CasAuthorizationInterceptor;
import com.kakawait.spring.security.cas.client.ticket.ProxyTicketProvider;
import com.kakawait.spring.security.cas.client.validation.AssertionProvider;
Expand All @@ -13,13 +11,11 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.annotation.Secured;
import org.springframework.security.authentication.AuthenticationManager;
Expand Down Expand Up @@ -49,7 +45,6 @@
import org.springframework.web.filter.ForwardedHeaderFilter;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.lang.reflect.Field;
import java.security.Principal;
Expand Down

0 comments on commit b1ebabf

Please sign in to comment.