Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit bdee5d9

Browse files
author
Mario
committed
1204 - Addressing comments from review
1 parent b784f77 commit bdee5d9

File tree

6 files changed

+43
-33
lines changed

6 files changed

+43
-33
lines changed

examples/spring-boot-default/src/main/java/com/stormpath/spring/boot/examples/SpringSecurityWebAppConfig.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
*/
1616
package com.stormpath.spring.boot.examples;
1717

18+
import com.stormpath.sdk.account.Account;
19+
import com.stormpath.sdk.servlet.mvc.WebHandler;
20+
import org.springframework.context.annotation.Bean;
1821
import org.springframework.context.annotation.Configuration;
1922
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
2023
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
2124

25+
import javax.servlet.http.HttpServletRequest;
26+
import javax.servlet.http.HttpServletResponse;
27+
2228
/**
2329
* @since 1.0.RC6
2430
*/
@@ -39,4 +45,26 @@ protected void configure(HttpSecurity http) throws Exception {
3945
.antMatchers("/restricted").fullyAuthenticated()
4046
.antMatchers("/**").permitAll();
4147
}
48+
49+
@Bean
50+
public WebHandler loginPreHandler() {
51+
return new WebHandler() {
52+
@Override
53+
public boolean handle(HttpServletRequest request, HttpServletResponse response, Account account) {
54+
System.out.print("AAAAAAA pre");
55+
return true;
56+
}
57+
};
58+
}
59+
60+
@Bean
61+
public WebHandler loginPostHandler() {
62+
return new WebHandler() {
63+
@Override
64+
public boolean handle(HttpServletRequest request, HttpServletResponse response, Account account) {
65+
System.out.print("AAAAAAA post");
66+
return true;
67+
}
68+
};
69+
}
4270
}

extensions/spring/boot/stormpath-spring-security-spring-boot-starter/src/main/java/com/stormpath/spring/boot/autoconfigure/StormpathSpringSecurityAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
@SuppressWarnings("SpringFacetCodeInspection")
4141
@Configuration
42-
@ConditionalOnProperty(name = { "stormpath.enabled", "stormpath.spring.security.enabled"}, matchIfMissing = true)
42+
@ConditionalOnProperty(name = { "stormpath.enabled", "stormpath.spring.security.enabled" }, matchIfMissing = true)
4343
@AutoConfigureAfter({ StormpathAutoConfiguration.class, SecurityAutoConfiguration.class })
4444
public class StormpathSpringSecurityAutoConfiguration extends AbstractStormpathSpringSecurityConfiguration {
4545

extensions/spring/boot/stormpath-webmvc-spring-boot-starter/src/main/java/com/stormpath/spring/boot/autoconfigure/StormpathWebMvcAutoConfiguration.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ public Controller stormpathAccessTokenController() {
501501
return super.stormpathAccessTokenController();
502502
}
503503

504+
/**
505+
* @since 1.5.0
506+
*/
504507
@Bean
505508
@ConditionalOnMissingBean(name = "stormpathRevokeTokenController")
506509
@Override
@@ -682,6 +685,10 @@ public ControllerConfig stormpathVerifyConfig() {
682685
return super.stormpathVerifyConfig();
683686
}
684687

688+
/**
689+
*
690+
* @since 1.5.0
691+
*/
685692
@Bean
686693
@ConditionalOnMissingBean(name = "stormpathSamlConfig")
687694
public ControllerConfig stormpathSamlConfig() {

extensions/spring/stormpath-spring-security/src/main/java/com/stormpath/spring/config/SecurityBasicEnabled.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

extensions/spring/stormpath-spring-webmvc/src/main/java/com/stormpath/spring/config/StormpathWebMvcConfiguration.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,9 @@ public Controller stormpathAccessTokenController() {
463463
return super.stormpathAccessTokenController();
464464
}
465465

466+
/**
467+
* @since 1.5.0
468+
*/
466469
@Bean
467470
@Override
468471
public Controller stormpathRevokeTokenController() {
@@ -581,6 +584,9 @@ public ControllerConfig stormpathVerifyConfig() {
581584
return super.stormpathVerifyConfig();
582585
}
583586

587+
/**
588+
* @since 1.5.0
589+
*/
584590
@Bean
585591
@Override
586592
public ControllerConfig stormpathSamlConfig() {

extensions/spring/stormpath-spring/src/main/java/com/stormpath/spring/config/StormpathEnabled.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.springframework.core.type.AnnotatedTypeMetadata;
2121

2222
/**
23-
* @since 1.4.2
23+
* @since 1.5.0
2424
*/
2525
public class StormpathEnabled implements Condition {
2626

0 commit comments

Comments
 (0)