How to access Magento Rest API with auth_key and auth_secret in Talend - api

I want to consume Magento Rest API using Talend, I already generated oauth_token & oauth_token_secret but when i am using it with tRestClient component it is returning as 403 error code any one suggest how to configure it?

I Don't think so there is option by which you can integrate magento rest api with Talend.
Authentication
Magento REST API uses 3-legged OAuth 1.0a protocol to authenticate the application to access the Magento service.
So For each time I think you have to authorize the application.
I think you can use Soap API or XML RPC for this.

Related

Calling Twitter API endpoints with Jmeter

I have created a Twitter-developer account and also a project and an app to be able to invoke web services endpoints.
I would like to know if anyone has ever managed to successfully retrieve expected response from the endpoints, and in that case, what authentication methods is the simplest and most effective to use and in what order?
Thank you for your help and advice
As per Twitter API documentation the possible methods are in:
OAuth 1.0a
OAuth 2.0 Bearer Token
Basic authentication
The latter one is the easiest to implement as all you need to do is to add HTTP Authorization Manager and provide your credentials there and JMeter will automatically add the relevant Authorization header to all your HTTP Request samplers
More information: How to Use HTTP Basic Authentication in JMeter

How to manage a JWT login procedure from Micronaut client to a REST API?

I am new to Micronaut and trying to develop a gateway that connects on the client side to a REST API. The API requires an authentication token which is obtained by first sending a POST requests with credentials in the body. The API is then responding with a valid token which needs to be refreshed from time to time. I am able to inject a bearer token in the headers to authenticate my requests but I do not understand whether I have to handle the whole authentification process myself or if the Micronaut framework can manage it on its own?
Thank you very much for your help.
You could create an HttpClientFilter to handle authentication, refresh and the header. You can find an example here which cover basic authentication.
Yours will be more complicated since you need to refresh etc.
Also doing this way, allow you to decouple your authentication code from your API.

Generate Access Token and validate against IdentityServer4 through Azure API Management

I have an external endpoint which is going to hit the Azure API gateway and that would route it to the backend API which is protected by IdentityServer4 authorization.
I am getting the access token if I hit it through the Postman client with the interactive UI from IdentityServer.
Is there a way I can get the access token required from the Azure API Management to validate against the IdentityServer4 and append it to the header in the request to the backend API?
Yes it is possible to achieve it through custom policy. You can ask your external API-Client/Consumer to paas in credentials in heaser, and then you write a policy inside inbound to can read those user credentials and do a API request (similar to your postman) and get the access token. You can then append the same token and let your request gets forwarded to backend API.
As per your problem statement, this should work. In case not, you might have to explain your scenario with more description/steps.
Here are some of the reference materials for you, I hope it helps.
https://learn.microsoft.com/en-us/azure/api-management/api-management-advanced-policies#SendRequest
https://learn.microsoft.com/en-us/azure/api-management/api-management-sample-send-request
Postman has a luxury of a human user seeing the UI and authorizing API access and IdentityServer4 to issue a token for Postman. There is no such luxury when call is being processed by APIM server, as you could send request for token to IdentityServer4, but who would be presented UI to authorize the action?
The only way is to provision some sort of secret to APIM (header, query, certificate) that would be recognized by IdentityServer4 to allow it issuing tokens for APIM. If such secred is available you could use send-request policy to make a call to IdentityServer4 and obtain required token.
Or make sure that every request to APIM has a token already.

How to use Google OAuth as autentification for Symfony2 Rest API

I am working on SPA and HTML5 Mobile application that's consume my server application via rest api. Server app connects to Google Adwords Api and then sending data to client app. My question is: is it possible to use google oauth login as login for my server api. And how?
Do I need to use FOSOAuthServerBundle?
Best,
Antonio
This is the flow for this use case: https://developers.google.com/identity/sign-in/web/server-side-flow
And after this you can use google token as your api token, or build your own oauth and use your own token.
Also it is possible to use FOSOAuthServerBundle with custom grant

ASP.NET web api authentication with bacbone.js

I'm implementing a RESTful web service using ASP.Net Web Api and Backbone.js at client side. What will the best way to authenticate user?
You are building SPA then it is recommend to use Token Based Authentication not Cookies, once you obtain the access token from the Auth server (Web API) you need to store it in html5 local storage then with each subsequent request to a protected resource you need to send this access token in the "Authorization" header using bearer scheme.
I've compiled detailed post about this but it uses Angular, so it will be very close to backbone.js