oauth2

google datastore token not authorized?

匿名 (未验证) 提交于 2019-12-03 02:42:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: jwt1=`echo -n '{"alg":"RS256","typ":"JWT"}' | openssl base64 -e` jwt2=`echo -n '{\ "iss":"...@developer.gserviceaccount.com",\ "scope":"https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/datastore",\ "aud":"https://accounts.google.com/o/oauth2/token",\ "exp":'$(($(date +%s)+3600))',\ "iat":'$(date +%s)'}' | openssl base64 -e` jwt3=`echo -n "$jwt1.$jwt2" | tr -d '\n' | tr -d '=' | tr '/+' '_-'` jwt4=`echo -n "$jwt3" | openssl sha -sha256 -sign google.p12 | openssl base64 -e` jwt5=`echo -n "$jwt4" | tr -d '\n' | tr

node js with gmail api, The API returned an error: Error: unauthorized_client

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Edit: The error is happening on on this piece of code: var gmail = google.gmail('v1'); gmail.users.labels.list({ auth: auth, userId: 'me', }, function(err, response) { if (err) { console.log('The API returned an error: ' + err); return; } I am using gmail api with Node js. When I go through their quickstart guide I keep getting this error. https://developers.google.com/gmail/api/quickstart/nodejs The API returned an error: Error: unauthorized_client Keep in mind, I went through the quickstart with my email adress, everything was fine. No

Google OAuth2: Required parameter is missing: grant_type

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have tried just about everything, read every StackOverflow post on this issue but I still can't get it to work. Interestingly enough, I am able to get 200 OK response when sending a POST request via DHC REST API Client (Google Chrome app). var url = 'https://accounts.google.com/o/oauth2/token'; var params = querystring.stringify({ grant_type: 'authorization_code', code: req.body.code, client_id: req.body.clientId, client_secret: 'HIDDEN', redirect_uri: req.body.redirectUri }); params = querystring.unescape(params); // doesn't work with or

Cannot find class [org.springframework.security.oauth2.provider.token.InMemoryTokenStore] for bean with name 'tokenStore'

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using spring oauth2.. following is my spring-security.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oauth="http://www.springframework.org/schema/security/oauth2" xmlns:context="http://www.springframework.org/schema/context" xmlns:sec="http://www.springframework.org/schema/security" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring

Salesforce Authentication Failing

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use OAuth authentication to get the Salesforce Authentication Token, so I referred wiki docs , but after getting authorization code, when I make a Post request with 5 required parameters, I'm getting following exception {"error":"invalid_grant","error_description":"authentication failure"} CODE 400 JSON = {"error":"invalid_grant","error_description":"authentication failure"} which is I guess a bad request. PostMethod post = new PostMethod("https://login.salesforce.com/services/oauth2/token"); post.addParameter("code",#########

invalid_client in google oauth2

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I try to make a web page for youtube video upload, therefore I try to get the client id from google api console, and in the api console it shows something like this: Client ID : 533832195920.apps . googleusercontent . com Redirect URIs : http : //bobyouku.ap01.aws.af.cm/testyoutube.php https : //developers.google.com/oauthplayground However when I try to test my account using the following URL: https://accounts.google.com/o/oauth2/auth?client_id=533832195920.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Fbobyouku.ap01.aws.af

Android - how to get google plus access token?

匿名 (未验证) 提交于 2019-12-03 01:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hello i am getting google plus access token without using OAuth 2.0 client ID with scopes. But with this access token does not fetch email address. How to fetch user email address? Is there any difference between accesstoken with and without OAuth 2.0 client ID? I have used following code, String accessToken=""; try { accessToken = GoogleAuthUtil.getToken( getApplicationContext(), mPlusClient.getAccountName(), "oauth2:" + Scopes.PLUS_LOGIN + " " + Scopes.PLUS_PROFILE); System.out.println("Access token==" + accessToken); } catch (Exception e)

Angular 7 app getting CORS error from angular client

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have developed an angular 7 app with express backend. Express running on localhost:3000 and angular client is running on localhost:4200. In the server.js I have (not the entire code) const app = express(); // Enable CORS app.use(cors()); // Get our API routes const api = require('./api'); // Set our api routes app.use('/api', api); app.use(express.static(__dirname + '/dist/sfdc-event')); In the api.js file, I have router.get(‘/oauth2/login’) which redirects to https://example.com which sends an access token and authenticates the user

OAuth2 with Spring Boot REST application - cannot access resource with token

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to use OAuth2 for my REST spring boot project. Using some examples I have created configuration for OAuth2: @Configuration public class OAuth2Configuration { private static final String RESOURCE_ID = "restservice" ; @Configuration @EnableResourceServer protected static class ResourceServerConfiguration extends ResourceServerConfigurerAdapter { @Override public void configure ( ResourceServerSecurityConfigurer resources ) { // @formatter:off resources . resourceId ( RESOURCE_ID ); // @formatter:on } @Override public void

OAuth2 WebApi Token Expiration

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to set a token expiration time dynamically, but it appears it just keeps defaulting to 20 minutes. Here is my ConfigureAuth: public void ConfigureAuth(IAppBuilder app) { OAuthOptions = new OAuthAuthorizationServerOptions { TokenEndpointPath = new PathString("/Token"), Provider = new ApplicationOAuthProvider(""), // In production mode set AllowInsecureHttp = false AllowInsecureHttp = true }; // Enable the application to use bearer tokens to authenticate users app.UseOAuthBearerTokens(OAuthOptions); } Here is my