parent
56db058fd0
commit
8533312c6b
|
@ -3,6 +3,7 @@ apply plugin: 'io.spring.convention.spring-sample-war'
|
|||
dependencies {
|
||||
compile project(':spring-security-saml2-service-provider')
|
||||
compile project(':spring-security-config')
|
||||
compile slf4jDependencies
|
||||
|
||||
testCompile 'org.springframework:spring-test'
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@ import org.springframework.security.web.session.HttpSessionEventPublisher;
|
|||
public class MessageSecurityWebApplicationInitializer extends
|
||||
AbstractSecurityWebApplicationInitializer {
|
||||
|
||||
public MessageSecurityWebApplicationInitializer() {
|
||||
super(SecurityConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean enableHttpSessionEventPublisher() {
|
||||
return true;
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.security.cert.X509Certificate;
|
|||
import org.opensaml.security.x509.X509Support;
|
||||
|
||||
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.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
|
@ -52,9 +53,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||
.authorizeRequests((authz) -> authz
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
.saml2Login((saml2) -> saml2
|
||||
.loginProcessingUrl("/sample/jc/saml2/sso/{registrationId}")
|
||||
);
|
||||
.saml2Login(Customizer.withDefaults());
|
||||
// @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