Packages

Provides helper functions and a Read-Through cache for interacting with Paladin

Current section

Files

Jump to
paladin_client lib paladin_client in_memory.ex
Raw

lib/paladin_client/in_memory.ex

defmodule PaladinClient.InMemory do
@moduledoc """
An in memory adapter for PaladinClient testing
"""
@behaviour PaladinClient
def access_token(_assertion_token) do
token = "assertion_token:#{System.os_time(:nanoseconds)}"
{:ok, token, System.os_time(:seconds) + System.convert_time_unit(5, :seconds, :seconds)}
end
end