Paladin Client v0.2.1 PaladinClient behaviour
Provides helper functions for working with the Paladin service and a Behaviour for adapters
Summary
Functions
When using Paladin, your issuer should be your application ID
Fetch the url of Paladin in this environment
Fetch the paladin id from config via the name
When you have an existing Guardian JWT you may use it to exchange via Paladin for a token of the application you wish to talk to
Without an existing token, you may generate your own token to make use as an exchange for Paladin
When there is no existing token. This is useful for when there is no user you are acting on behalf of. Primarily system to system
Callback implementation for Application.start/2
Types
Functions
Fetch the paladin id from config via the name
In your configuration you should add a KWList of name: id
config :paladin_client, PaladinClient,
apps: [
app_one: "app-one-id",
app_two: "app-two-id",
]
PaladinClient.fetch_app_id(:app_one) == “app-one-id”
When you have an existing Guardian JWT you may use it to exchange via Paladin for a token of the application you wish to talk to
Without an existing token, you may generate your own token to make use as an exchange for Paladin
When there is no existing token. This is useful for when there is no user you are acting on behalf of. Primarily system to system
Callback implementation for Application.start/2
.
Callbacks
access_token(assertion_token) :: {:ok, jwt, expiry} | {:error, reason}