account request infrastructure (#50, #51)

This commit is contained in:
Michael Quigley 2022-09-09 13:35:21 -04:00
parent 5d594ce91a
commit 75eeb481e9
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
3 changed files with 42 additions and 5 deletions

View File

@ -7,11 +7,12 @@ import (
) )
type Config struct { type Config struct {
Endpoint *EndpointConfig Endpoint *EndpointConfig
Proxy *ProxyConfig Proxy *ProxyConfig
Email *EmailConfig Email *EmailConfig
Store *store.Config Registration *RegistrationConfig
Ziti *ZitiConfig Store *store.Config
Ziti *ZitiConfig
} }
type EndpointConfig struct { type EndpointConfig struct {

View File

@ -16,6 +16,20 @@ create table accounts (
constraint chk_token check(token <> '') constraint chk_token check(token <> '')
); );
--
-- account_requests
--
create table account_requests (
id integer primary key,
token string not null unique,
email string not null unique,
verified boolean not null default(false),
source_address string not null,
created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now'))
);
-- --
-- environments -- environments
-- --

22
etc/ctrl.yml Normal file
View File

@ -0,0 +1,22 @@
# _____ __ ___ | | __
# |_ / '__/ _ \| |/ /
# / /| | | (_) | <
# /___|_| \___/|_|\_\
# controller configuration
endpoint:
host: 0.0.0.0
port: 18080
proxy:
url_template: "https://{svcName}.zrok.quigley.com:8080/"
identities:
- ""
store:
path: zrok.db
ziti:
api_endpoint: "https://127.0.0.1:1280"
username: admin
password: admin