- home :: https://github.com/KineticCafe/app-identity
- code :: https://github.com/KineticCafe/app-identity/tree/main/ruby
- issues :: https://github.com/KineticCafe/app-identity/issues
AppIdentity is a Ruby implementation of the Kinetic Commerce application identity proof algorithm as described in its spec.
app = AppIdentity::App.new(id: id, secret: secret, version: 2)
proof = AppIdentity.generate_proof!(app)
AppIdentity.verify_proof!(proof, app)
In a Rails application, proof verification would use
AppIdentity::RackMiddleware.
require 'app_identity/rack_middleware'
config.middleware.use AppIdentity::RackMiddleware,
header: "app-identity-proof",
finder: ->(proof) { IdentityApplication.find(proof[:id]) }
There is a Faraday Middleware for providing proof generation for clients.
Faraday.new(url: url) do |conn|
conn.request :app_identity, app: app,
header: 'app-proof-identity'
end
Add app_identity
to your Gemfile:
gem 'app_identity', '~> 1.1'
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 Ruby welcomes contributions. This project, all Kinetic Commerce open source projects, is under the Kinetic Commerce Open Source Code of Conduct.
AppIdentity for Ruby is licensed under the Apache License, version 2.0 and requires certification via a Developer Certificate of Origin. See Licence for more details.