Packages

A small library for verifying FirebaseAuth ID tokens. See Firebase documention: https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library

Retired package: Deprecated - No longer maintained\! Seek other alternatives or fork/take over

Current section

Files

Jump to
firebase_auth_verifier lib signer_source.ex
Raw

lib/signer_source.ex

defmodule FirebaseAuthVerifier.SignerSource do
@moduledoc "The behaviour of a `SignerSource`."
@typedoc """
Any type that adopts this behaviour, such as `FirebaseAuthVerifier.CertificateManager`.
"""
@type t :: __MODULE__
@doc """
Expects to return a map with the `Joken.Signer`'s ID as a key.
NOTE: This is what is returned by Google and for now I do not know
if it's necessary to do it this way, so it might change in
the future.
"""
@callback get_signers() :: %{required(binary()) => Joken.Signer.t()} | {:error, term()}
end