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

Commit a78fd7e

Browse files
author
Mario
committed
1158 doing some clean up
1 parent 47fce8a commit a78fd7e

File tree

11 files changed

+12
-15
lines changed

11 files changed

+12
-15
lines changed

extensions/servlet/src/main/java/com/stormpath/sdk/servlet/filter/DefaultUsernamePasswordRequestFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.stormpath.sdk.directory.AccountStore;
2222
import com.stormpath.sdk.lang.Assert;
2323
import com.stormpath.sdk.servlet.http.authc.AccountStoreResolver;
24-
import com.stormpath.sdk.servlet.http.authc.BasicAuthenticationScheme;
2524

2625
import javax.servlet.http.HttpServletRequest;
2726
import javax.servlet.http.HttpServletResponse;

extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc/AbstractController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ public abstract class AbstractController implements Controller {
8080
private Resolver<Locale> localeResolver;
8181
private AccountResolver accountResolver = AccountResolver.INSTANCE;
8282
private ContentNegotiationResolver contentNegotiationResolver = ContentNegotiationResolver.INSTANCE;
83-
private ProviderAccountRequestFactory providerAccountRequestFactory;
8483

8584
public String getUri() {
8685
return uri;

extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc/DefaultProviderAccountRequestFactory.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Stormpath, Inc.
2+
* Copyright 2017 Stormpath, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -71,6 +71,11 @@ public ProviderAccountRequest getProviderAccountRequest(HttpServletRequest reque
7171
return Providers.LINKEDIN
7272
.account().setCode(code).build();
7373
}
74+
case "twitter": {
75+
String code = providerData.get("accessToken");
76+
return Providers.TWITTER
77+
.account().setAccessToken(code).build();
78+
}
7479
default: {
7580
log.error("No provider configured for " + providerId);
7681
return null;

extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc/GithubAccessTokenResolver.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Stormpath, Inc.
2+
* Copyright 2017 Stormpath, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@
2323
import com.stormpath.sdk.directory.AccountStoreVisitorAdapter;
2424
import com.stormpath.sdk.directory.Directory;
2525
import com.stormpath.sdk.impl.provider.DefaultGithubProvider;
26-
import com.stormpath.sdk.impl.provider.IdentityProviderType;
2726
import com.stormpath.sdk.lang.Assert;
2827
import com.stormpath.sdk.servlet.application.ApplicationResolver;
2928
import com.stormpath.sdk.servlet.http.MediaType;
@@ -45,8 +44,6 @@
4544
import java.util.List;
4645
import java.util.Map;
4746

48-
import static com.stormpath.sdk.servlet.mvc.JacksonFieldValueResolver.MARSHALLED_OBJECT;
49-
5047
/**
5148
* @since 1.3.0
5249
*/

extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc/ProviderAccountRequestFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Stormpath, Inc.
2+
* Copyright 2017 Stormpath, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818
import com.stormpath.sdk.provider.ProviderAccountRequest;
1919

2020
import javax.servlet.http.HttpServletRequest;
21-
import java.util.Map;
2221

2322
// Refactor of Provider requests for
2423
// https://github.com/stormpath/stormpath-sdk-java/issues/915

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ public abstract class AbstractStormpathWebSecurityConfiguration {
153153
@Qualifier("stormpathWrappedServletRequestFactory")
154154
private WrappedServletRequestFactory wrappedServletRequestFactory;
155155

156-
157156
public StormpathWebSecurityConfigurer stormpathWebSecurityConfigurer() {
158157
return new StormpathWebSecurityConfigurer();
159158
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ public void init(HttpSecurity http) throws Exception {
277277
http.servletApi().rolePrefix(""); //Fix for https://github.com/stormpath/stormpath-sdk-java/issues/325
278278

279279
if (loginEnabled) {
280+
//This filter adds Client and Application as attributes to every request in order for subsequent Filters to have access to them
280281
http.addFilterBefore(stormpathWrapperFilter, SecurityContextPersistenceFilter.class);
281282

282283
// We need to add the springSecurityResolvedAccountFilter whenever we have our login enabled in order to

extensions/spring/stormpath-spring-security-webmvc/src/main/java/com/stormpath/spring/security/provider/SocialCallbackSpringSecurityProcessingFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Stormpath, Inc.
2+
* Copyright 2017 Stormpath, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

extensions/spring/stormpath-spring-security-webmvc/src/test/groovy/com/stormpath/spring/config/LoginAndLogoutHandlersConfig.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016 Stormpath, Inc.
2+
* Copyright 2017 Stormpath, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

extensions/spring/stormpath-spring-security-webmvc/src/test/resources/com/stormpath/spring/config/loginAndLogoutHandlers.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2016 Stormpath, Inc.
2+
# Copyright 2017 Stormpath, Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -13,5 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
1716
stormpath.web.csrf.token.enabled = false

0 commit comments

Comments
 (0)