oauth

How to use before_action on Doorkeeper::TokenController

不羁的心 提交于 2019-12-22 10:56:53
问题 I'm having trouble with Doorkeeper::TokensController. I want to execute some code before an Access Token is asked for (if it's created or not, I want to log it anyway) using a before_action (default route is POST /oauth/token / Doorkeeper::TokensController#create . I followed the doc here by doing the following: config/routes.rb use_doorkeeper do controllers tokens: 'oauth/access_tokens' end app/controllers/access_tokens_controller.rb class Oauth::AccessTokensController < Doorkeeper:

Google Calendar API and OAuth problem

和自甴很熟 提交于 2019-12-22 10:11:12
问题 I get the error com.google.gdata.util.AuthenticationException: Unknown authorization header at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:600) ~[gdata-core-1.0.jar:na] at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563) ~[gdata-core-1.0.jar:na] at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552) ~[gdata-core-1.0.jar:na] at com.google.gdata.client.http

Facebook iOS SDK: Login to Facebook without always ask for permissions for the application

爷,独闯天下 提交于 2019-12-22 09:56:43
问题 I'm using the Facebook iOS SDK in my application and i have two similar question: Is there any way to know whether or not there is a user currently logged in? What i'm using now is storing the access token and expiration date on successful login, and load them when the application start. My question is: If the session is not valid, can i just give the user the option to log in without asking every time for permissions? because right now, every time that i want to login i get the message that

Retrieving token and secret from gdata.gauth.OAuthHmacToken python object

余生长醉 提交于 2019-12-22 08:44:45
问题 I'm following Google's great sample code for three-legged OAuth. Specifically, I'm looking at the python version of the code. I'm stuck between 'Upgrading to an access token' and 'Using an access token'. In 'Upgrading to an access token', there is a line of code as follows: access_token = client.GetAccessToken(request_token) In 'Using an access token', there is a line of code as follows: client.auth_token = gdata.gauth.OAuthHmacToken(CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET, gdata

Is Piston ready for OAuth?

本小妞迷上赌 提交于 2019-12-22 08:39:08
问题 I tried using Piston for a simple API, hoping to use its OAuth support. But the first time I hit the endpoint after enabling OAuth, I got an error: TemplateDoesNotExist: oauth/challenge.html and sure enough, there is no such file. Does OAuth work in Piston? Am I making a stupid mistake? 回答1: Nope - that looks like a bug in Piston. oauth/challenge.html is referenced here, but does not exist anywhere in that project (see Piston's templates folder). Could you try creating an empty oauth

Spring Boot - Using JWT, OAuth, and Separate Resource and Auth Servers

故事扮演 提交于 2019-12-22 08:34:12
问题 I am attempting to build a Spring application that uses JWT tokens and the OAuth2 protocol. I have the Authentication Server running thanks to this tutorial. However, I am struggling with getting the Resource Server to function properly. From following the article, and thanks to a response to a prior question, this is my current attempt: Security config for Resource Server: @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) public class SecurityConfig extends

Facebook: Given URL is not allowed by the Application configuration

不羁岁月 提交于 2019-12-22 08:27:05
问题 Starting this weekend a number of our older Facebook games are failing to load. I believe this is an issue caused by the game not getting an access token, and thus not able to make calls on behalf of the user (i.e. /me, etc.). I am seeing the following in the Javascript console: Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of

Django error in django-social-auth

一个人想着一个人 提交于 2019-12-22 08:20:38
问题 I am newbie in Django. I am implementing the facebook authentication in my app. The Error that i am getting in my terminal output is like ; File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 350, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 324, in execute django.setup() File "/usr/local/lib

facebook /v2.1/oauth/authorize do not redirect to /v2.1/dialog/oauth

China☆狼群 提交于 2019-12-22 08:17:11
问题 I try move canvas-app to v2.1 api. So when an user are authorizing to the app I send [protocol://]graph.facebook.com/v2.1/oauth/authorize?client_id=XXXX&scope=&redirect_uri=XXXXX and got redirect to [protoco://]www.facebook.com/dialog/oauth?client_id=XXXX&scope=&redirect_uri=XXXXX which is dialog from API version 1 I expect to get dialog API version 2.1 [protocol://]www.facebook.com/v2.1/dialog/oauth?client_id=XXXX&scope=&redirect_uri=XXXXX how can I reach it? 回答1: We were stumped on this and

Spring boot OAuth successful login listener not triggering

佐手、 提交于 2019-12-22 08:16:31
问题 Using Spring boot - After successfully authenticating with GitHub OAuth, the Audit listener is not being triggered. public class AuthenticationListener implements ApplicationListener<InteractiveAuthenticationSuccessEvent> { @Override public void onApplicationEvent(final InteractiveAuthenticationSuccessEvent event) { System.out.println("+++++++ ================ ------------"); } } Do I need to register it anywhere else? I have tried as suggested else where on Stackoverflow to create a @Bean,