parent
1f4aa8fe4f
commit
a8a66480be
|
@ -3,6 +3,7 @@ apply plugin: 'io.spring.convention.spring-sample-war'
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':spring-security-saml2-service-provider')
|
compile project(':spring-security-saml2-service-provider')
|
||||||
compile project(':spring-security-config')
|
compile project(':spring-security-config')
|
||||||
|
compile slf4jDependencies
|
||||||
|
|
||||||
testCompile 'org.springframework:spring-test'
|
testCompile 'org.springframework:spring-test'
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,10 @@ import org.springframework.security.web.session.HttpSessionEventPublisher;
|
||||||
public class MessageSecurityWebApplicationInitializer extends
|
public class MessageSecurityWebApplicationInitializer extends
|
||||||
AbstractSecurityWebApplicationInitializer {
|
AbstractSecurityWebApplicationInitializer {
|
||||||
|
|
||||||
|
public MessageSecurityWebApplicationInitializer() {
|
||||||
|
super(SecurityConfig.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean enableHttpSessionEventPublisher() {
|
protected boolean enableHttpSessionEventPublisher() {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.security.cert.X509Certificate;
|
||||||
import org.opensaml.security.x509.X509Support;
|
import org.opensaml.security.x509.X509Support;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.security.config.Customizer;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||||
|
@ -52,9 +53,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
.authorizeRequests((authz) -> authz
|
.authorizeRequests((authz) -> authz
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
)
|
)
|
||||||
.saml2Login((saml2) -> saml2
|
.saml2Login(Customizer.withDefaults());
|
||||||
.loginProcessingUrl("/sample/jc/saml2/sso/{registrationId}")
|
|
||||||
);
|
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<configuration>
|
||||||
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="WARN">
|
||||||
|
<appender-ref ref="STDOUT" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</configuration>
|
Loading…
Reference in New Issue