User Verifier service provides an endpoint /verify
which allows to verify if the response acquired from Fractal by using their user uniqueness check is valid and eligible to mint Human SBT. It responses with an encoded and signed Human SBT request to be used with Human SBT issuer smart contract call sbtMint
.
Back-end service which responsive for session token generation and being a middleware between web app and database.
Mocker for Gov Portal web app which allows user to check their uniqueness with Fractal identity system and verify the response with User Verifier service.
Rust toolchain version 1.74
Default configuration could be found in ./config/default.json
file.
listenAddress
: host:port to run the verifier service at. Defaults tolocalhost:10000
signer
: signer configurationkeys
:issuerHumanSBT
: hex encoded private key to sign Human SBT requests to be used as arguments for Human SBT issuer smart contract callsbtMint
. Should be set before app startissuerOGSBT
: hex encoded private key to sign Human SBT requests to be used as arguments for OG SBT issuer smart contract callsbtMint
. Should be set before app startissuerSNOSBT
: hex encoded private key to sign Human SBT requests to be used as arguments for SNO SBT issuer smart contract callsbtMint
. Should be set before app start
requestLifetime
: lifetime duration in millis for which the signed request will be valid to use for SBT issuer smart contract callsbtMint
. Defaults to 60 secondssbtLifetime
: lifetime duration in millis for Human SBT since minted for a user. Defaults to 100 years
fractal
: Fractal Id configurationrequestTokenUrl
: url used to exchange auth code for auth token. Could be found in Fractal Id documentation. Defaults to production envrequestUserUrl
: url used to fetch Fractal user information by auth token. Defaults to production envclientId
: client id for Fractal integration. Could be found in Admin section at Fractal web app for developers. Should be set before app startclientSecret
: client secret for Fractal integration. Could be found in Admin section at Fractal web app for developers. Should be set before app start
Default configuration and credentials could be overriden by using ./config/custom.json
file.
Default configuration could be found in ./gov-portal-db/config/default.json
file.
listenAddress
: host:port to run the gov portal database middleware at. Defaults tolocalhost:10001
session
: session manager configurationsecret
: secret to generate session tokens. Should be set before app startlifetime
: lifetime duration in seconds for which the session token will be valid to access database by using middleware. Defaults to 1 day
usersManager
: user's manager configurationsecret
: secret to generate registration tokens to be sent to user specified email for verification. Should be set before app startlifetime
: lifetime duration in seconds for which the registration token will be valid to register user by using middleware. Defaults to 10 minuserProfileAttributes
: restrictions to user profile attributes for data validation purpose, eg. max user name or bio lengthemailVerification
: mailer configurationmailerBaseUrl
: mailer service base http urlsendTimeout
: send mail request timeout in secondstemplateUrl
: link sent within verification email, must contain{{VERIFICATION_TOKEN}}
token place holderfrom
: sender's informationname
: sender's nameemail
: sender's mail
subject
: mail subject
moderators
: comma separated array of moderator EVM-compatible wallet addresses, e.g. [0xaAbB...445566
,0xcCdD...778899
, ..]
mongo
: MongoDB configurationurl
: mongo connection url in formatmongodb://host:port
. Should be set before app startdb
: database name with users collection. Defaults toAirDAOGovPortal
collection
: collection name with user profiles. Defaults toUsers
requestTimeout
: maximum amount of time given to execute MongoDB requests before timeout. Defaults to 10 sec
Default configuration and credentials could be overriden by using ./config/custom.json
file.
Default configuration could be found in ./gov-portal-mocker/config/default.json
file.
listenAddress
: host:port to run the gov portal web app mocker at. Defaults tolocalhost:8080
userDb
: connection settings to AirDAO Gov Portal DBbaseUrl
: base url to connect to database middleware. Defaults tohttp://localhost:10001
signer
: signer configurationurl
: base url for User Verifier service. Defaults tohttp://localhost:10000
redirectUri
: redirect url used by Fractal to redirect users back after uniqueness check. Could be found in Admin section at Fractal web app for developers asAuthorization callback URL
. Defaults tohttp://localhost:8080/auth
fractalClientId
: client id for Fractal integration. Could be found in Admin section at Fractal web app for developers. Should be set before app start
web
:pages
: key-value table with templates for mocker web app pages, where key is an endpoint name and value is file where template content located
Default configuration and credentials could be overriden by using ./config/custom.json
file.
Supported logging levels: info
, debug
, trace
. Defaults to info
log level. Could be set with RUST_LOG
env var.
Integration tests will require running local hardhat node with deployed contracts.
To run integration tests use cargo test --features enable-integration-tests -- --test-threads=1
While being inside repo root directory run cargo run
. Could be run with RUST_LOG
env variable to set logging level, e.g. RUST_LOG=debug cargo run
.
While being inside repo root directory run cargo run --bin airdao-gov-portal-db
. Could be run with RUST_LOG
env variable to set logging level, e.g. RUST_LOG=trace cargo run --bin airdao-gov-portal-db
.
While being inside repo root directory run cargo run --bin airdao-gov-portal-mocker
. Could be run with RUST_LOG
env variable to set logging level, e.g. RUST_LOG=trace cargo run --bin airdao-gov-portal-mocker
.
Open web browser and go to default url http://localhost:8080
, or any other url if overriden in Gov Portal Mocker configuration file.