mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 15:21:39 +02:00
API Token Fixes (#218)
* split api secret into owner_api secret and node api secrets * update for master, drop requirement for authentication for foreign api when run on same port as owner api * rustfmt * re-trigger build
This commit is contained in:
@@ -45,6 +45,7 @@ fn show_recovery_phrase(phrase: ZeroingString) {
|
||||
#[derive(Clone)]
|
||||
pub struct GlobalArgs {
|
||||
pub account: String,
|
||||
pub api_secret: Option<String>,
|
||||
pub node_api_secret: Option<String>,
|
||||
pub show_spent: bool,
|
||||
pub chain_type: global::ChainTypes,
|
||||
@@ -178,7 +179,7 @@ where
|
||||
wallet,
|
||||
km,
|
||||
config.owner_api_listen_addr().as_str(),
|
||||
g_args.node_api_secret.clone(),
|
||||
g_args.api_secret.clone(),
|
||||
g_args.tls_conf.clone(),
|
||||
config.owner_api_include_foreign.clone(),
|
||||
);
|
||||
|
||||
@@ -137,6 +137,7 @@ where
|
||||
let basic_auth_middleware = Arc::new(BasicAuthMiddleware::new(
|
||||
api_basic_auth,
|
||||
&GRIN_OWNER_BASIC_REALM,
|
||||
Some("/v2/foreign".into()),
|
||||
));
|
||||
router.add_middleware(basic_auth_middleware);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user