Client assertions consists of an identification of the client signed with it's private key.
This assertion can be used to authenticate with PandA in Homolog or Sandbox to get an access token and possibly a refresh token as well.
- Get and install asdf.
- Clone and access the directory of this repository on terminal.
- Install Elixir and Erlang with
asdf install
. - Install dependencies with
mix deps.get
. - Compile the project with
mix compile
.
Attach to IEx
iex -S mix
Generate the client assertion
private_key = File.read!("mykey.pem")
assertion = ClientAssertion.generate(<client_id>, "stone_bank", private_key, "sandbox")
Authenticate to get access and refresh tokens
ClientAssertion.authenticate(assertion, "sandbox")
A custom client can be created through homolog or sandbox admin. Navigating to application tab : Technology > Service Apps > Applications.
After creation, the <client_id>
to be used on authentication will be listed on application summary