- code :: https://github.com/KineticCafe/app-identity/tree/main/elixir
- issues :: https://github.com/KineticCafe/app-identity/issues
AppIdentity is an Elixir implementation of the Kinetic Commerce application identity proof algorithm as described in its spec.
app = %{id: id, secret: secret, version: 2}
proof = AppIdentity.generate_proof(app)
AppIdentity.verify_proof(proof, app)There is a Plug available for authenticating applications, AppIdentity.Plug.
plug AppIdentity.Plug,
headers: ["app-identity-proof"],
finder: fn %{id: id} = _proof -> IdentityApplications.get(id) endThere is a Tesla Middleware for providing proof generation for clients.
def client(app) do
middleware = [
{AppIdentity.TeslaMiddleware, identity_app: app, header: "app-identity-proof"}
]
endThe package can be installed by adding app_identity to your list of
dependencies in mix.exs:
def deps do
[
{:app_identity, "~> 1.3"}
]
endIf you need to use a pre-release version, the dependency structure is slightly different:
def deps do
[
{:app_identity, github: "KineticCafe/app_identity", sparse: "elixir"}
]
endIf on Elixir 1.13 or later, you can use :subdir instead:
def deps do
[
{:app_identity, github: "KineticCafe/app_identity", subdir: "elixir"}
]
endOptional features are present when Plug and/or Tesla are part of your application.
Documentation can found at HexDocs or generated with ex_doc.
AppIdentity uses a Semantic Versioning scheme with one
significant change:
- When PATCH is zero (
0), it will be omitted from version references.
Additionally, the major version will generally be reserved for specification revisions.
AppIdentity for Elixir welcomes contributions. This project, like all Kinetic Commerce open source projects, is under the Kinetic Commerce Open Source Code of Conduct.
AppIdentity for Elixir is licensed under the Apache License, version 2.0 and requires certification of a Developer Certificate of Origin. See Licence for more details.