Skip to main content Module login Copy item path Source use crate::cli::client::TokenResponseBody ; ๐ use crate::cli::client::fetch_discovery_document ; ๐ use crate::cli::client::unix_now ; ๐ use crate::cli::config::ProfileAuth ; ๐ use crate::cli::secrets::StoredTokens ; ๐ use crate::cli::state::CliState ; ๐ use crate::cli::state::SECRETS_LOCATION ; ๐ use base64::Engine as _; ๐ use base64::engine::general_purpose::URL_SAFE_NO_PAD; ๐ use haste_fhir_model::r4::generated::terminology::IssueType; ๐ use haste_fhir_operation_error::OperationOutcomeError; ๐ use sha2::Digest; ๐ use sha2::Sha256; ๐ use std::io::BufRead ; ๐ use std::io::BufReader ; ๐ use std::io::Write ; ๐ use std::net::TcpListener ; ๐ use std::sync::Arc ; ๐ use tokio::sync::Mutex; ๐ bind_callback_listener ๐ code_challenge_s256 ๐ open_in_browser ๐ parse_redirect_port ๐ random_url_safe_string ๐ run ๐ Runs the login command: the browser-based authorization_code + PKCE login flow for
the active profile, caching the resulting tokens in the secrets file. With
no_browser, prints the authorization URL instead of opening it. wait_for_callback ๐ Blocks waiting for the browser to redirect back with ?code=&state=, on a single
connection to the loopback listener. Returns (code, state).