Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ You will need to register your application using the Handcash
[developer dashboard](https://dashboard.handcash.dev) and make a note of your
app's **app ID**.

## App configuration

In your Elixir app's `config.exs` set your Handcash app's key and secret.

```elixir
config :handkit,
api_key: "YOUR-HANDCASH-API-KEY-HERE",
api_secret: "YOUR-HANDCASH-API-SECRET-HERE"
```

## User authorization

Familiarize yourself with the Handcash Connect
Expand Down
3 changes: 3 additions & 0 deletions lib/handkit/middleware/signed_request.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ defmodule Handkit.Middleware.SignedRequest do
{"oauth-publickey", Curvy.Key.to_pubkey(key) |> Base.encode16(case: :lower)},
{"oauth-signature", get_request_sig(env, timestamp, key)},
{"oauth-timestamp", timestamp},
{"app-id", Application.get_env(:handkit, :api_key)},
{"app-secret", Application.get_env(:handkit, :api_secret)},
{"consumer", "handkit"}
]

env
Expand Down