tvl-depot/monzo_ynab/tokens.nix
William Carroll 44dca4a188 Move authorization logic into separate package
Relocated the logic for authorizing clients into a separate package that the
tokens server now depends on. Moving this helped me separate concerns. I removed
a few top-level variables and tried to write more pure versions of the
authorization functions to avoid leaking Monzo-specific details.
2020-02-10 10:06:40 +00:00

27 lines
381 B
Nix

{
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
let
auth = depot.buildGo.package {
name = "auth";
srcs = [
./auth.go
];
deps = with briefcase.gopkgs; [
utils
];
};
in depot.buildGo.program {
name = "token-server";
srcs = [
./tokens.go
];
deps = with briefcase.gopkgs; [
kv
utils
auth
];
}