cloudtracer / ThreatPinchLookup

Documentation and Sharing Repository for ThreatPinch Lookup Chrome & Firefox Extension
https://chrome.google.com/webstore/detail/threatpinch-lookup/ljdgplocfnmnofbhpkjclbefmjoikgke
360 stars 78 forks source link

Support for 3rd Party REST API using OAuth authentication #57

Closed shivang-crest closed 6 years ago

shivang-crest commented 6 years ago

Looking for support for 3rd party REST APIs which works on OAuth authentication.

cloudtracer commented 6 years ago

I can look into it, is there a service you can recommend to test with?

Its been awhile since I've done anything with OAuth, but at the end of the series don't you just end up with a token that is used in the HTTP header? If so, it should be possible to do now, albeit not in a very straight forward process.

If you have a service you can recommend that would be great and I try to put a lookup together for it. Otherwise I'll try to find something when I have time and see what can be done.

shivang-crest commented 6 years ago

Yes, for REST APIs using OAuth we need to supply token in HTTP header. Could you please share the process of achieving the API calls in ThreatPinch using OAuth.

We have a login url, which requires api-key/secret and generates token in response. The generated token is to be used in subsequent API call in request headers.

cloudtracer commented 6 years ago

Have you tried using the wizard to add the integration? There is a short youtube video on how to do it. https://www.youtube.com/watch?v=XM_eRM7pYos

You can add the ${PINCH.USERDEFINED.api_key.value} field in the user defined section.

Above the user defined section is the HTTP Headers, you can click the add button to add new headers and then use the api_key variable to add the OAUTH key.

I'd need a similar API to test with though to help you get it going.