ghannam80

ghannam80

API authorisation using OAUTH

Hello,

I am trying to learn Elixir through building a remittance aggregator starting with consuming third party API services like MasterCard.
I tested regaular public API services with Elixir Req and livebook and it is fine but now for such services it is highly secured and encrypted.

Any idea if we have an Elixir library similar to the
one below built by MC team for OAUTH handling using RSA cryptography?

https://github.com/Mastercard/oauth1-signer-java

Most Liked

Lucassifoni

Lucassifoni

You can indeed spawn a Java application behaving as an Erlang Node as seen from your Elixir application, using the Java library OtpErlang.jar, built along the erlang application :jinterface.

Note that the version available on Maven is very outdated, you will have to pull it from Erlang. I have a github action here building OtpErlang.jar for the last 3 versions of OTP if you’d like. I wouldn’t advise pulling it from my repo yet but you can use it a a basis.

But in your case, I’d probably go with the Node library, or the Go library through wasmer/wasmex, since mastercard provides the same library for go, python, java, php, node, c#, and ruby. Or rewrite it in Elixir.

This would avoid running a companion java application along your main application. Also note that Jinterface/OtpErlang is now considered legacy but stable by the OTP team. This means that there are applications that actively use it and that they should not be disturbed by a breaking change, but that maybe it isn’t the best choice to depend on it for a new project today when there are alternatives.

Carefully weigh your options :slight_smile: .

Whoops, did not see the thread was 8 months old..

jan-mb-me

jan-mb-me

This talk from @sasajuric about using the Kafka java libraries might help: https://www.youtube.com/watch?v=iVHpFoDXim4

Where Next?

Popular in Questions Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement