access-token

Google API Oauth php permanent access

心不动则不痛 提交于 2019-12-03 03:52:50
问题 I am using the google Calendar API. This is what I want, once you give the app the permission, I can always use the app, without the need of giving access everyday. I keep hearing that I need to save the access token or use the refresh token to do what I want to do.. Here is the thing, how do you do it? How does the code look like? I've tried saving the token in a cookie, but after an hour, the access token has expired. How do I keep the user logged in? PS: Please give me code examples with

How to use RemoteTokenService?

天涯浪子 提交于 2019-12-03 02:23:30
I have a separate ResourceServer built using Spring-Security-oauth2. Here is the code RemoteTokenService. @Bean public ResourceServerTokenServices tokenService() { RemoteTokenServices tokenServices = new RemoteTokenServices(); tokenServices.setClientId("sample_test_client_app"); tokenServices.setClientSecret("secret"); tokenServices.setCheckTokenEndpointUrl("http://localhost:8080/oauth/check_token"); return tokenServices; } When I'm accessing the resource server with AccessToken I get the following: FilterSecurityInterceptor - Secure object: FilterInvocation: URL: /oauth/check_token;

Do cookies protect tokens against XSS attacks? [closed]

一笑奈何 提交于 2019-12-03 02:07:59
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I'm building a JWT-based (JSON Web Token) authentication mechanism for an browser-based Javascript web app, working with a stateless server (no user-sessions!) and I want to know, once and for all, if using storing my JWT token in a cookie will protect my token from XSS attacks,

JWT and Web API (JwtAuthForWebAPI?) - Looking For An Example

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 02:03:52
问题 I've got a Web API project fronted by Angular, and I want to secure it using a JWT token. I've already got user/pass validation happening, so I think i just need to implement the JWT part. I believe I've settled on JwtAuthForWebAPI so an example using that would be great. I assume any method not decorated with [Authorize] will behave as it always does, and that any method decorated with [Authorize] will 401 if the token passed by the client doesn't match. What I can't yet figure out it how to

Unable to receive a permanent access token for my Shopify App

老子叫甜甜 提交于 2019-12-03 00:42:00
I'm following the Shopify instructions to get a permanent token for a particular app/shop combination ( http://api.shopify.com/authentication.html ). I'm able to get the temporary token and then use a simple html form to receive a permanent token: But the response I get is: {"error":"invalid_request"} Can you help me, please? I searched everywhere (Stackoverflow, Shopify support forums, etc...) but cannot find a clue on how to solve this. My app is online and hosted on Heroku. Thanks, I think we have similar minds! I was experiencing the exact same issue as you. I think we were both confused

How to get access token? (Reddit API)

末鹿安然 提交于 2019-12-03 00:37:09
I wonder if it is possible to get a permanent access token for personal use on Reddit? It will only be me using the App. For users, the access token expires after 1 hour. My using the below information that I have about my client-id and secret, I put up a start attempt of trying to get an access token. (MessageBox show " Error 401 ") If a user will get a token, one have to click "Allow" in the browser. Very well described here. https://github.com/reddit/reddit/wiki/OAuth2 This it NOT what I am after. I am after for, personal use, an access token only through code. Is this possible? String

OAuth 2.0 Generating Token and Secret Token [closed]

[亡魂溺海] 提交于 2019-12-03 00:35:34
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center . I am implementing the OAuth 2.0 provider server using Apache Oltu framework, looking for some idea on how to generate the access token and secret tokens in java. Please advise. OAuth 2.0 specification doesn't tell anything about how to generate token and secret token. Thus it is up to you whether you use some existing/anchor data to

Implementing an RESTful API Authentication using tokens (Yii/Yii2)

人盡茶涼 提交于 2019-12-03 00:30:03
问题 I am building an API in Yii 1.x which will be used with a mobile application. Part of the process involves a login (with a username and password) using the following JSON request below:- // Request sent with username & password { "request" : { "model" : { "username" : "bobbysmith", "password" : "mystrongpassword" } } } // If successfully logged in return the following response { "response": { "code": 200, "message": "OK", "model": { "timestamp": 1408109484, "token":

What is the difference between OAuth based and Token based authentication?

社会主义新天地 提交于 2019-12-03 00:19:03
问题 I thought that OAuth is basically a token based authentication specification but most of the time frameworks act as if there is a difference between them. For example, as shown in the picture below Jhipster asks whether to use an OAuth based or a token based authentication. Aren't these the same thing ? What exactly is the difference since both includes tokens in their implementations ? 回答1: This is a good question -- there is a lot of confusion around tokens and OAuth. First up, when you

How do i use FQL with php api? and access token

时间秒杀一切 提交于 2019-12-02 23:28:14
问题 Grr... I cant seem to get fql working. One thing, I think the docs are old because i dont think api() likes just an array. Anyway: $user_id = $facebook->getUser();//works $access_token = $facebook->getAccessToken();//works $fql = 'SELECT name from user where uid = ' . $user_id; $ret_obj = $facebook->api(array( 'method' => 'fql.query', 'access_token' => $access_token, 'query' => $fql, )); print_r($ret_obj);// dont work. actually I get exceptions I've tried all kinds of combinations of params