spring-social

Spring Boot OAuth2 SSO with access/refresh tokens is not stored in a database correctly

我与影子孤独终老i 提交于 2020-01-04 06:46:03
问题 Based on this example https://spring.io/guides/tutorials/spring-boot-oauth2/ I have implemented application with SSO throught Social Networks. In order to improve this approach and store access/refresh tokens in my database I have added oauth_client_token table: CREATE TABLE IF NOT EXISTS oauth_client_token ( token_id VARCHAR(255), token BLOB, authentication_id VARCHAR(255), user_name VARCHAR(255), client_id VARCHAR(255), PRIMARY KEY(authentication_id) ); and extended ClientResources class in

Spring social /connect return 404

对着背影说爱祢 提交于 2020-01-04 03:59:26
问题 I'm trying to configure spring social inside my (maven)spring MVC secured(spring security) application but when I try to access /connect/ or /connect/providerid , I always get error 404 Here is my Glassfish server log when I try to access: Info: Mapped "{[/connect/{providerId}],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.web.servlet.view.RedirectView org.springframework.social.connect.web.ConnectController.connect(java.lang.String

@WithUserDetails does not seem to work

你离开我真会死。 提交于 2020-01-02 08:39:10
问题 I have an application in which I use Spring Social Security for authentication and authorization. Unfortunately I am having some problems with mocking Spring Security. It seems that it does not work at all. I have a REST controller that returns 404 Not Found if the identifier of the entity it should return is not available. If the user is not logged in then any page redirects to the social login page of my app. I have read here that the @WithUserDetails annotation would suit me the best. So

Spring social Authorisation Exception with Facebook

安稳与你 提交于 2020-01-02 06:46:23
问题 My website has suddenly started reporting this error when ever anyone logs in with Facebook: HTTP Status 500 - Authorization is required for the operation, but the API binding was created without authorization. type Exception report message Authorization is required for the operation, but the API binding was created without authorization. description The server encountered an internal error that prevented it from fulfilling this request. exception org.springframework.social

Spring social vk (Vkontakte): How to fetch user photo albums

时间秒杀一切 提交于 2019-12-29 09:57:13
问题 im trying to integrate some spring social projects into my project and now im searching for a way how to get users photo albums from vk/vkontakte. Getting the profile photo data is no problem as i can get it with the VKontakteProfile class. As the api https://vk.com/pages?oid=-17680044&p=getProfiles offers such function i was searching a api method but couldn't find... 回答1: To get user albums you must have an access_token because typically most uf users hide their albums from not autorized

Spring Social for Facebook - get user location

允我心安 提交于 2019-12-25 05:23:12
问题 I am using spring social Facebook to connect to facebook. The connection works well. I am trying to get the user's location with the following code: FacebookProfile profile = facebook.userOperations().getUserProfile(); Reference rLocation = profile.getLocation(); Location location= facebook.fetchObject(rLocation.getId(), Location.class); But what I get is an empty location object (it doesn't have any of the details). I can see that the rLocation does have a name (Los Angeles) but I also need

Maven cannot find spring social

风格不统一 提交于 2019-12-24 02:45:21
问题 I need spring social for a web site, but my maven is having issues finding it. I added both the spring social core and spring social Facebook dependencies, but i get this in eclipse: Missing artifact org.springframework.social:spring-social-core:jar:1.1.0.BUILD-SNAPSHOT Missing artifact org.springframework.social:spring-social-config:jar:1.1.0.BUILD-SNAPSHOT Missing artifact org.springframework.social:spring-social:jar:1.1.0.RELEASE I cant seem to fix it. If it helps any here is my POM.xml: <

Spring-Security + Angular 2 + CORS. Unable to redirect Facebook signin

倾然丶 夕夏残阳落幕 提交于 2019-12-24 00:37:54
问题 I'm building an application that uses Angular 2 on the front end, and Spring Boot on the backend. I am using Spring-Security and Spring Social to allow login through Facebook. I thought I had configured CORS correctly, but I am getting the following error message: XMLHttpRequest cannot load http://localhost:8080/auth/facebook. The request was redirected to 'https://www.facebook.com/v2.5/dialog/oauth?client_id=1113908502021844&respo…alhost%3A8080%2Fauth%2Ffacebook&state=d4fb1987-9042-4d49-8bf9

How to sign up new user via Spring Social Facebook?

谁说我不能喝 提交于 2019-12-23 10:57:50
问题 I am having a website (Angular App) which I can reach on https://localhost:4200 and a server (pure REST API) that is on https://localhost:8443. Since the REST endpoints are secured, a user must login on my server. Obviously I want users to be able to signup using Facebook and further communicate with my server after login. According to the docs POST /signin/{providerId} - Initiates the sign in flow. that is why there is a button that does just this: <form ngNoForm name="fb_signin" id="fb

Spring boot application not starting on Tomcat 7

↘锁芯ラ 提交于 2019-12-23 06:22:14
问题 I am trying to deploy my Spring boot application on a Tomcat 7 server and start it. I am able to deploy, while I am facing problems in starting the server. What I did ? 1) Created a spring starter project with the initial configurations and dependencies. 2) Edited the 'org.eclipse.wst.common.project.facet.core.xml' file and changed the 'jst.web' version from 3.1 to 3.0. Cleaned the project. 3) Implemented ServletContextInitializer with onStartup method override based on the explicit