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 Responses

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

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
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
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement