parent
							
								
									3e46dacb4b
								
							
						
					
					
						commit
						5bdf57d1e5
					
				| 
						 | 
					@ -42,7 +42,6 @@ dependencies {
 | 
				
			||||||
	testCompile project(path : ':spring-security-web', configuration : 'tests')
 | 
						testCompile project(path : ':spring-security-web', configuration : 'tests')
 | 
				
			||||||
	testCompile apachedsDependencies
 | 
						testCompile apachedsDependencies
 | 
				
			||||||
	testCompile powerMock2Dependencies
 | 
						testCompile powerMock2Dependencies
 | 
				
			||||||
	testCompile spockDependencies
 | 
					 | 
				
			||||||
	testCompile 'com.squareup.okhttp3:mockwebserver'
 | 
						testCompile 'com.squareup.okhttp3:mockwebserver'
 | 
				
			||||||
	testCompile 'ch.qos.logback:logback-classic'
 | 
						testCompile 'ch.qos.logback:logback-classic'
 | 
				
			||||||
	testCompile 'io.projectreactor.netty:reactor-netty'
 | 
						testCompile 'io.projectreactor.netty:reactor-netty'
 | 
				
			||||||
| 
						 | 
					@ -53,7 +52,6 @@ dependencies {
 | 
				
			||||||
	testCompile('net.sourceforge.htmlunit:htmlunit') {
 | 
						testCompile('net.sourceforge.htmlunit:htmlunit') {
 | 
				
			||||||
		exclude group: 'commons-logging', module: 'commons-logging'
 | 
							exclude group: 'commons-logging', module: 'commons-logging'
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	testCompile 'org.codehaus.groovy:groovy-all'
 | 
					 | 
				
			||||||
	testCompile 'org.eclipse.persistence:javax.persistence'
 | 
						testCompile 'org.eclipse.persistence:javax.persistence'
 | 
				
			||||||
	testCompile 'org.hibernate:hibernate-entitymanager'
 | 
						testCompile 'org.hibernate:hibernate-entitymanager'
 | 
				
			||||||
	testCompile 'org.hsqldb:hsqldb'
 | 
						testCompile 'org.hsqldb:hsqldb'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,6 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package org.springframework.security.config.annotation.issue50;
 | 
					package org.springframework.security.config.annotation.issue50;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.spockframework.util.Assert;
 | 
					 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.context.annotation.Bean;
 | 
					import org.springframework.context.annotation.Bean;
 | 
				
			||||||
import org.springframework.context.annotation.Configuration;
 | 
					import org.springframework.context.annotation.Configuration;
 | 
				
			||||||
| 
						 | 
					@ -33,6 +32,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
 | 
				
			||||||
import org.springframework.security.core.Authentication;
 | 
					import org.springframework.security.core.Authentication;
 | 
				
			||||||
import org.springframework.security.core.AuthenticationException;
 | 
					import org.springframework.security.core.AuthenticationException;
 | 
				
			||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
 | 
					import org.springframework.security.core.userdetails.UsernameNotFoundException;
 | 
				
			||||||
 | 
					import org.springframework.util.Assert;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @author Rob Winch
 | 
					 * @author Rob Winch
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,12 +16,21 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package org.springframework.security.config.annotation.web.configurers.saml2;
 | 
					package org.springframework.security.config.annotation.web.configurers.saml2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					import java.time.Duration;
 | 
				
			||||||
 | 
					import java.util.Arrays;
 | 
				
			||||||
 | 
					import java.util.Base64;
 | 
				
			||||||
 | 
					import java.util.Collection;
 | 
				
			||||||
 | 
					import java.util.Collections;
 | 
				
			||||||
 | 
					import javax.servlet.ServletException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.junit.After;
 | 
					import org.junit.After;
 | 
				
			||||||
import org.junit.Assert;
 | 
					import org.junit.Assert;
 | 
				
			||||||
import org.junit.Before;
 | 
					import org.junit.Before;
 | 
				
			||||||
import org.junit.Rule;
 | 
					import org.junit.Rule;
 | 
				
			||||||
import org.junit.Test;
 | 
					import org.junit.Test;
 | 
				
			||||||
import org.opensaml.saml.saml2.core.Assertion;
 | 
					import org.opensaml.saml.saml2.core.Assertion;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
import org.springframework.context.ConfigurableApplicationContext;
 | 
					import org.springframework.context.ConfigurableApplicationContext;
 | 
				
			||||||
import org.springframework.context.annotation.Bean;
 | 
					import org.springframework.context.annotation.Bean;
 | 
				
			||||||
| 
						 | 
					@ -56,15 +65,7 @@ import org.springframework.security.web.context.SecurityContextRepository;
 | 
				
			||||||
import org.springframework.test.util.ReflectionTestUtils;
 | 
					import org.springframework.test.util.ReflectionTestUtils;
 | 
				
			||||||
import org.springframework.test.web.servlet.MockMvc;
 | 
					import org.springframework.test.web.servlet.MockMvc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.IOException;
 | 
					 | 
				
			||||||
import java.time.Duration;
 | 
					 | 
				
			||||||
import java.util.Base64;
 | 
					 | 
				
			||||||
import java.util.Collection;
 | 
					 | 
				
			||||||
import java.util.Collections;
 | 
					 | 
				
			||||||
import javax.servlet.ServletException;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import static org.assertj.core.api.Assertions.assertThat;
 | 
					import static org.assertj.core.api.Assertions.assertThat;
 | 
				
			||||||
import static org.codehaus.groovy.runtime.InvokerHelper.asList;
 | 
					 | 
				
			||||||
import static org.mockito.ArgumentMatchers.anyString;
 | 
					import static org.mockito.ArgumentMatchers.anyString;
 | 
				
			||||||
import static org.mockito.Mockito.mock;
 | 
					import static org.mockito.Mockito.mock;
 | 
				
			||||||
import static org.mockito.Mockito.when;
 | 
					import static org.mockito.Mockito.when;
 | 
				
			||||||
| 
						 | 
					@ -76,9 +77,9 @@ import static org.springframework.security.config.annotation.web.configurers.sam
 | 
				
			||||||
public class Saml2LoginConfigurerTests {
 | 
					public class Saml2LoginConfigurerTests {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private static final Converter<Assertion, Collection<? extends GrantedAuthority>>
 | 
						private static final Converter<Assertion, Collection<? extends GrantedAuthority>>
 | 
				
			||||||
			AUTHORITIES_EXTRACTOR = a -> asList(new SimpleGrantedAuthority("TEST"));
 | 
								AUTHORITIES_EXTRACTOR = a -> Arrays.asList(new SimpleGrantedAuthority("TEST"));
 | 
				
			||||||
	private static final GrantedAuthoritiesMapper AUTHORITIES_MAPPER =
 | 
						private static final GrantedAuthoritiesMapper AUTHORITIES_MAPPER =
 | 
				
			||||||
			authorities -> asList(new SimpleGrantedAuthority("TEST CONVERTED"));
 | 
								authorities -> Arrays.asList(new SimpleGrantedAuthority("TEST CONVERTED"));
 | 
				
			||||||
	private static final Duration RESPONSE_TIME_VALIDATION_SKEW = Duration.ZERO;
 | 
						private static final Duration RESPONSE_TIME_VALIDATION_SKEW = Duration.ZERO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Autowired
 | 
						@Autowired
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -76,12 +76,9 @@ dependencies {
 | 
				
			||||||
		management "org.assertj:assertj-core:3.+"
 | 
							management "org.assertj:assertj-core:3.+"
 | 
				
			||||||
		management "org.bouncycastle:bcpkix-jdk15on:1.+"
 | 
							management "org.bouncycastle:bcpkix-jdk15on:1.+"
 | 
				
			||||||
		management "org.bouncycastle:bcprov-jdk15on:1.+"
 | 
							management "org.bouncycastle:bcprov-jdk15on:1.+"
 | 
				
			||||||
		management "org.codehaus.groovy:groovy-all:2.4.17"
 | 
					 | 
				
			||||||
		management "org.codehaus.groovy:groovy:2.4.17"
 | 
					 | 
				
			||||||
		management "org.eclipse.jetty:jetty-server:9.4.19.v20190610"
 | 
							management "org.eclipse.jetty:jetty-server:9.4.19.v20190610"
 | 
				
			||||||
		management "org.eclipse.jetty:jetty-servlet:9.4.19.v20190610"
 | 
							management "org.eclipse.jetty:jetty-servlet:9.4.19.v20190610"
 | 
				
			||||||
		management "org.eclipse.persistence:javax.persistence:2.+"
 | 
							management "org.eclipse.persistence:javax.persistence:2.+"
 | 
				
			||||||
		management "org.gebish:geb-spock:0.10.0"
 | 
					 | 
				
			||||||
		management "org.hibernate:hibernate-entitymanager:5.+"
 | 
							management "org.hibernate:hibernate-entitymanager:5.+"
 | 
				
			||||||
		management "org.hibernate:hibernate-validator:6.+"
 | 
							management "org.hibernate:hibernate-validator:6.+"
 | 
				
			||||||
		management "org.hsqldb:hsqldb:2.+"
 | 
							management "org.hsqldb:hsqldb:2.+"
 | 
				
			||||||
| 
						 | 
					@ -106,8 +103,6 @@ dependencies {
 | 
				
			||||||
		management "org.slf4j:jcl-over-slf4j:1.+"
 | 
							management "org.slf4j:jcl-over-slf4j:1.+"
 | 
				
			||||||
		management "org.slf4j:log4j-over-slf4j:1.+"
 | 
							management "org.slf4j:log4j-over-slf4j:1.+"
 | 
				
			||||||
		management "org.slf4j:slf4j-api:1.+"
 | 
							management "org.slf4j:slf4j-api:1.+"
 | 
				
			||||||
		management "org.spockframework:spock-core:1.0-groovy-2.4"
 | 
					 | 
				
			||||||
		management "org.spockframework:spock-spring:1.0-groovy-2.4"
 | 
					 | 
				
			||||||
		management "org.springframework.ldap:spring-ldap-core:latest.release"
 | 
							management "org.springframework.ldap:spring-ldap-core:latest.release"
 | 
				
			||||||
		management "org.synchronoss.cloud:nio-multipart-parser:1.+"
 | 
							management "org.synchronoss.cloud:nio-multipart-parser:1.+"
 | 
				
			||||||
		management "org.thymeleaf:thymeleaf-spring5:3.+"
 | 
							management "org.thymeleaf:thymeleaf-spring5:3.+"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,7 +17,6 @@ dependencies {
 | 
				
			||||||
	testCompile 'commons-codec:commons-codec'
 | 
						testCompile 'commons-codec:commons-codec'
 | 
				
			||||||
	testCompile powerMock2Dependencies
 | 
						testCompile powerMock2Dependencies
 | 
				
			||||||
	testCompile slf4jDependencies
 | 
						testCompile slf4jDependencies
 | 
				
			||||||
	testCompile spockDependencies
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	testRuntime 'org.hsqldb:hsqldb'
 | 
						testRuntime 'org.hsqldb:hsqldb'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,9 +14,6 @@ dependencies {
 | 
				
			||||||
	provided 'javax.servlet.jsp:javax.servlet.jsp-api'
 | 
						provided 'javax.servlet.jsp:javax.servlet.jsp-api'
 | 
				
			||||||
	provided 'javax.servlet:javax.servlet-api'
 | 
						provided 'javax.servlet:javax.servlet-api'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	testCompile 'org.codehaus.groovy:groovy-all'
 | 
					 | 
				
			||||||
	testCompile spockDependencies
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	testRuntime 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
 | 
						testRuntime 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,12 +22,10 @@ dependencies {
 | 
				
			||||||
	testCompile 'commons-codec:commons-codec'
 | 
						testCompile 'commons-codec:commons-codec'
 | 
				
			||||||
	testCompile 'io.projectreactor:reactor-test'
 | 
						testCompile 'io.projectreactor:reactor-test'
 | 
				
			||||||
	testCompile 'javax.xml.bind:jaxb-api'
 | 
						testCompile 'javax.xml.bind:jaxb-api'
 | 
				
			||||||
	testCompile 'org.codehaus.groovy:groovy-all'
 | 
					 | 
				
			||||||
	testCompile 'org.skyscreamer:jsonassert'
 | 
						testCompile 'org.skyscreamer:jsonassert'
 | 
				
			||||||
	testCompile 'org.springframework:spring-webflux'
 | 
						testCompile 'org.springframework:spring-webflux'
 | 
				
			||||||
	testCompile 'org.synchronoss.cloud:nio-multipart-parser'
 | 
						testCompile 'org.synchronoss.cloud:nio-multipart-parser'
 | 
				
			||||||
	testCompile powerMock2Dependencies
 | 
						testCompile powerMock2Dependencies
 | 
				
			||||||
	testCompile spockDependencies
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	testRuntime 'org.hsqldb:hsqldb'
 | 
						testRuntime 'org.hsqldb:hsqldb'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue