spring-social

EnableOAuth2Sso simultaneously for multiple social networks

随声附和 提交于 2019-11-28 09:05:04
问题 I am implementing a spring boot application that needs to provide OAuth2 token authorization and support multiple social services (google+, facebook etc). The user should be able to select his preferred social network and sign-in using the OAuth2 authorization framework. I am implementing the above using the approach described here http://cloud.spring.io/spring-cloud-security/. Currently my application.yml looks like this spring: oauth2: client: clientId: {{my app's google id} clientSecret: {

how to Secure Spring Boot RESTful service with OAuth2 and Social login

五迷三道 提交于 2019-11-28 06:25:12
问题 I am trying to use Angular 2 Front End application as a client which will consume the resource from Spring RESTful Web Service. So thought of protecting this web service with OAuth 2 authentication and Social Login (Google and Facebook). After successful login with Social Login it's not redirecting to the URL (port at which Angular 2 is running in local environment with 3000 port) from which I made the request but its redirecting to 8080 port in local environment localhost:3000 - Front End

Spring MVC: How to use a request-scoped bean inside a spawned thread?

ⅰ亾dé卋堺 提交于 2019-11-28 06:20:13
In a Spring MVC application, I have a request-scoped bean. I inject this bean somewhere. There, the HTTP-request serving thread could possibly spawn a new thread. But whenever I try accessing the request-scoped bean from the newly spawned thread, I get a org.springframework.beans.factory.BeanCreationException (see stack trace below). Accessing the request-scoped bean from the HTTP request thread works fine. How can I make a request-scoped bean available to threads spawned by the HTTP request thread? Simple setup Get the following code snippets running. Then start up a server, for instance at

Integrate Spring Security OAuth2 and Spring Social

你说的曾经没有我的故事 提交于 2019-11-28 03:57:43
I'm working with a Spring Boot + Spring Security OAuth2 application that I believe was inspired by examples from Dave Syer. The application is configured to be an OAuth2 authorization server, with a single public client using the Resource Owner Password Credentials flow. A successful token is configured to be a JWT. The public Angular client sends a POST request to /oauth/token with a basic auth header containing the client id and secret (this was the easiest way to get the client to authenticate, even though the secret is not private). The body of the request contains username, password, and

What could cause the original 'OAuth2' state parameter to be null in org.springframework.social.connect.web.ConnectSupport?

风格不统一 提交于 2019-11-27 07:41:10
问题 I am trying to use Spring Social on my application and I noticed while debugging that the original 'OAuth2' state parameter is always null on my app. See Spring Social source code for org.springframework.social.connect.web.ConnectSupport below: private void verifyStateParameter(NativeWebRequest request) { String state = request.getParameter("state"); String originalState = extractCachedOAuth2State(request);//Always null... if (state == null || !state.equals(originalState)) { throw new

Spring MVC: How to use a request-scoped bean inside a spawned thread?

假装没事ソ 提交于 2019-11-27 01:17:05
问题 In a Spring MVC application, I have a request-scoped bean. I inject this bean somewhere. There, the HTTP-request serving thread could possibly spawn a new thread. But whenever I try accessing the request-scoped bean from the newly spawned thread, I get a org.springframework.beans.factory.BeanCreationException (see stack trace below). Accessing the request-scoped bean from the HTTP request thread works fine. How can I make a request-scoped bean available to threads spawned by the HTTP request

Integrate Spring Security OAuth2 and Spring Social

瘦欲@ 提交于 2019-11-27 00:18:37
问题 I'm working with a Spring Boot + Spring Security OAuth2 application that I believe was inspired by examples from Dave Syer. The application is configured to be an OAuth2 authorization server, with a single public client using the Resource Owner Password Credentials flow. A successful token is configured to be a JWT. The public Angular client sends a POST request to /oauth/token with a basic auth header containing the client id and secret (this was the easiest way to get the client to

Spring Boot Hibernate 5 Ignoring @Table and @Column

家住魔仙堡 提交于 2019-11-26 23:36:42
问题 This is driving me mad. I'm implementing Spring Social and it requires you to have a database table named UserConnection (instead of using the standard naming convention of using an underscore to separate the two words). So in my naive world view, I assumed it would be easily solved by specifying @Table(name="UserConnection") ... but no, that would be all too easy. The annotation is ignored and the table is created as user_connection which then causes Spring Social to have a hissy fit. Please