access-token

What is the difference between /check_token and user-info-uri endpoints in Spring OAuth2?

☆樱花仙子☆ 提交于 2020-01-13 03:55:26
问题 Spring exposes /check_token endpoint; see this link For /check_token we need to configure RemoteTokenServices and it extracts the token. However, we can also configure UserInfoTokenServices that essentially does the same thing. The only difference I can tell is the first one is according to OAuth 2.0 extension: Token Introspection Endpoint, however, this endpoint doesn't return node 'active' according to OAuth 2 Extension which is mandatory. See this link But that aside, is there any other

Accessing Google Reader subscriptions with OAuth2 access_token

让人想犯罪 __ 提交于 2020-01-12 02:33:11
问题 Is that possible to access Google Reader subscriptions using OAuth2 access_token? I've created Google APIs project, setting up domain and created javascript code that receives OAuth2 token. It works well for other Google APIs, but not for Google Reader OPML subscriptions. Could anyone hint me? 回答1: Seems I've solved myself. The trick was that after obtaining "code" token from browser, you should perform call to https://accounts.google.com/o/oauth2/token to obtain access_token, token_type,

Implicit grant SPA with identity server4 concurrent login

瘦欲@ 提交于 2020-01-11 07:48:06
问题 how to restrict x amount of login on each client app in specific the SPA client with grant type - implicit This is out of scope within Identity server Solutions tried - Access tokens persisted to DB, however this approach the client kept updating the access token without coming to code because the client browser request is coming with a valid token though its expired the silent authentication is renewing the token by issues a new reference token ( that can be seen in the table persistGrants

Google Analytics API - get Access Token without authenticate with the “consent screen”

耗尽温柔 提交于 2020-01-10 03:18:04
问题 I'm developing a website that uses Google Analytics API. I followed this tutorial -> https://developers.google.com/analytics/solutions/articles/hello-analytics-api?hl=pt-PT and everything works fine. I get the "consent screen", I give "permissions" and I'm redirected to my website, with all information. But, I want to change the things a little. I want to get all info of Google Analytics, without using the "consent screen", i.e. , using just the Google Analytics code (UA-XXXXXXXX-X) or any

How to POST request in c# with content-type being x-www-form-urlencoded?

和自甴很熟 提交于 2020-01-06 19:53:24
问题 Picture of Postman POST request I would like to make this POST request to receive an OAuth2 access token but using c# code in Visual Studio 2015. Thanks. 回答1: System.Net.HttpWebRequest is the class you need to know, this is a easy sample. About more infomation see MSDN :https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.110).aspx HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); webRequest.Method = "POST"; webRequest.AllowAutoRedirect = true; webRequest

OWIN Oauth differentiate expired and invalid token

我的梦境 提交于 2020-01-06 11:47:13
问题 I use OWIN Oauth in my ASP.NET MVC application to provide access token for mobile applications. Here's the setup of OAuth: app.UseOAuthAuthorizationServer(new OAuthAuthorizationServerOptions { TokenEndpointPath = new PathString("/api/authenticate/login"), Provider = dependencyContainer.GetService<IOAuthAuthorizationServerProvider>(), RefreshTokenProvider = dependencyContainer.GetService<IAuthenticationTokenProvider>(), AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(applicationSettings

Refresh token using google api returning invalid_request

北慕城南 提交于 2020-01-06 08:15:01
问题 I am trying to refresh my expired token using the Google API following the instructions on https://developers.google.com/accounts/docs/OAuth2WebServer#refresh So here is my code (python) refresh_token = requests.post( 'https://accounts.google.com/o/oauth2/token', headers={ 'Content-Type': 'application/x-www-form-urlencoded', }, data=json.dumps({ 'client_id': APP_ID, 'client_secret': APP_SECRET, 'refresh_token': refresh_token, 'grant_type': 'refresh_token', }) ) However, I am getting the

IdentityServer 4 get timestamp while login/refresh token

拈花ヽ惹草 提交于 2020-01-06 08:11:03
问题 We are using identity server 4 to protect the api/resources. One of the requirements is to trace the user activity which means, the last time the user consumed the api (not logged in but consumed). As we have 30+ apis, we thought it would be easrier to intercept this validation process/event to register in the database the last activity date once the token gets validated against the identity server . My question here, does this validation really happens on identity server level each and every

Angular : how can I get Google access token

老子叫甜甜 提交于 2020-01-06 07:41:35
问题 I am trying to get Access token using Angular 4. When the user logIn using Google I get the following Data. authToken // * id email . . . name I think that the variable authToken is not the access token because when I try to verify it using the following code ( spring boot), GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), JacksonFactory.getDefaultInstance()) .setAudience(Collections.singletonList( "ID_CLIENT") .build(); try { GoogleIdToken idToken =

Youtube API access is granted but I still have Invalid Credentials error

邮差的信 提交于 2020-01-05 04:37:06
问题 Trying to test search functions of the YoutubeAPI, but getting this Could it be because of my channel(which is binded to my gmail account, which I currently using in console.developers.google) was banned? UPD: Created new account, situation still the same Well, what I've have done here: created porject in console.developers.google activated youtube data api(choosed app or somth like this, not the js one), downloaded json, which looks like that First I call the Authorize method (new page shows