diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 615389fb61..3db1c3d89f 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -36,7 +36,7 @@ jobs: PR: ${{ github.event.pull_request.number }} REPO: ${{ github.repository }} run: | - all="assuan dav_xml dav_answers dav_apply dav_discovery dav_document mime html sheet ical vcard charset link imap smtp po jmap_address jmap_discovery jmap_response jmap_session ews ews_autodiscover ews_ntlm pst rtf mailbox_file header_block openpgp smime pkcs12 tnef" + all="assuan dav_xml dav_answers dav_apply dav_discovery dav_document mime html sheet ical vcard charset link imap smtp po jmap_address jmap_discovery jmap_response jmap_session ews ews_autodiscover ews_ntlm pst rtf mailbox_file header_block openpgp smime pkcs12 tnef sasl_failure" paths_of() { case "$1" in assuan) echo crates/assuan/ ;; @@ -51,7 +51,7 @@ jobs: ical) echo crates/ical/ ;; vcard) echo crates/vcard/ ;; link) echo crates/link/ ;; - imap|smtp) echo crates/proto/ ;; + imap|smtp|sasl_failure) echo crates/proto/ ;; po) echo crates/i18n/src/ ;; jmap_*) echo crates/jmap/ ;; pst|rtf) echo crates/pst/ ;; diff --git a/Cargo.lock b/Cargo.lock index 9c01cd06ee..874accfd3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3462,6 +3462,7 @@ dependencies = [ "mailcraft-charset", "mailcraft-i18n", "proptest", + "serde_json", ] [[package]] diff --git a/PRIVACY.md b/PRIVACY.md index b5bf329248..af5110068b 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -75,6 +75,7 @@ MailCraft connects only to these, over encrypted connections: | A JMAP server you add an account for (the session address you gave it, and the addresses at the same server that its session names) | Send/Receive, on the timer you set, a few seconds after you mark, move or delete a message of the account or send one from it, and when you open a message that isn't downloaded yet; only in a build that connects to JMAP servers (the browser build, from the version that adds it) | What a mail program sends: your password or access token, and what you change in your mail: the marks you set on a message (read, flagged, answered, forwarded), the messages you move between the server's folders and those you delete for good are told to that server, and to nobody else. Mail you send from the account goes to that server to be sent, and to nobody else: the message whole, and the addresses it goes to, those in Bcc among them (the message itself names no Bcc); the server keeps its copy, in the account's Sent folder where it has one. A password or token you type is kept in memory only, until the program closes, the server turns it down or the account's server changes; it is never remembered in the credential store, the mailbox file, the settings or the browser's storage. Where the page you use signed you in itself, the program asks it for the credential at each Send/Receive or download (once more if the server turns it down), and keeps none of it beyond that | | Microsoft's sign-in pages and Microsoft Graph, for an account that signs in with Microsoft | When you sign in; for calendar, contacts, tasks (Microsoft To Do), sending mail, working hours, categories (read, and made, recoloured and deleted there: their names and colours; after a rename, the mail and events that carry the old name are asked for by that name and given the new one), automatic replies, the rules kept on the server and Outlook's Favorites | Your sign-in happens on Microsoft's page in your browser; the program receives tokens, never your password | | Google's sign-in page (`accounts.google.com/o/oauth2/v2/auth`) and token endpoint (`oauth2.googleapis.com/token`), for an account that signs in with Google | When you sign in, switch an existing account to Google sign-in or reconnect; the token endpoint is also used when a saved sign-in is renewed | The browser's sign-in request carries the application's client ID, the permissions requested, your account address as a login hint, a random state value, a PKCE challenge and a return address on your own computer. The token endpoint receives the authorization code and PKCE verifier, or the refresh token, together with the application's client ID and Desktop client-secret registration value. Google returns tokens and identifies the signed-in address in the identity token; MailCraft makes no separate user-info request. You enter your Google password on Google's page: MailCraft never sees it. | +| Your own identity provider (an OpenID Connect or OAuth 2.0 server you name), for an IMAP account you set up to sign in with it | When you press Discover in its OAuth settings (its description, at its own address); when you sign in or a saved sign-in is renewed (its sign-in page in your browser, and its token address); when you remove the account, if it names where a refresh token is given back | For Discover, a request for the provider's own description and nothing of yours: not your address, not the client id. The browser's sign-in request carries the client ID you entered, the permissions requested, your address as a hint, a one-time check value and the address on your own computer the page sends you back to; the token address gets the one-time code or the saved sign-in, the client ID, and the client secret only if you entered one. The sign-in is used only with your account's own mail servers | | Gmail's API (`gmail.googleapis.com`), for an account that signs in with Google, to move mail between Gmail's inbox categories | Not in this version: moving mail between Gmail's categories is switched off until Google has reviewed MailCraft's use of the API. Once it is switched on, only at the Send/Receive after you move a message of the Inbox from one Gmail category to another; never for an account that signs in with an app password | Gmail's own id of each message you moved, the category it goes to (the labels to add and take off), and the account's sign-in token, which Gmail's API takes as it is; nothing else of the message or of you | | The Exchange server of an Exchange server account (your organisation's own Exchange Server, Grommunio or SmarterMail), for its address list | When you press Check Names (Ctrl+K) in a message written from that account and a name you typed matches none or more than one of your contacts; and when you search the account's address list in People (its Address Book, chosen at the top of the list), for what you type in the search box, from two characters on, once you pause. Never while you type a recipient, never while you work offline, and never for a script or an agent | The names as you typed them (ten a request, at most fifty for one Check Names), with your sign-in, over the account's own connection. Who it finds (a name, an address, the job title, department and company, and in the Address Book the work and mobile numbers and the office) is kept in the window while you choose or look, and in the recipients you choose, and nowhere else: not in the mailbox file, not on disk, not in a log. Add to Contacts makes a contact on this computer of the person shown, on your press | | A public DNS-over-HTTPS resolver (Cloudflare, then Google) | When you press Connect while adding an account at a domain the program does not know: once for the domain's mail exchangers and twice for where its Exchange automatic setup is (the `_autodiscover._tcp` record and `autodiscover.`), and, when the exchangers name no provider the program knows, up to four times more for the DNS records that say where the domain's mail servers are (its `_imaps`, `_imap`, `_submissions` and `_submission` SRV records); and while an Exchange server account is set up | The domain of your address (the part after the @), never the mailbox name | diff --git a/apps/mailcraft-cli/src/main.rs b/apps/mailcraft-cli/src/main.rs index 860c51a1d2..350b722f2e 100644 --- a/apps/mailcraft-cli/src/main.rs +++ b/apps/mailcraft-cli/src/main.rs @@ -48,8 +48,10 @@ USAGE: Send/Receive with the account's mail server; the password is read from MAILCRAFT_PASSWORD. An account that signs in on its provider's page prints the - page to open (application id: MAILCRAFT_MS_CLIENT_ID), - or takes a token from MAILCRAFT_ACCESS_TOKEN + page to open (application id: MAILCRAFT_MS_CLIENT_ID; + an own provider's client secret: + MAILCRAFT_CLIENT_SECRET), or takes a token from + MAILCRAFT_ACCESS_TOKEN mailcraft-cli detect
[--offline] the mail servers and sign-in an address usually takes; for a domain it doesn't know it asks the DNS who takes the domain's mail (only the domain @@ -222,6 +224,10 @@ fn write_stdout(write: impl FnOnce(&mut std::io::StdoutLock<'static>) -> std::io /// What `sync` says when the owner signed in on the provider's page as somebody other than the /// account (#103): nothing of that sign-in is used. (It names nobody: this is printed.) +/// Why a sign-in at an own identity provider whose client has a secret doesn't start: the command +/// line takes the secret from the environment only. +const CLIENT_SECRET_NEEDED: &str = "sync: this account's identity provider wants its client secret: set MAILCRAFT_CLIENT_SECRET to it"; + const SOMEONE_ELSE: &str = "sync: you signed in as somebody other than this account; sign in again with the account's own address"; /// `sync` for an account kept in step through Microsoft Graph: the folder changes made here go @@ -596,8 +602,12 @@ fn run(args: &[String]) -> Result<(), Failure> { mailcraft_model::OAuthProvider::Google => { ("MAILCRAFT_GOOGLE_CLIENT_ID", option_env!("MAILCRAFT_GOOGLE_CLIENT_ID").unwrap_or_default()) } + // (Its client id is the account's own setting: there is no other.) + mailcraft_model::OAuthProvider::Custom => ("", ""), }; - oauth.client_id = std::env::var(variable).unwrap_or_else(|_| built_in.to_string()); + if !variable.is_empty() { + oauth.client_id = std::env::var(variable).unwrap_or_else(|_| built_in.to_string()); + } } let open = |url: &str| { eprintln!( @@ -610,6 +620,16 @@ fn run(args: &[String]) -> Result<(), Failure> { mailcraft_model::OAuthProvider::Microsoft => { mailcraft_net::oauth::sign_in(&oauth, &request.account.email, &open, &cancel) } + // An own provider's client secret, when its client has one, comes + // from the environment as the other secrets do (the desktop + // program keeps it in the system's credential store). + mailcraft_model::OAuthProvider::Custom => { + let secret = std::env::var("MAILCRAFT_CLIENT_SECRET").unwrap_or_default(); + if oauth.has_secret && secret.is_empty() { + return Err(CLIENT_SECRET_NEEDED.into()); + } + mailcraft_net::oauth::sign_in_custom(&oauth, &secret, &request.account.email, &open, &cancel) + } mailcraft_model::OAuthProvider::Google => { let default = option_env!("MAILCRAFT_GOOGLE_CLIENT_SECRET").unwrap_or_default(); let secret = std::env::var("MAILCRAFT_GOOGLE_CLIENT_SECRET").unwrap_or_else(|_| default.to_string()); @@ -624,7 +644,9 @@ fn run(args: &[String]) -> Result<(), Failure> { } }; let tokens = signed_in.map_err(|e| format!("sync: {e}"))?; - if tokens.someone_else(&request.account.email, &request.account.username) { + // (As the window judges it: an own provider's names needn't be the + // account's; the mail servers judge its token, #1844 review.) + if mailcraft_engine::sync_driver::signed_in_as_other(&request.account, &tokens) { return Err(SOMEONE_ELSE.to_string().into()); } tokens.access diff --git a/apps/mailcraft/src/approval_flow.rs b/apps/mailcraft/src/approval_flow.rs index 54c2deb022..ac17a0b546 100644 --- a/apps/mailcraft/src/approval_flow.rs +++ b/apps/mailcraft/src/approval_flow.rs @@ -90,7 +90,7 @@ fn sign_in_request(cancel: &Arc) -> SignInRequest { oauth: settings(), email: "avery@lumen.example".into(), refresh: String::new(), - google_client_secret: String::new(), + client_secret: String::new(), cancel: cancel.clone(), quiet: false, graph: false, diff --git a/apps/mailcraft/src/main.rs b/apps/mailcraft/src/main.rs index 6dbbe0edc8..b4d6d773a9 100644 --- a/apps/mailcraft/src/main.rs +++ b/apps/mailcraft/src/main.rs @@ -722,7 +722,13 @@ fn sign_in_with(request: SignInRequest, open_page: &dyn Fn(&str) -> bool) -> Res // and that is what is said. let no_browser = AtomicBool::new(false); let open = |url: &str| { - if !open_page(url) { + // (What the log is told: that the page was asked for and how that went; never its address, + // which names the client and the owner.) + log::info!("sign-in: asking the browser to open the provider's page"); + if open_page(url) { + log::info!("sign-in: the browser took the page; waiting for it to come back to this computer"); + } else { + log::warn!("sign-in: no browser could be started for the provider's page"); no_browser.store(true, Ordering::Relaxed); request.cancel.store(true, Ordering::Relaxed); } @@ -753,11 +759,13 @@ fn sign_in_with(request: SignInRequest, open_page: &dyn Fn(&str) -> bool) -> Res mailcraft_net::oauth::sign_in_google_explained_at( endpoints, &request.oauth, - &request.google_client_secret, + &request.client_secret, &request.email, &open, &request.cancel, ) + } else if request.oauth.provider == mailcraft_model::OAuthProvider::Custom { + mailcraft_net::oauth::sign_in_custom_explained(&request.oauth, &request.client_secret, &request.email, &open, &request.cancel) } else { mailcraft_net::oauth::sign_in_explained(endpoints, &request.oauth, &request.email, &open, &request.cancel) }; @@ -774,7 +782,7 @@ fn sign_in_with(request: SignInRequest, open_page: &dyn Fn(&str) -> bool) -> Res SignInEnd::Cancelled => ("it was called off", mailcraft_net::NetError::SignInCancelled.to_string()), // Never hand a potentially sensitive provider response to the window or log. SignInEnd::Other(_) if google => ("it failed", "Google could not complete sign-in. Please retry or use an app password.".into()), - SignInEnd::Other(e) => ("it failed", e.to_string()), + SignInEnd::Other(e) => ("it failed", in_window_language(&e)), }; // The failure category is enough; no account identifier belongs in this log. log::info!("sign-in on the provider's page: {how}"); @@ -789,11 +797,20 @@ fn sign_in_with(request: SignInRequest, open_page: &dyn Fn(&str) -> bool) -> Res return on_the_page(&Endpoints::for_resource(&request.oauth, resource)); } if !request.refresh.is_empty() { + log::info!("sign-in: renewing with the refresh token"); let refreshed = if request.oauth.provider == mailcraft_model::OAuthProvider::Google { - mailcraft_net::oauth::refresh_google_at(&Endpoints::of(&request.oauth), &request.oauth, &request.google_client_secret, &request.refresh) + mailcraft_net::oauth::refresh_google_at(&Endpoints::of(&request.oauth), &request.oauth, &request.client_secret, &request.refresh) + } else if request.oauth.provider == mailcraft_model::OAuthProvider::Custom { + mailcraft_net::oauth::refresh_custom(&request.oauth, &request.client_secret, &request.refresh) } else { mailcraft_net::oauth::refresh(&request.oauth, &request.refresh) }; + match &refreshed { + Ok(_) => log::info!("sign-in: renewed"), + Err(e) if e.is_refused_sign_in() => log::info!("sign-in: the provider refused the renewal; its page is next if the owner asked"), + Err(e) if e.is_unreachable() => log::info!("sign-in: the provider couldn't be reached for the renewal"), + Err(_) => log::info!("sign-in: the renewal failed"), + } match refreshed { Ok(tokens) => return Ok(tokens), // The machine-readable invalid_grant response confirms this Google refresh @@ -807,7 +824,7 @@ fn sign_in_with(request: SignInRequest, open_page: &dyn Fn(&str) -> bool) -> Res Err(_) if request.oauth.provider == mailcraft_model::OAuthProvider::Google => { return Err("Google sign-in could not reach the authorization server. Retry later.".into()); } - Err(e) => return Err(e.to_string()), + Err(e) => return Err(in_window_language(&e)), } } // Nobody asked for this run: no page is put in front of the owner. @@ -825,6 +842,13 @@ fn sign_in_with(request: SignInRequest, open_page: &dyn Fn(&str) -> bool) -> Res on_the_page(&Endpoints::of(&request.oauth)) } +/// What a sign-in or an identity provider's Discover came to, in the window's language: the words +/// that are MailCraft's own are translated (`said!` in `mailcraft-net`), what a provider or the +/// system said stays as it was said. +fn in_window_language(e: &mailcraft_net::NetError) -> String { + e.said().in_lang(mailcraft_ui_egui::i18n::current()) +} + /// Have an administrator approve this program for an organisation: Microsoft's admin-consent /// page in the system's browser, and the wait for its yes or no. Only ever because the owner /// said "I'm an administrator". No tokens come of it, and nothing is believed of what comes @@ -1120,6 +1144,7 @@ fn services( let pst_ctx = ctx.clone(); let alert_ctx = ctx.clone(); let autodiscover_ctx = ctx.clone(); + let oauth_discover_ctx = ctx.clone(); let (keys_ctx, keys_store) = (ctx.clone(), secrets::store()); let attachment_preview = attachment_render::service(&ctx); let (sync_ctx, sign_in_ctx, graph_ctx, mx_ctx, test_ctx) = (ctx.clone(), ctx.clone(), ctx.clone(), ctx.clone(), ctx); @@ -1243,6 +1268,32 @@ fn services( discover: Some(Box::new(move |domain| { background(&mx_ctx, "server discovery", move || mailcraft_net::discover(&domain).map_err(|e| e.to_string())) })), + oauth_discover: Some(Box::new(move |issuer: String| { + background(&oauth_discover_ctx, "identity provider discovery", move || { + mailcraft_net::oauth::discovery::discover(&issuer) + .map(|found| mailcraft_ui_egui::OAuthFound { + no_refresh: found.lacks_offline_access(), + base_scopes: found.base_scopes(), + authorize: found.authorize, + token: found.token, + revoke: found.revoke, + outside: found.outside, + client_auth: found.client_auth, + issuer_in_response: found.issuer_in_response, + }) + .map_err(|e| in_window_language(&e)) + }) + })), + revoke_sign_in: Some(Box::new(|oauth: mailcraft_model::OAuth, secret: String, refresh: String| { + let started = std::thread::Builder::new().name("give back a sign-in".into()).spawn(move || { + if mailcraft_net::oauth::revoke_custom(&oauth, &secret, &refresh).is_err() { + log::info!("the identity provider couldn't be told to forget a removed account's sign-in"); + } + }); + if started.is_err() { + log::info!("couldn't start giving a removed account's sign-in back"); + } + })), lookup_autodiscover: Some(Box::new(move |domain| { background(&autodiscover_ctx, "autodiscover records", move || mailcraft_net::autodiscover_hosts(&domain).map_err(|e| e.to_string())) })), diff --git a/crates/engine/src/account_oauth_tests.rs b/crates/engine/src/account_oauth_tests.rs new file mode 100644 index 0000000000..b5fa1be6a7 --- /dev/null +++ b/crates/engine/src/account_oauth_tests.rs @@ -0,0 +1,344 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! An account that signs in with an own identity provider, through the account commands: what is +//! taken, what is refused, and that Microsoft's and Google's built-in values stay theirs. + +use mailcraft_model::{OAuthProvider, SaslChoice}; +use serde_json::{Value, json}; + +use crate::Session; + +const ISSUER: &str = "https://id.example.org/realms/mail"; + +fn own(extra: Value) -> Value { + let mut v = json!({ + "email": "alice@example.org", + "username": "alice", + "incoming": {"host": "mail.example.org", "port": 993}, + "outgoing": {"host": "mail.example.org", "port": 465}, + "auth": "oauth2", + "provider": "custom", + "clientId": "mailcraft", + "issuer": ISSUER, + "authorizeUrl": format!("{ISSUER}/protocol/openid-connect/auth"), + "tokenUrl": format!("{ISSUER}/protocol/openid-connect/token"), + }); + if let (Some(v), Value::Object(extra)) = (v.as_object_mut(), extra) { + v.extend(extra); + } + v +} + +fn add(s: &mut Session, v: &Value) -> u64 { + s.run("account.add", v).unwrap()["id"].as_u64().unwrap() +} + +#[test] +fn an_imap_account_is_set_up_with_its_own_identity_provider() { + let mut s = Session::empty(); + let id = add(&mut s, &own(json!({"scopes": "mail", "mechanism": "oauthbearer", "redirectPort": 53682}))); + let a = s.mailbox.account(id).unwrap(); + let oauth = a.oauth.as_ref().unwrap(); + assert_eq!((oauth.provider, oauth.client_id.as_str(), oauth.issuer.as_str()), (OAuthProvider::Custom, "mailcraft", ISSUER)); + assert_eq!((oauth.mechanism, oauth.redirect_port, oauth.scopes.as_str()), (SaslChoice::OAuthBearer, Some(53_682), "mail")); + assert!(oauth.ready().is_ok()); + // account.list says how it signs in, and nothing secret. + let listed = s.run("account.list", &json!({})).unwrap(); + let shown = listed.to_string(); + assert!(shown.contains("\"provider\":\"custom\"") && shown.contains(ISSUER), "{shown}"); + assert!(!shown.to_ascii_lowercase().contains("secret\":\""), "{shown}"); +} + +/// A client id is whatever visible ASCII the provider issued (RFC 6749 Appendix A.1), a colon +/// among it (#1844 review); a tenant stays a word. +#[test] +fn a_provider_issued_client_id_with_punctuation_is_taken() { + let mut s = Session::empty(); + let id = add(&mut s, &own(json!({"clientId": "mailcraft:desktop"}))); + assert_eq!(s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().client_id, "mailcraft:desktop"); + assert!(s.run("account.edit", &json!({"id": id, "tenant": "a:b"})).is_err()); +} + +#[test] +fn what_cant_be_used_is_refused() { + let mut s = Session::empty(); + for extra in [ + json!({"clientId": ""}), + json!({"clientId": "has space"}), + json!({"clientId": "x".repeat(201)}), + json!({"tokenUrl": "http://id.example.org/token"}), + json!({"authorizeUrl": "https://user:pw@id.example.org/auth"}), + json!({"issuer": "https://id.example.org/?x"}), + json!({"scopes": "a\"b"}), + json!({"mechanism": "plain"}), + json!({"mechanism": 3}), + json!({"redirectPort": 0}), + json!({"redirectPort": 70000}), + json!({"tokenUrl": 5}), + json!({"clientSecret": "s3cret"}), + ] { + let error = s.run("account.add", &own(extra.clone())).unwrap_err().to_string(); + assert!(!error.contains("s3cret"), "{error}"); + assert!(s.mailbox.accounts.iter().all(|a| !a.signs_in_with_own_provider()), "{extra}"); + } + // Only an account with IMAP and SMTP servers. + let no_servers = own(json!({"incoming": null, "outgoing": null})); + assert!(s.run("account.add", &no_servers).is_err()); + // (A JMAP account has no such sign-in: the settings go with the servers.) + let jmap = own(json!({"kind": "jmap", "jmap": {"session": "https://jmap.example.org/session"}})); + let id = add(&mut s, &jmap); + assert!(s.mailbox.account(id).unwrap().oauth.is_none()); +} + +#[test] +fn microsofts_and_googles_built_in_values_are_changed_only_by_becoming_an_own_provider() { + let mut s = Session::empty(); + let google = json!({"email": "ada@gmail.example", "incoming": {"host": "imap.gmail.com"}, "outgoing": {"host": "smtp.gmail.com"}, "auth": "oauth2", "provider": "google"}); + let id = add(&mut s, &google); + // An address of its own is refused as it is… + let error = s.run("account.edit", &json!({"id": id, "tokenUrl": "https://id.example.org/token"})).unwrap_err().to_string(); + assert!(error.contains("asCustom"), "{error}"); + assert_eq!(s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().provider, OAuthProvider::Google); + // …and, while it names Gmail's servers, refused even as an own provider: such a token never + // goes there, so the account would never synchronise (#1844 review)… + let error = s + .run("account.edit", &json!({"id": id, "asCustom": true, "clientId": "mine", "tokenUrl": "https://id.example.org/token"})) + .unwrap_err() + .to_string(); + assert!(error.contains("imap.gmail.com") && error.contains("own identity provider"), "{error}"); + assert_eq!(s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().provider, OAuthProvider::Google); + // …and taken when it is to be an own provider with servers of its own, from the values it had. + let own_servers = json!({"incoming": {"host": "mail.example.org", "port": 993}, "outgoing": {"host": "mail.example.org", "port": 465}}); + let mut edit = json!({"id": id, "asCustom": true, "clientId": "mine", "tokenUrl": "https://id.example.org/token"}); + if let (Some(edit), Value::Object(servers)) = (edit.as_object_mut(), own_servers) { + edit.extend(servers); + } + s.run("account.edit", &edit).unwrap(); + let oauth = s.mailbox.account(id).unwrap().oauth.clone().unwrap(); + assert_eq!(oauth.provider, OAuthProvider::Custom); + assert_eq!((oauth.token.as_str(), oauth.authorize.as_str()), ("https://id.example.org/token", "https://accounts.google.com/o/oauth2/v2/auth")); + assert!(oauth.effective().scopes.contains("https://mail.google.com/")); + // Its client id and redirect port can change as they are. + let id2 = + add(&mut s, &json!({"email": "noor@example.org", "incoming": {"host": "outlook.office365.com"}, "auth": "oauth2", "provider": "microsoft"})); + s.run("account.edit", &json!({"id": id2, "clientId": "my-app", "redirectPort": 8400})).unwrap(); + let ms = s.mailbox.account(id2).unwrap().oauth.clone().unwrap(); + assert_eq!((ms.provider, ms.client_id.as_str(), ms.redirect_port), (OAuthProvider::Microsoft, "my-app", Some(8_400))); +} + +#[test] +fn going_back_to_microsoft_or_google_takes_the_own_providers_addresses_away() { + let mut s = Session::empty(); + let id = add(&mut s, &own(json!({"scopes": "mail"}))); + s.run("account.edit", &json!({"id": id, "provider": "google"})).unwrap(); + let oauth = s.mailbox.account(id).unwrap().oauth.clone().unwrap(); + assert_eq!((oauth.provider, oauth.issuer.as_str(), oauth.token.as_str(), oauth.scopes.as_str()), (OAuthProvider::Google, "", "", "")); +} + +#[test] +fn the_built_in_values_of_each_provider_are_shown_and_restored() { + let mut s = Session::empty(); + let ms = s.run("account.oauthDefaults", &json!({"provider": "microsoft", "tenant": "organizations"})).unwrap(); + assert_eq!(ms["tokenUrl"], "https://login.microsoftonline.com/organizations/oauth2/v2.0/token"); + assert_eq!((ms["mechanism"].as_str(), ms["builtInClient"].as_bool()), (Some("xoauth2"), Some(true))); + assert!(ms["hosts"].as_array().unwrap().iter().any(|h| h == "outlook.office365.com")); + let google = s.run("account.oauthDefaults", &json!({"provider": "google"})).unwrap(); + assert_eq!(google["revokeUrl"], "https://oauth2.googleapis.com/revoke"); + let custom = s.run("account.oauthDefaults", &json!({"provider": "custom"})).unwrap(); + assert_eq!( + (custom["scopes"].as_str(), custom["tokenUrl"].as_str(), custom["mechanism"].as_str()), + (Some("openid email offline_access"), Some(""), Some("auto")) + ); + assert!(s.run("account.oauthDefaults", &json!({"provider": "carrier"})).is_err()); + + let id = add(&mut s, &own(json!({"scopes": "mail", "mechanism": "xoauth2", "redirectPort": 9000}))); + let back = s.run("account.oauthRestoreDefaults", &json!({"id": id})).unwrap(); + assert_eq!(back["oauth"]["provider"], "custom"); + let oauth = s.mailbox.account(id).unwrap().oauth.clone().unwrap(); + assert_eq!((oauth.scopes.as_str(), oauth.mechanism, oauth.redirect_port, oauth.client_id.as_str()), ("", SaslChoice::Auto, None, "mailcraft")); + let local = add(&mut s, &json!({"email": "local@example.org"})); + assert!(s.run("account.oauthRestoreDefaults", &json!({"id": local})).is_err()); +} + +#[test] +fn preset_can_be_asked_for_an_own_provider() { + let mut s = Session::empty(); + let preset = s.run("account.preset", &json!({"email": "alice@example.org", "provider": "custom"})).unwrap(); + assert_eq!((preset["auth"].as_str(), preset["provider"].as_str()), (Some("oauth2"), Some("custom"))); +} + +#[test] +fn an_identity_provider_a_domains_document_names_is_offered_never_taken_by_itself() { + let mut s = Session::empty(); + let found = |issuer: &str| json!({"email": "alice@unknown-domain.example", "found": {"incoming": {"host": "mail.unknown-domain.example", "security": "tls", "via": "autoconfig"}, "oauthIssuer": issuer}}); + let preset = s.run("account.preset", &found("https://id.unknown-domain.example/realms/mail")).unwrap(); + assert_eq!(preset["oauthIssuer"], "https://id.unknown-domain.example/realms/mail"); + // Offered, not set up: the sign-in stays a password until the owner says otherwise. + assert_eq!(preset["auth"], "password"); + for bad in ["http://id.example.org", "javascript:x", "https://id.example.org/?q", "https://u:p@id.example.org"] { + assert_eq!(s.run("account.preset", &found(bad)).unwrap()["oauthIssuer"], Value::Null, "{bad}"); + } + // A provider this program knows has its own sign-in: nothing is offered for it. + let gmail = json!({"email": "ada@gmail.com", "found": {"oauthIssuer": "https://id.example.org"}}); + assert_eq!(s.run("account.preset", &gmail).unwrap()["oauthIssuer"], Value::Null); +} + +#[test] +fn how_the_client_secret_is_sent_and_whether_the_provider_names_itself_are_settings() { + use mailcraft_model::ClientAuth; + let mut s = Session::empty(); + let id = add(&mut s, &own(json!({}))); + assert_eq!(s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().client_auth, ClientAuth::Basic); + s.run("account.edit", &json!({"id": id, "clientAuth": "post", "issuerInResponse": true})).unwrap(); + let oauth = s.mailbox.account(id).unwrap().oauth.clone().unwrap(); + assert_eq!((oauth.client_auth, oauth.issuer_in_response), (ClientAuth::Post, true)); + // Which standard scopes are asked for: as Discover found, and all three again with null. + s.run("account.edit", &json!({"id": id, "baseScopes": "openid email"})).unwrap(); + assert_eq!(s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().base_scopes.as_deref(), Some("openid email")); + s.run("account.edit", &json!({"id": id, "baseScopes": null})).unwrap(); + assert_eq!(s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().base_scopes, None); + for bad in [ + json!({"clientAuth": "private_key_jwt"}), + json!({"clientAuth": 1}), + json!({"issuerInResponse": "yes"}), + json!({"baseScopes": "openid admin"}), + json!({"baseScopes": 3}), + ] { + let mut v = bad.clone(); + v["id"] = json!(id); + assert!(s.run("account.edit", &v).is_err(), "{bad}"); + } + // Microsoft's are built in: changed only by becoming an own provider. + let ms = + add(&mut s, &json!({"email": "bo@example.org", "auth": "oauth2", "provider": "microsoft", "incoming": {"host": "outlook.office365.com"}})); + assert!(s.run("account.edit", &json!({"id": ms, "clientAuth": "post"})).is_err()); + assert!(s.run("account.edit", &json!({"id": ms, "baseScopes": "openid"})).is_err()); + // What each provider uses is said. + assert_eq!(s.run("account.oauthDefaults", &json!({"provider": "custom"})).unwrap()["clientAuth"], "basic"); +} + +/// What an agent is asked to allow names a change of where the account signs in even when it +/// lies past what is shown of a long address, or in the revocation address (#1844 review). +#[test] +fn an_agent_is_told_of_a_sign_in_change_however_late_in_the_address() { + let mut s = Session::empty(); + let long = format!("{ISSUER}/{}/one", "a".repeat(100)); + let id = add(&mut s, &own(json!({"tokenUrl": long}))); + let other = long.replace("/one", "/two"); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "tokenUrl": other})); + assert!(said.contains("its own identity provider") && said.contains("/two"), "{said}"); + let revoke = crate::agent::describe(&s, "account.edit", &json!({"id": id, "revokeUrl": "https://elsewhere.example.org/revoke"})); + assert!(revoke.contains("its own identity provider") && revoke.contains("elsewhere.example.org/revoke"), "{revoke}"); + let client = crate::agent::describe(&s, "account.edit", &json!({"id": id, "clientId": "other-client"})); + assert!(client.contains("other-client"), "{client}"); +} + +/// What an agent is asked to allow names switching the RFC 9207 check off (or on) and a change of +/// how the client secret goes to the provider (#1844 review). +#[test] +fn an_agent_is_told_when_the_issuer_check_or_the_client_authentication_changes() { + let mut s = Session::empty(); + let id = add(&mut s, &own(json!({"issuerInResponse": true}))); + let off = crate::agent::describe(&s, "account.edit", &json!({"id": id, "issuerInResponse": false})); + assert!(off.contains("RFC 9207 check is switched off"), "{off}"); + let post = crate::agent::describe(&s, "account.edit", &json!({"id": id, "clientAuth": "post"})); + assert!(post.contains("in the form") && !post.contains("RFC 9207"), "{post}"); + // Nothing of either when neither changes. + let same = crate::agent::describe(&s, "account.edit", &json!({"id": id, "issuerInResponse": true, "clientAuth": "basic"})); + assert!(!same.contains("RFC 9207") && !same.contains("client secret"), "{same}"); + s.run("account.edit", &json!({"id": id, "issuerInResponse": false})).unwrap(); + let on = crate::agent::describe(&s, "account.edit", &json!({"id": id, "issuerInResponse": true})); + assert!(on.contains("has to name itself"), "{on}"); +} + +/// A client secret is kept under the settings it is for: when they change it is no longer found, +/// and the account stops saying one is kept, unless the change comes with one (#1844 review). +#[test] +fn a_kept_client_secret_follows_the_settings_it_is_for() { + let mut s = Session::empty(); + let kept = |s: &Session, id: u64| s.mailbox.account(id).unwrap().oauth.as_ref().unwrap().has_secret; + let id = add(&mut s, &own(json!({"hasSecret": true}))); + s.run("account.edit", &json!({"id": id, "displayName": "Alice", "mechanism": "xoauth2"})).unwrap(); + assert!(kept(&s, id), "a change that leaves the settings it is for keeps it"); + s.run("account.edit", &json!({"id": id, "revokeUrl": format!("{ISSUER}/revoke-elsewhere")})).unwrap(); + assert!(!kept(&s, id), "another revocation address"); + s.run("account.edit", &json!({"id": id, "hasSecret": true})).unwrap(); + s.run("account.edit", &json!({"id": id, "issuer": "https://other.example.org/realms/mail"})).unwrap(); + assert!(!kept(&s, id), "another issuer"); + // A change that comes with a secret for the new settings keeps saying so. + s.run("account.edit", &json!({"id": id, "hasSecret": true})).unwrap(); + s.run("account.edit", &json!({"id": id, "tokenUrl": format!("{ISSUER}/token2"), "hasSecret": true})).unwrap(); + assert!(kept(&s, id)); +} + +/// An own identity provider's token never goes to Microsoft's or Google's mail servers, so an +/// account that would send it there is refused when it is set up or edited, whichever server it +/// is and whichever cloud (#1844 review). +#[test] +fn an_own_provider_is_refused_with_microsofts_or_googles_mail_servers() { + let mut s = Session::empty(); + let before = s.mailbox.accounts.len(); + for (incoming, outgoing) in [ + ("outlook.office365.com", "mail.example.org"), + ("mail.example.org", "smtp.office365.com"), + ("imap.gmail.com", "smtp.gmail.com"), + ("outlook.office365.us", "outlook.office365.us"), + ("IMAP.GMAIL.COM.", "mail.example.org"), + ] { + let v = own(json!({"incoming": {"host": incoming, "port": 993}, "outgoing": {"host": outgoing, "port": 465}})); + let error = s.run("account.add", &v).unwrap_err().to_string(); + assert!(error.contains("own identity provider"), "{incoming} {outgoing}: {error}"); + assert_eq!(s.mailbox.accounts.len(), before, "{incoming} {outgoing}"); + } + // An own account can't be moved onto them either, and is left as it was. + let id = add(&mut s, &own(json!({}))); + assert!(s.run("account.edit", &json!({"id": id, "outgoing": {"host": "smtp.gmail.com", "port": 465}})).is_err()); + let a = s.mailbox.account(id).unwrap(); + assert_eq!(a.outgoing.as_ref().map(|o| o.host.as_str()), Some("mail.example.org")); + // A Microsoft account on Microsoft's servers keeps its own sign-in. + let ms = + add(&mut s, &json!({"email": "noor@example.org", "incoming": {"host": "outlook.office365.com"}, "auth": "oauth2", "provider": "microsoft"})); + assert_eq!(s.mailbox.account(ms).unwrap().oauth.as_ref().unwrap().provider, OAuthProvider::Microsoft); +} + +/// A long address the sign-in goes to is never shortened in its host: two that differ only at the +/// end of the domain are told apart, the path alone is shortened, and a short one is said whole +/// (#1844 review). +#[test] +fn an_agent_is_always_shown_the_whole_host_a_sign_in_goes_to() { + let mut s = Session::empty(); + let id = add(&mut s, &own(json!({}))); + let host = format!("id.{}example.", "very-long-subdomain.".repeat(5)); + let path = format!("/realms/{}/protocol/openid-connect/token", "p".repeat(90)); + for suffix in ["org", "net"] { + let token = format!("https://{host}{suffix}:8443{path}"); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "tokenUrl": token})); + assert!(said.contains(&format!("https://{host}{suffix}:8443/realms/")), "{said}"); + assert!(said.contains("openid-connect/token") && !said.contains(&path), "the path is shortened: {said}"); + } + let short = format!("{ISSUER}/token-elsewhere"); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "tokenUrl": short})); + assert!(said.contains(&short), "{said}"); +} + +/// An agent's edit that points a built-in provider's sign-in at another client says so, and so +/// does one back to MailCraft's own; a change that leaves the client says nothing of it (#1844 +/// review). +#[test] +fn an_agent_is_shown_a_built_in_providers_sign_in_moved_to_another_client() { + let mut s = Session::empty(); + for provider in ["microsoft", "google"] { + let host = if provider == "google" { "imap.gmail.com" } else { "outlook.office365.com" }; + let v = json!({"email": format!("noor.{provider}@example.org"), "incoming": {"host": host}, "auth": "oauth2", "provider": provider}); + let id = add(&mut s, &v); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "clientId": "elsewhere-client"})); + assert!(said.contains("as the client \u{201c}elsewhere-client\u{201d}"), "{provider}: {said}"); + s.run("account.edit", &json!({"id": id, "clientId": "elsewhere-client"})).unwrap(); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "clientId": "another-client"})); + assert!(said.contains("as the client \u{201c}another-client\u{201d}"), "{provider}: {said}"); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "clientId": ""})); + assert!(said.contains("as MailCraft's own client"), "{provider}: {said}"); + let said = crate::agent::describe(&s, "account.edit", &json!({"id": id, "displayName": "Noor"})); + assert!(!said.contains("client"), "{provider}: {said}"); + } +} diff --git a/crates/engine/src/agent.rs b/crates/engine/src/agent.rs index 37d59055fe..cf11126385 100644 --- a/crates/engine/src/agent.rs +++ b/crates/engine/src/agent.rs @@ -416,6 +416,8 @@ const SAFE: &[&str] = &[ "account.senderAddresses", "account.offlineSize", "account.preset", + // The values built in for a provider's sign-in: read only, never a secret. + "account.oauthDefaults", // What Send/Receive is doing, or did: read only. "sync.progress", // Calls off the run under way; nothing is sent or lost by it. @@ -525,6 +527,8 @@ const ACCOUNTS: &[&str] = &[ "account.remove", // An Exchange server account stops trusting the certificate its owner chose to trust (#252). "account.forgetEwsCertificate", + // An account's sign-in settings back to what is built in: where it signs in is the owner's. + "account.oauthRestoreDefaults", // Who the owner's mail can say it is from (#797). "account.setSenderAddresses", // Calendar and contacts servers (#209): choosing where an account's calendars and contacts @@ -2272,6 +2276,27 @@ fn clip(s: &str, n: usize) -> String { if clean.chars().count() > n { format!("{}…", clean.chars().take(n).collect::()) } else { clean.to_string() } } +/// An address the owner's sign-in goes to, as an agent's request says it: a short one whole; a +/// long one with its scheme, host and port always whole (where it goes), and only the path and +/// query after them shortened, from their start and their end, so that two that differ late are +/// told apart (#1844 review). +fn address_said(address: &str) -> String { + let clean = clip(address, usize::MAX); + if clean.chars().count() <= 120 { + return clean; + } + // (`/`, `?` and `#` are ASCII: the cut is at a character's boundary.) + let after_scheme = clean.find("://").map_or(0, |at| at.saturating_add(3)); + let end = clean.get(after_scheme..).and_then(|rest| rest.find(['/', '?', '#'])).map_or(clean.len(), |at| after_scheme.saturating_add(at)); + let (origin, rest) = clean.split_at_checked(end).unwrap_or((clean.as_str(), "")); + if rest.chars().count() <= 80 { + return clean; + } + let head: String = rest.chars().take(38).collect(); + let tail: String = rest.chars().rev().take(40).collect::>().into_iter().rev().collect(); + format!("{origin}{head}…{tail}") +} + fn quoted(s: &str) -> String { let c = clip(s, 80); if c.is_empty() { "(no subject)".to_string() } else { format!("\u{201c}{c}\u{201d}") } @@ -3569,13 +3594,87 @@ fn what_it_does(s: &Session, id: &str, params: &Value) -> String { }; // The tick of a relay that takes mail without a sign-in (#836) is named: it decides // whether the password is shown to the outgoing server. - match new.map(|new| new.outgoing_without_sign_in) { + match new.as_ref().map(|new| new.outgoing_without_sign_in) { Some(true) if !account.outgoing_without_sign_in => { text.push_str("; the outgoing server needs no sign-in (the password is never sent to it)"); } Some(false) if account.outgoing_without_sign_in => text.push_str("; MailCraft signs in to the outgoing server again"), _ => {} } + // Where it signs in is named when that changes: that is where the owner's sign-in goes. + // (Compared whole, the revocation address among them, and only then clipped to be + // said: a change past what is shown still asks, #1844 review.) + let signs_in_at = |a: &mailcraft_model::Account| { + a.oauth.as_ref().map(|o| { + let used = o.effective(); + (o.provider, used.authorize, used.token, used.client_id, used.revoke, used.built_in_client) + }) + }; + let was = signs_in_at(account); + if let Some(now) = new.as_ref().map(signs_in_at).filter(|now| *now != was) { + match now { + Some((mailcraft_model::OAuthProvider::Custom, page, token, client, revoke, _)) => { + let said = address_said; + text.push_str(&format!( + "; it signs in with its own identity provider, on the page {}, with tokens from {}", + said(&page), + said(&token) + )); + // (What else changed is named too: where the refresh token goes when + // the account is removed, and the client, #1844 review.) + let before = was.as_ref().filter(|w| w.0 == mailcraft_model::OAuthProvider::Custom); + if before.is_none_or(|w| w.4 != revoke) { + if revoke.trim().is_empty() { + text.push_str("; it names no revocation address"); + } else { + text.push_str(&format!("; the refresh token is given back to {} when the account is removed", said(&revoke))); + } + } + if before.is_none_or(|w| w.3 != client) { + text.push_str(&format!("; as the client \u{201c}{}\u{201d}", clip(&client, 80))); + } + } + Some((provider, _, _, client, _, built_in)) => { + text.push_str(&format!("; it signs in with {}", provider.label())); + // A built-in provider's sign-in re-pointed at another client (an + // organisation's own registration) is named, and so is the way back + // to MailCraft's own (#1844 review). + let before = was.as_ref().filter(|w| w.0 == provider); + let client_changed = match before { + Some(w) => w.3 != client || w.5 != built_in, + None => !built_in, + }; + if client_changed { + if built_in { + text.push_str(" as MailCraft's own client"); + } else { + text.push_str(&format!(" as the client \u{201c}{}\u{201d}", clip(&client, 80))); + } + } + } + None => text.push_str("; it signs in with a password"), + } + } + // How an own provider is checked and how its client secret goes to it are named + // when they change: one switches off the RFC 9207 check (#1844 review). + let checks = |a: &mailcraft_model::Account| { + a.oauth.as_ref().filter(|o| o.provider == mailcraft_model::OAuthProvider::Custom).map(|o| (o.issuer_in_response, o.client_auth)) + }; + if let (Some((named_was, auth_was)), Some((named, auth))) = (checks(account), new.as_ref().and_then(checks)) { + match (named_was, named) { + (true, false) => text.push_str( + "; its identity provider's page no longer has to name itself when it sends the owner back (the RFC 9207 check is switched off)", + ), + (false, true) => text.push_str("; its identity provider's page has to name itself when it sends the owner back (RFC 9207)"), + _ => {} + } + if auth_was != auth { + text.push_str(match auth { + mailcraft_model::ClientAuth::Basic => "; a client secret goes to the identity provider in the Authorization header", + mailcraft_model::ClientAuth::Post => "; a client secret goes to the identity provider in the form", + }); + } + } text.push_str(&rules); text.push_str(&reads); return text; diff --git a/crates/engine/src/agent/bind.rs b/crates/engine/src/agent/bind.rs index 8cbb41d722..d43d537e75 100644 --- a/crates/engine/src/agent/bind.rs +++ b/crates/engine/src/agent/bind.rs @@ -116,6 +116,7 @@ pub fn object(id: &str) -> Option { | "account.edit" | "account.remove" | "account.forgetEwsCertificate" + | "account.oauthRestoreDefaults" | "account.davSet" | "account.davOff" | "account.graphSwitch" diff --git a/crates/engine/src/cmd/account.rs b/crates/engine/src/cmd/account.rs index d00720b812..40591fb1d0 100644 --- a/crates/engine/src/cmd/account.rs +++ b/crates/engine/src/cmd/account.rs @@ -15,8 +15,8 @@ use mailcraft_model::sync::{ Placed, RemoteFlags, RemoteOp, SyncRequest, SyncResult, SyncStage, summary_line_in, }; use mailcraft_model::{ - Account, AccountKind, Directory, EwsServer, FlagStatus, Folder, FolderKind, Id, JmapServer, MailIdentity, Mailbox, Message, OAuth, OAuthProvider, - Pending, Queued, Rgb, Security, Server, clean_name, + Account, AccountKind, ClientAuth, Directory, EwsServer, FlagStatus, Folder, FolderKind, Id, JmapServer, MailIdentity, Mailbox, Message, OAuth, + OAuthProvider, Pending, Queued, Rgb, SaslChoice, Security, Server, clean_name, }; use serde_json::{Value, json}; @@ -33,9 +33,14 @@ pub fn specs() -> Vec { CommandSpec::new("account.remove", "Remove Account", "File › Info", remove).params(r#"{"id": number} — removes the account, its mail and what is kept for it on this computer (bodies and attachments leave the content folder once a state without it is saved; no Undo step is kept), and what came from its server: its events, contacts, to-dos and calendars (what was made here and not sent yet stays, as this computer's own), Outlook's list of categories, its rules (those its server keeps stay there; those for every account stay here), and, where the window's settings are kept (the window, not mailcraft-cli), its mailbox's working hours; nothing on the server is touched. Mail moved into it from elsewhere that its server wasn't given yet goes back to where it came from, and so does mail moved into it whose original another server keeps until the copy is safe; once the copy is safe on its server, that original goes as it would have (mail moved onto this computer goes back to its original, as its copy goes with the account). The only account leaves an empty mailbox, as at a first start. Answers {"deleted": id, "leftToSweep": n (content files the sweep removes later)}"#), CommandSpec::new("account.move", "Move Account", "Folder Pane", move_account).params(r#"{"id": number, "before"?: number | null} — puts the account in another place in the folder pane, as dragging its name there does (#702): right before the account `before` names, or last without one. The shared mailboxes opened through it move with it; a shared mailbox can't be moved by itself, nor named as `before`. The order is kept in the mailbox and followed by the folder pane, File › Info, the From list of a new message, the list of calendars, Junk E-mail Options, Signatures, Rules and Alerts, the accounts of Tasks, account.list, folder.list, file.account and file.info (Send/Receive keeps the order the accounts were added in); the default account, which new mail is written from, stays the one it was. Answers {"moved": bool, "order": [id] (the accounts as the folder pane lists them, shared mailboxes included)}"#), CommandSpec::new("account.list", "List Accounts", "File › Info", list).pure(), + CommandSpec::new("account.oauthDefaults", "OAuth Built-in Settings", "File › Info", oauth_defaults) + .pure() + .params(r#"{"provider": "microsoft"|"google"|"custom", "tenant"?: string} — the values a sign-in with that provider uses when an account says nothing else: its identity provider (issuer), sign-in, token and revocation addresses, scopes, SASL mechanism, whether the client id is the build's own, and the mail servers its token is for (none for custom: an own provider's token goes to the account's own servers). For the OAuth Settings dialog and agents. Never a secret. Changes nothing. Answers {"provider", "issuer", "authorizeUrl", "tokenUrl", "revokeUrl", "scopes", "mechanism", "builtInClient", "hosts"}"#), + CommandSpec::new("account.oauthRestoreDefaults", "Restore Default OAuth Settings", "File › Info", oauth_restore_defaults) + .params(r#"{"id": number} — an account that signs in on its provider's page goes back to the values built in: a Microsoft or Google account to the build's client id and any free redirect port (its tenant stays); an account with its own identity provider to no extra scopes, the mechanism chosen by what the server offers and any free redirect port (its addresses and client id stay). Answers {"id": id, "oauth": the settings}"#), CommandSpec::new("account.preset", "Suggest Account Settings", "File › Info", preset) .pure() - .params(r#"{"email": string, "provider"?: "microsoft"|"google", "service"?: "microsoft365"|"outlook.com"|"google"|"yahoo"|"icloud"|"fastmail"|"aol"|"zoho", "mx"?: [string] (the domain's mail exchangers, when the host looked them up), "found"?: {"incoming"?: {"host": string, "port"?: number, "security": "tls"|"starttls", "via": "srv"|"autoconfig"|"ispdb"}, "outgoing"?: same, "username"?: string (the found incoming server's, as its source wrote it: %EMAILADDRESS%, %EMAILLOCALPART% or %EMAILDOMAIN% stand for the address or its parts; taken only with an incoming server found by autoconfig or ispdb)} (what the host found for the domain: its SRV records (RFC 6186, #1063), the autoconfig document it publishes, or Mozilla's ISP database (#1112); taken only when the domain and its exchangers name no provider this program knows, and a server without encryption is never taken)} — answers the servers and sign-in an address usually takes, with `via` saying where they came from (domain, mx, asked, srv, autoconfig, ispdb, or guess), `known` whether they are a provider's own, and `outside` on a server that was found and isn't in the address's own domain (the owner is asked before a password goes there, #1063, #1112); what is found or guessed is for the owner to confirm; changes nothing"#), + .params(r#"{"email": string, "provider"?: "microsoft"|"google", "service"?: "microsoft365"|"outlook.com"|"google"|"yahoo"|"icloud"|"fastmail"|"aol"|"zoho", "mx"?: [string] (the domain's mail exchangers, when the host looked them up), "found"?: {"incoming"?: {"host": string, "port"?: number, "security": "tls"|"starttls", "via": "srv"|"autoconfig"|"ispdb"}, "outgoing"?: same, "username"?: string (the found incoming server's, as its source wrote it: %EMAILADDRESS%, %EMAILLOCALPART% or %EMAILDOMAIN% stand for the address or its parts; taken only with an incoming server found by autoconfig or ispdb), "oauthIssuer"?: string (the identity provider the found incoming server's document names for an OAuth 2.0 sign-in: answered back as `oauthIssuer` for the owner to confirm, never signed in with by itself)} (what the host found for the domain: its SRV records (RFC 6186, #1063), the autoconfig document it publishes, or Mozilla's ISP database (#1112); taken only when the domain and its exchangers name no provider this program knows, and a server without encryption is never taken)} — answers the servers and sign-in an address usually takes, with `via` saying where they came from (domain, mx, asked, srv, autoconfig, ispdb, or guess), `known` whether they are a provider's own, and `outside` on a server that was found and isn't in the address's own domain (the owner is asked before a password goes there, #1063, #1112); what is found or guessed is for the owner to confirm; changes nothing"#), CommandSpec::new("sync.request", "Send/Receive All Folders", "Send / Receive", request) .pure() .key("F9") @@ -48,7 +53,7 @@ pub fn specs() -> Vec { ] } -const ACCOUNT: &str = r##"{"email": string, "displayName"?: string, "name"?: string (what the folder pane calls the account; empty: its address), "username"?: string, "incoming"?: {"host": string, "port"?: number, "security"?: "tls"|"starttls"|"none"} | null, "outgoing"?: same | null, "outgoingWithoutSignIn"?: bool (the outgoing server takes mail without a sign-in, a relay: it is never shown the password; not for an account that signs in on the provider's page), "auth"?: "password"|"oauth2" (oauth2: sign in on the provider's page), "provider"?: "microsoft"|"google", "clientId"?: string, "tenant"?: string, "directory"?: "organisation"|"personal" (which kind of Microsoft account signs in, when the sign-in said), "kind"?: "imap"|"local"|"microsoft"|"jmap"|"exchange" (microsoft: kept in step through Microsoft Graph, no mail servers; jmap: kept in step over JMAP, no mail servers; exchange: an Exchange server account, kept in step through Exchange Web Services, no mail servers), "ews"?: {"url": string (the https:// address of the server's Exchange Web Services, `…/EWS/Exchange.asmx`), "username"?: string (DOMAIN\user or a UPN; default the e-mail address), "trusted"?: string (the SHA-256 fingerprint of the one certificate trusted for this account besides the system's)} (an Exchange server account's server; the password is never a setting), "jmap"?: {"session": string (the https:// address of the server's JMAP session resource), "bearer"?: bool (the secret is a bearer token, not the account's password)} (a JMAP account's server; the secret is never a setting), "color"?: "#RRGGBB" | null (the account's colour: a dot by its name in the folder pane and a stripe on its mail in a list of more than one account's; a new account is given one of the palette's that no other has unless this says, null for none)}"##; +const ACCOUNT: &str = r##"{"email": string, "displayName"?: string, "name"?: string (what the folder pane calls the account; empty: its address), "username"?: string, "incoming"?: {"host": string, "port"?: number, "security"?: "tls"|"starttls"|"none"} | null, "outgoing"?: same | null, "outgoingWithoutSignIn"?: bool (the outgoing server takes mail without a sign-in, a relay: it is never shown the password; not for an account that signs in on the provider's page), "auth"?: "password"|"oauth2" (oauth2: sign in on the provider's page), "provider"?: "microsoft"|"google"|"custom" (custom: the owner's own identity provider, an OpenID Connect or OAuth 2.0 server in front of their own IMAP and SMTP servers; an IMAP account only), "clientId"?: string (required for custom: the client registered there for MailCraft), "tenant"?: string, "issuer"?: string|null (custom: the identity provider's https:// address, from which its sign-in addresses are found), "authorizeUrl"?: string|null, "tokenUrl"?: string|null, "revokeUrl"?: string|null (custom: its sign-in, token and revocation addresses, https:// ones, as found from the issuer or typed), "scopes"?: string|null (custom: what the tokens are asked for besides openid email offline_access, separated by spaces), "mechanism"?: "auto"|"oauthbearer"|"xoauth2" (custom: how the mail servers are given the token; auto: OAUTHBEARER when the server offers it, else XOAUTH2), "clientAuth"?: "basic"|"post" (custom: how a client secret goes to the token and revocation addresses: basic, the default, in the Authorization header as RFC 6749 §2.3.1 has every provider take it; post, in the form, for a provider that lists only that), "issuerInResponse"?: bool (custom: the provider says its page names itself, `iss`, when it sends the owner back, RFC 9207; then an answer without it is refused, and one naming another issuer always is), "baseScopes"?: string|null (custom: which of openid email offline_access the tokens are asked for, when the provider lists its scopes and lacks some of them, as Discover finds; null: all three), "redirectPort"?: number|null (the port on this computer the provider's page sends the owner back to; null: any free one), "hasSecret"?: bool (custom: whether a client secret for it is kept in the system's credential store; the window sets it with the secret), "asCustom"?: bool (with an address, scopes or a mechanism for a Microsoft or Google account: set it up for an own identity provider instead, starting from the values it had; without it such a change is refused), — a client secret is never a parameter, nor is any token: they are kept in the system's credential store, "directory"?: "organisation"|"personal" (which kind of Microsoft account signs in, when the sign-in said), "kind"?: "imap"|"local"|"microsoft"|"jmap"|"exchange" (microsoft: kept in step through Microsoft Graph, no mail servers; jmap: kept in step over JMAP, no mail servers; exchange: an Exchange server account, kept in step through Exchange Web Services, no mail servers), "ews"?: {"url": string (the https:// address of the server's Exchange Web Services, `…/EWS/Exchange.asmx`), "username"?: string (DOMAIN\user or a UPN; default the e-mail address), "trusted"?: string (the SHA-256 fingerprint of the one certificate trusted for this account besides the system's)} (an Exchange server account's server; the password is never a setting), "jmap"?: {"session": string (the https:// address of the server's JMAP session resource), "bearer"?: bool (the secret is a bearer token, not the account's password)} (a JMAP account's server; the secret is never a setting), "color"?: "#RRGGBB" | null (the account's colour: a dot by its name in the folder pane and a stripe on its mail in a list of more than one account's; a new account is given one of the palette's that no other has unless this says, null for none)}"##; fn has_server(s: &Session) -> Option<&'static str> { if s.mailbox.accounts.iter().any(|a| a.kind.has_server()) { @@ -103,15 +108,48 @@ fn sign_in(a: &mut Account, v: &Value) -> Result<(), CmdError> { } Some(_) => return Err(bad("`auth` is password or oauth2")), } + // A secret is never a setting: it is kept in the system's credential store, set in the window. + if v.get("clientSecret").is_some() { + return Err(bad( + "the client secret is never a parameter: it is entered in the window's OAuth Settings and kept in the system's credential store", + )); + } let provider = match p::str(v, "provider") { - Some(name) => Some(OAuthProvider::parse(name).ok_or_else(|| bad("`provider` is microsoft or google"))?), + Some(name) => Some(OAuthProvider::parse(name).ok_or_else(|| bad("`provider` is microsoft, google or custom"))?), None => None, }; - let (client_id, tenant) = (word("clientId", 200)?, word("tenant", 64)?); + // A client id is any visible ASCII its provider issued (RFC 6749 Appendix A.1: `mailcraft:desktop`, + // say; it is encoded wherever it is sent); a tenant goes into an address, and stays a word. + let client_id = match p::str(v, "clientId").map(str::trim) { + Some(id) if id.len() > 200 || !id.bytes().all(|b| b.is_ascii_graphic()) => { + return Err(bad("`clientId` is letters, digits and punctuation, at most 200 of them")); + } + id => id.map(str::to_string), + }; + let tenant = word("tenant", 64)?; let directory = directory_of(v)?; + let own = own_provider_fields(v)?; + let as_custom = match v.get("asCustom") { + None => false, + Some(Value::Bool(yes)) => *yes, + Some(_) => return Err(bad("`asCustom` is true or false")), + }; if let Some(o) = a.oauth.as_mut() { + // (The settings a kept client secret is for: it is kept under them, MailApp::secret_key.) + let kept_for = (o.provider == OAuthProvider::Custom && o.has_secret).then(|| o.binding()); if let Some(provider) = provider { o.provider = provider; + // (An own identity provider's addresses are none of Microsoft's or Google's.) + if provider != OAuthProvider::Custom { + *o = OAuth { + provider, + client_id: std::mem::take(&mut o.client_id), + tenant: std::mem::take(&mut o.tenant), + directory: o.directory, + redirect_port: o.redirect_port, + ..OAuth::default() + }; + } } if let Some(client_id) = client_id { o.client_id = client_id; @@ -122,10 +160,214 @@ fn sign_in(a: &mut Account, v: &Value) -> Result<(), CmdError> { if let Some(directory) = directory { o.directory = directory; } + if let Some(port) = own.redirect_port { + o.redirect_port = port; + } + if own.changes_built_in() && o.provider != OAuthProvider::Custom { + // Microsoft's and Google's addresses, scopes and mechanism are built in: an account + // with its own is set up for an own identity provider, and only when asked to be + // (the window asks the owner first), with the values it had as a start. + if !as_custom { + return Err(bad(format!( + "{}'s addresses, scopes and mechanism are built in: to use others, set up the account for your own identity provider (`asCustom`: true)", + o.provider.label() + ))); + } + let used = o.effective(); + let extra = used + .scopes + .split_ascii_whitespace() + .filter(|s| !mailcraft_model::oauth::CUSTOM_SCOPE.split(' ').any(|c| c == *s)) + .collect::>() + .join(" "); + *o = OAuth { + provider: OAuthProvider::Custom, + client_id: used.client_id, + issuer: used.issuer, + authorize: used.authorize, + token: used.token, + revoke: used.revoke, + scopes: extra, + mechanism: used.mechanism, + client_auth: used.client_auth, + redirect_port: o.redirect_port, + ..OAuth::default() + }; + } + let says_kept = own.has_secret; + own.apply(o); + // A client secret kept for settings that changed is not found under the new ones: it has + // to be given again, and the account says so rather than that one is kept, unless the + // change comes with it (#1844 review). + if kept_for.is_some_and(|was| was != o.binding()) && says_kept != Some(true) { + o.has_secret = false; + } + o.check().map_err(|why| bad(why.to_string()))?; + } else if own.changes_built_in() || provider.is_some() && provider != Some(OAuthProvider::Microsoft) { + return Err(bad("these settings are for an account that signs in on its provider's page (`auth`: \"oauth2\")")); } Ok(()) } +/// What a command says of an own identity provider's settings: each `None` when it doesn't say. +#[derive(Default)] +struct OwnProvider { + issuer: Option, + authorize: Option, + token: Option, + revoke: Option, + scopes: Option, + mechanism: Option, + client_auth: Option, + issuer_in_response: Option, + base_scopes: Option>, + redirect_port: Option>, + has_secret: Option, +} + +impl OwnProvider { + /// Whether it says anything that Microsoft's and Google's accounts have built in. + fn changes_built_in(&self) -> bool { + self.issuer.is_some() + || self.authorize.is_some() + || self.token.is_some() + || self.revoke.is_some() + || self.scopes.is_some() + || self.mechanism.is_some() + || self.client_auth.is_some() + || self.issuer_in_response.is_some() + || self.base_scopes.is_some() + } + + fn apply(self, o: &mut OAuth) { + for (given, field) in [ + (self.issuer, &mut o.issuer), + (self.authorize, &mut o.authorize), + (self.token, &mut o.token), + (self.revoke, &mut o.revoke), + (self.scopes, &mut o.scopes), + ] { + if let Some(given) = given { + *field = given; + } + } + if let Some(mechanism) = self.mechanism { + o.mechanism = mechanism; + } + if let Some(client_auth) = self.client_auth { + o.client_auth = client_auth; + } + if let Some(named) = self.issuer_in_response { + o.issuer_in_response = named; + } + if let Some(base) = self.base_scopes { + o.base_scopes = base; + } + if let Some(has_secret) = self.has_secret { + o.has_secret = has_secret; + } + } +} + +/// An own identity provider's settings from a command's params, each checked as text (what can +/// be used is for [`OAuth::check`] to say once they are all in). +fn own_provider_fields(v: &Value) -> Result { + let text = |key: &str, max: usize| -> Result, CmdError> { + match v.get(key) { + None => Ok(None), + Some(Value::Null) => Ok(Some(String::new())), + Some(Value::String(text)) if text.len() <= max => Ok(Some(text.trim().to_string())), + Some(_) => Err(bad(format!("`{key}` is a string of at most {max} bytes, or null for none"))), + } + }; + let mechanism = match p::str(v, "mechanism") { + Some(name) => Some(SaslChoice::parse(name).ok_or_else(|| bad("`mechanism` is auto, oauthbearer or xoauth2"))?), + None if v.get("mechanism").is_some_and(|m| !m.is_null()) => return Err(bad("`mechanism` is auto, oauthbearer or xoauth2")), + None => None, + }; + let client_auth = match v.get("clientAuth") { + None | Some(Value::Null) => None, + Some(Value::String(name)) => Some(ClientAuth::parse(name).ok_or_else(|| bad("`clientAuth` is basic or post"))?), + Some(_) => return Err(bad("`clientAuth` is basic or post")), + }; + let issuer_in_response = match v.get("issuerInResponse") { + None | Some(Value::Null) => None, + Some(Value::Bool(named)) => Some(*named), + Some(_) => return Err(bad("`issuerInResponse` is true or false")), + }; + let base_scopes = match v.get("baseScopes") { + None => None, + Some(Value::Null) => Some(None), + Some(Value::String(base)) if base.len() <= mailcraft_model::oauth::CUSTOM_SCOPE.len() => Some(Some(base.trim().to_string())), + Some(_) => return Err(bad("`baseScopes` is some of openid email offline_access, or null for all of them")), + }; + let redirect_port = match v.get("redirectPort") { + None => None, + Some(Value::Null) => Some(None), + Some(port) => match port.as_u64() { + Some(port @ 1..=65_535) => Some(Some(port as u16)), + _ => return Err(bad("`redirectPort` is a port from 1 to 65535, or null for any free one")), + }, + }; + let max = mailcraft_model::oauth::MAX_ENDPOINT; + Ok(OwnProvider { + issuer: text("issuer", max)?, + authorize: text("authorizeUrl", max)?, + token: text("tokenUrl", max)?, + revoke: text("revokeUrl", max)?, + scopes: text("scopes", mailcraft_model::oauth::MAX_SCOPES)?, + mechanism, + client_auth, + issuer_in_response, + base_scopes, + redirect_port, + has_secret: match v.get("hasSecret") { + None => None, + Some(Value::Bool(has)) => Some(*has), + Some(_) => return Err(bad("`hasSecret` is true or false")), + }, + }) +} + +/// `account.oauthDefaults`: what a provider's sign-in uses when the account says nothing else. +fn oauth_defaults(_: &mut Session, v: &Value) -> CmdResult { + let provider = OAuthProvider::parse(p::req_str(v, "provider")?).ok_or_else(|| bad("`provider` is microsoft, google or custom"))?; + let tenant: String = p::str(v, "tenant").unwrap_or_default().chars().take(64).collect(); + let used = provider.defaults(&tenant); + Ok(json!({ + "provider": provider.code(), + "issuer": used.issuer, + "authorizeUrl": used.authorize, + "tokenUrl": used.token, + "revokeUrl": used.revoke, + "scopes": used.scopes, + "mechanism": used.mechanism.code(), + "clientAuth": used.client_auth.code(), + "builtInClient": used.built_in_client, + "hosts": used.hosts, + })) +} + +/// `account.oauthRestoreDefaults`: an account's sign-in back to the values built in. +fn oauth_restore_defaults(s: &mut Session, v: &Value) -> CmdResult { + let id = p::req_id(v, "id")?; + let a = s.mailbox.account_mut(id)?; + let o = a.oauth.as_mut().ok_or_else(|| bad("the account signs in with a password: it has no OAuth settings"))?; + match o.provider { + OAuthProvider::Microsoft | OAuthProvider::Google => { + o.client_id.clear(); + o.redirect_port = None; + } + OAuthProvider::Custom => { + o.scopes.clear(); + o.mechanism = SaslChoice::Auto; + o.redirect_port = None; + } + } + let oauth = o.clone(); + Ok(json!({"id": id, "oauth": oauth})) +} + /// Which kind of Microsoft account a command says it is (`directory`), when it says. fn directory_of(v: &Value) -> Result, CmdError> { match v.get("directory") { @@ -147,7 +389,7 @@ fn preset(_: &mut Session, v: &Value) -> CmdResult { _ => return Err(bad(format!("\"{email}\" isn't an e-mail address"))), }; let asked = match p::str(v, "provider") { - Some(name) => Some(OAuthProvider::parse(name).ok_or_else(|| bad("`provider` is microsoft or google"))?), + Some(name) => Some(OAuthProvider::parse(name).ok_or_else(|| bad("`provider` is microsoft, google or custom"))?), None => None, }; // The owner says whose the account is: that settles it. @@ -164,6 +406,8 @@ fn preset(_: &mut Session, v: &Value) -> CmdResult { // Explicitly choosing Google OAuth beats an app-password provider preset. // Ordinary discovery without that choice keeps the password flow. (Some(OAuthProvider::Google), own) => (Some(provider::google(own.is_some_and(|p| p.service == "Gmail"))), "asked"), + // An own identity provider: the servers are found as for a domain nobody here knows. + (Some(OAuthProvider::Custom), _) => (None, "asked"), _ if named.is_some() => (named, "asked"), // Said to be Microsoft's: Outlook.com when the domain is, work or school mail otherwise. (Some(OAuthProvider::Microsoft), own) => { @@ -185,6 +429,14 @@ fn preset(_: &mut Session, v: &Value) -> CmdResult { username = found_username(p::str(records, "username").unwrap_or_default(), &email, &domain); } } + // The identity provider a domain's document names for its incoming server, offered for the + // owner to confirm (an own provider's sign-in starts only when they ask for it). + let oauth_issuer = v + .get("found") + .and_then(|records| p::str(records, "oauthIssuer")) + .map(str::trim) + .filter(|issuer| !known && issuer.starts_with("https://") && !issuer.contains(['?', '#']) && mailcraft_model::oauth::endpoint(issuer).is_ok()) + .map(|issuer| issuer.chars().take(mailcraft_model::oauth::MAX_ENDPOINT).collect::()); let preset = found.unwrap_or_else(|| provider::guess(&domain)); let via_of = |server: &Option<(Server, Via)>| server.as_ref().map(|(_, via)| via.code()).unwrap_or("guess"); let (incoming_via, outgoing_via) = (via_of(&incoming), via_of(&outgoing)); @@ -203,12 +455,13 @@ fn preset(_: &mut Session, v: &Value) -> CmdResult { "known": known, "via": via, "service": preset.service, - "auth": if preset.oauth.is_some() { "oauth2" } else { "password" }, - "provider": preset.oauth.map(OAuthProvider::code), + "auth": if preset.oauth.is_some() || asked == Some(OAuthProvider::Custom) { "oauth2" } else { "password" }, + "provider": if asked == Some(OAuthProvider::Custom) { Some(OAuthProvider::Custom.code()) } else { preset.oauth.map(OAuthProvider::code) }, "username": username, "incoming": server(incoming.as_ref().map(|(s, _)| s).unwrap_or(&preset.incoming), if known { via } else { incoming_via }), "outgoing": server(outgoing.as_ref().map(|(s, _)| s).unwrap_or(&preset.outgoing), if known { via } else { outgoing_via }), "note": preset.note, + "oauthIssuer": oauth_issuer, })) } @@ -381,6 +634,21 @@ fn apply_fields(a: &mut Account, v: &Value) -> Result<(), CmdError> { } } } + // An own identity provider is for an IMAP account's servers alone. + if a.signs_in_with_own_provider() && a.kind != AccountKind::Imap { + return Err(bad("only an account with IMAP and SMTP servers signs in with your own identity provider")); + } + // Never with Microsoft's or Google's mail servers: a token from an own provider is never sent + // there (their sign-in comes from their own providers), so such an account would never + // synchronise (#1844 review). + if a.signs_in_with_own_provider() + && let Some(host) = a.microsoft_or_google_server() + { + let host: String = host.trim().chars().take(254).collect(); + return Err(bad(format!( + "{host} is Microsoft's or Google's mail server, which never takes a sign-in with your own identity provider: change the incoming and outgoing servers to your own too" + ))); + } // Only an account with an outgoing server that signs in with a password has the choice. if a.oauth.is_some() || a.outgoing.is_none() { a.outgoing_without_sign_in = false; diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index e04b09331c..eb981aaec7 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -424,6 +424,8 @@ pub mod p { } } +#[cfg(test)] +mod account_oauth_tests; #[cfg(test)] mod agent_gate_tests; #[cfg(test)] diff --git a/crates/engine/src/sync_driver/credentials.rs b/crates/engine/src/sync_driver/credentials.rs index 3a9b977422..ecf4ede033 100644 --- a/crates/engine/src/sync_driver/credentials.rs +++ b/crates/engine/src/sync_driver/credentials.rs @@ -24,6 +24,8 @@ pub fn effective_oauth(mut oauth: OAuth, ids: &ClientIds) -> OAuth { let (chosen, built_in) = match oauth.provider { OAuthProvider::Microsoft => (ids.microsoft_chosen, ids.microsoft_built_in), OAuthProvider::Google => (ids.google_chosen, ids.google_built_in), + // (An own identity provider has no id but the one registered there.) + OAuthProvider::Custom => return oauth, }; oauth.client_id = if chosen.is_empty() { built_in } else { chosen }.to_string(); } @@ -34,6 +36,12 @@ pub fn effective_oauth(mut oauth: OAuth, ids: &ClientIds) -> OAuth { /// is not the account. A Google identity must match the account's address, not an alternate IMAP /// user name (that name is plain editable mailbox data and cannot authorise another owner). pub fn signed_in_as_other(account: &Account, tokens: &Tokens) -> bool { + // An own identity provider's names needn't be the account's: the mail server's user name is + // often neither the address nor what the provider calls the owner. What signs in to the mail + // servers is the token, which they judge themselves. + if account.signs_in_with_own_provider() { + return false; + } if account.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Google) && !tokens.email.trim().is_empty() { !tokens.email.trim().eq_ignore_ascii_case(account.email.trim()) } else { diff --git a/crates/engine/src/sync_driver/graph_mail.rs b/crates/engine/src/sync_driver/graph_mail.rs index 80daa73046..56347bc672 100644 --- a/crates/engine/src/sync_driver/graph_mail.rs +++ b/crates/engine/src/sync_driver/graph_mail.rs @@ -30,7 +30,7 @@ pub enum MailStart { /// the owner. `address` names the account. Quiet { address: String }, /// There is no sign-in to run with: the owner signs in on the provider's page. - SignIn { oauth: OAuth, address: String }, + SignIn { oauth: Box, address: String }, /// Go ahead. Run(Box), } @@ -63,7 +63,7 @@ pub fn plan_graph_mail(s: &Session, account: Id, quiet: bool, refresh: String) - let oauth = owner.oauth.clone().ok_or(Refusal::NoSignIn)?; if refresh.is_empty() { let address = owner.email.clone(); - return Ok(if quiet { MailStart::Quiet { address } } else { MailStart::SignIn { oauth, address } }); + return Ok(if quiet { MailStart::Quiet { address } } else { MailStart::SignIn { oauth: Box::new(oauth), address } }); } let mail = graph_mail_request(s, account).map_err(|e| Refusal::NotGraph(e.to_string()))?; Ok(MailStart::Run(Box::new(MailPlan { owner, oauth, refresh, mail }))) diff --git a/crates/host/src/fetch.rs b/crates/host/src/fetch.rs index b45dfc1bb8..282d4480d3 100644 --- a/crates/host/src/fetch.rs +++ b/crates/host/src/fetch.rs @@ -41,7 +41,7 @@ pub enum Access { /// None is: one is had from the account's refresh token, as a Graph mail run has it. Renew { /// The account's sign-in settings, with the application id filled in. - oauth: mailcraft_model::OAuth, + oauth: Box, refresh: String, }, } diff --git a/crates/host/src/fetch_tests.rs b/crates/host/src/fetch_tests.rs index 8146d426d1..868ae2f4b8 100644 --- a/crates/host/src/fetch_tests.rs +++ b/crates/host/src/fetch_tests.rs @@ -112,7 +112,8 @@ fn a_renewal_hands_back_its_tokens_and_says_why_none_came() { covers_favorites: false, }) }; - let (answer, renewal) = with_access_renewing(Access::Renew { oauth: oauth.clone(), refresh: "r1".into() }, &renew_ok, |t| t.to_string()); + let (answer, renewal) = + with_access_renewing(Access::Renew { oauth: Box::new(oauth.clone()), refresh: "r1".into() }, &renew_ok, |t| t.to_string()); assert_eq!(answer.as_deref(), Some("a2")); assert_eq!(renewal.tokens.as_ref().map(|t| t.refresh.as_str()), Some("r2")); // Nothing of a token in the `Debug` output. @@ -120,11 +121,11 @@ fn a_renewal_hands_back_its_tokens_and_says_why_none_came() { assert!(!shown.contains("a2") && !shown.contains("r2") && !shown.contains("secret-token"), "{shown}"); let consent = |_: &OAuth, _: &str| -> Result { Err(NetError::ConsentNeeded("no".into())) }; - let (answer, renewal) = with_access_renewing(Access::Renew { oauth: oauth.clone(), refresh: "r1".into() }, &consent, |_| ()); + let (answer, renewal) = with_access_renewing(Access::Renew { oauth: Box::new(oauth.clone()), refresh: "r1".into() }, &consent, |_| ()); assert!(answer.is_none() && renewal.consent_needed && renewal.tokens.is_none()); let failing = |_: &OAuth, _: &str| -> Result { Err(NetError::Config("nope".into())) }; - let (answer, renewal) = with_access_renewing(Access::Renew { oauth, refresh: "r1".into() }, &failing, |_| ()); + let (answer, renewal) = with_access_renewing(Access::Renew { oauth: Box::new(oauth), refresh: "r1".into() }, &failing, |_| ()); assert!(answer.is_none() && renewal.error.is_some() && !renewal.sign_in_refused); // A token held is used without asking anybody. diff --git a/crates/host/src/secrets.rs b/crates/host/src/secrets.rs index 084d0b3616..cbc77684b0 100644 --- a/crates/host/src/secrets.rs +++ b/crates/host/src/secrets.rs @@ -112,6 +112,11 @@ pub fn dav_secret_keys(a: &mailcraft_model::Account) -> Vec { a.dav.as_ref().into_iter().flat_map(|dav| dav.origins()).filter_map(|origin| dav_secret_key(a, &origin)).collect() } +/// What the client secret of an account that signs in with an own identity provider is kept +/// under in the credential store (`kind`). Only such an account has one; it is never written +/// anywhere else ([`mailcraft_model::OAuth::has_secret`] says whether there is one). +pub const OAUTH_CLIENT: &str = "oauth-client"; + /// The name secrets were kept under before they were bound to servers. pub fn legacy_secret_key(kind: &str, address: &str) -> String { format!("{kind}:{}", address.trim().to_ascii_lowercase()) @@ -145,6 +150,13 @@ pub fn secret_key(kind: &str, a: &mailcraft_model::Account) -> String { None => format!("{kind}:{address}|ews={url}|user={user}"), } } else { - format!("{kind}:{address}|imap={}|smtp={}", server(&a.incoming), server(&a.outgoing)) + let base = format!("{kind}:{address}|imap={}|smtp={}", server(&a.incoming), server(&a.outgoing)); + // (An own identity provider's sign-in is also bound to the provider, its token address + // and the client: a changed setting, whoever made it, finds nothing remembered and needs + // a fresh sign-in on the provider's page, so that no remembered token goes anywhere new.) + match a.oauth.as_ref().filter(|o| o.provider == mailcraft_model::OAuthProvider::Custom) { + Some(oauth) => format!("{base}|oauth={}", oauth.binding()), + None => base, + } } } diff --git a/crates/host/src/secrets_tests.rs b/crates/host/src/secrets_tests.rs index 8f686f81f1..9de54b71f4 100644 --- a/crates/host/src/secrets_tests.rs +++ b/crates/host/src/secrets_tests.rs @@ -92,3 +92,41 @@ fn a_dav_user_name_keeps_its_case_in_the_key_and_the_host_and_origin_do_not() { assert_eq!(dav_secret_key(&g, "https://outlook.office365.com/"), None); assert!(crate::dav_secret_keys(&g).iter().all(|k| !k.contains("googleapis"))); } + +#[test] +fn an_own_identity_providers_sign_in_is_bound_to_the_provider_and_the_client() { + use mailcraft_model::{OAuth, OAuthProvider}; + let server = |host: &str| Some(Server { host: host.to_string(), port: 993, ..Default::default() }); + let oauth = OAuth { + provider: OAuthProvider::Custom, + client_id: "mailcraft".into(), + issuer: "https://id.example.org/realms/mail".into(), + authorize: "https://id.example.org/auth".into(), + token: "https://id.example.org/token".into(), + ..OAuth::default() + }; + let account = Account { + kind: AccountKind::Imap, + email: "alice@example.org".into(), + incoming: server("mail.example.org"), + outgoing: server("mail.example.org"), + oauth: Some(oauth.clone()), + ..Default::default() + }; + let key = secret_key("refresh", &account); + assert!(key.contains("imap=mail.example.org:993") && key.contains("oauth=custom|34:https://id.example.org/realms/mail|"), "{key}"); + // A change of anything the sign-in belongs to is another name: nothing remembered is found. + for changed in [ + OAuth { issuer: "https://id.attacker.example".into(), ..oauth.clone() }, + OAuth { token: "https://id.attacker.example/token".into(), ..oauth.clone() }, + OAuth { client_id: "other".into(), ..oauth.clone() }, + ] { + assert_ne!(secret_key("refresh", &Account { oauth: Some(changed), ..account.clone() }), key); + } + assert_ne!(secret_key("refresh", &Account { incoming: server("imap.attacker.example"), ..account.clone() }), key); + // Nor are the refresh token and the client secret ever one name. + assert_ne!(secret_key(crate::secrets::OAUTH_CLIENT, &account), key); + // A Google account is named as ever. + let google = Account { oauth: Some(OAuth { provider: OAuthProvider::Google, ..OAuth::default() }), ..account.clone() }; + assert!(!secret_key("refresh", &google).contains("oauth=")); +} diff --git a/crates/host/src/sync.rs b/crates/host/src/sync.rs index 45dea2d223..8253fe6e22 100644 --- a/crates/host/src/sync.rs +++ b/crates/host/src/sync.rs @@ -479,7 +479,7 @@ impl SendReceive { } let oauth = a.oauth.clone()?; let refresh = self.refresh_for(session, ctx, account)?; - Some(crate::fetch::Access::Renew { oauth: mailcraft_engine::sync_driver::effective_oauth(oauth, &ctx.ids), refresh }) + Some(crate::fetch::Access::Renew { oauth: Box::new(mailcraft_engine::sync_driver::effective_oauth(oauth, &ctx.ids)), refresh }) } fn start(&mut self, host: &Host, session: &mut Session, ctx: &Context, account: Id, quiet: bool) -> Step { @@ -509,7 +509,7 @@ impl SendReceive { } Ok(MailStart::SignIn { oauth, address }) => { session.sync_progress.leave_out(account); - return Step::SignIn { account, oauth: Box::new(mailcraft_engine::sync_driver::effective_oauth(oauth, &ctx.ids)), address }; + return Step::SignIn { account, oauth: Box::new(mailcraft_engine::sync_driver::effective_oauth(*oauth, &ctx.ids)), address }; } Err(MailRefusal::AccountGone) => { session.sync_progress.leave_out(account); diff --git a/crates/i18n/po/cs.po b/crates/i18n/po/cs.po index 2e5e8af15c..e5daef5913 100644 --- a/crates/i18n/po/cs.po +++ b/crates/i18n/po/cs.po @@ -812,6 +812,12 @@ msgstr "Sdílená poštovní schránka, čtená s přihlášením účtu {accoun msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Krátká poznámka s odkazem na tu stránku, kterou vložíte do pošty nebo chatu. MailCraft sám nic neodesílá." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Přihlášení u vlastního poskytovatele identity se nikdy neposílá na poštovní servery Microsoftu ani Googlu: změňte servery výše na vlastní." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1364,6 +1370,12 @@ msgstr "Když v poště přijmete, předběžně přijmete nebo odmítnete žád msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Odsouhlaste adresy mimo doménu vašeho zprostředkovatele identity, nebo zadejte jiné" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1813,7 +1825,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Vše, co ještě čeká na odeslání na server, jde první: pošta ve složce Pošta k odeslání a příznaky a přesuny provedené offline. Pokud se MailCraft k serveru nedostane, přepnutí počká, dokud to nepůjde." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "ID aplikace (klienta)" @@ -2200,6 +2212,12 @@ msgstr "Požádat o oznámení, až bude zpráva přečtena" msgid "Asked first" msgstr "Nejdřív se zeptat" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Požadované kromě openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2412,11 +2430,17 @@ msgid "AutoArchive" msgstr "Automatická archivace" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automaticky" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automaticky (OAUTHBEARER, jinak XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3665,6 +3689,24 @@ msgstr "Zrušit příznak" msgid "Click to select {name}; double-click to open it" msgstr "Kliknutím vyberete {name}; dvojitým kliknutím jej otevřete" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "ID klienta" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Tajný klíč klienta (nepovinné)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Odeslání tajného klíče klienta" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4929,6 +4971,12 @@ msgstr "Směrovat odpovědi na" msgid "Discard" msgstr "Zahodit" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Zjistit" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5912,6 +5960,12 @@ msgstr "Exportovat…" msgid "External" msgstr "Externí" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Další obory" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6072,12 +6126,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Najít další pravopisnou chybu" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Zjistí adresy pro přihlášení a tokeny z adresy zprostředkovatele identity. Odešle se jen tato adresa." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Najít" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Zjistěte adresy svého zprostředkovatele identity tlačítkem Zjistit, nebo je zadejte" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "Hledání adres se neočekávaně zastavilo" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6402,6 +6474,12 @@ msgstr "Zapomenout stažený kalendář a kontakty" msgid "Forget Trusted Certificate" msgstr "Zapomenout důvěryhodný certifikát" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Zapomenout tajný klíč klienta" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6514,6 +6592,12 @@ msgstr[0] "Nalezena {n} složka" msgstr[1] "Nalezeny {n} složky" msgstr[2] "Nalezeno {n} složek" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Nalezeno: přihlášení na {signIn}, tokeny z {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6869,6 +6953,12 @@ msgstr "Zlatá" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (integrované)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7288,6 +7378,12 @@ msgstr "Jak se opakuje, určuje organizátor." msgid "How many messages each folder holds and the space they take" msgstr "Kolik zpráv obsahuje každá složka a kolik místa zabírají" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Těmto adresám důvěřuji" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7306,6 +7402,18 @@ msgstr "Jsem správce: schválit ho pro mou organizaci" msgid "Icons" msgstr "Ikony" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Zprostředkovatel identity" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Zprostředkovatel identity (vydavatel)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7366,6 +7474,12 @@ msgstr "Pokud ne, nic se tam neodešle a hledání pokračuje jinde, nebo skonč msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Pokud ne, nic se neodešle a servery můžete změnit v Nastavení serveru." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Pokud budete pokračovat, přihlásíte se na stránce svého zprostředkovatele identity a přístupový token, který vydá, se odešle na {hosts}. Pokračujte, jen pokud víte, že patří vašemu zprostředkovateli." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7663,6 +7777,12 @@ msgstr "Ve zprávě ve formátu prostého textu" msgid "In line with text" msgstr "Na řádku s textem" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "V hlavičce Authorization (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7681,6 +7801,12 @@ msgstr "Ve složce Pošta k odeslání: čeká na svůj čas" msgid "In the folder pane's order" msgstr "V pořadí podokna složek" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "Ve formuláři (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7939,6 +8065,12 @@ msgstr "Na server se dostane, jakmile MailCraft smí měnit pravidla na serveru msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Odejde při dalším Odeslat/přijmout; konference vás pak ze seznamu odebere." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Nevydává žádné obnovovací tokeny: pokaždé, když přihlášení vyprší, budete vyzváni k novému přihlášení." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8290,6 +8422,12 @@ msgstr "Uchovávat poštu za poslední" msgid "Keep on the server of {address}" msgstr "Uchovávat na serveru účtu {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Zachovat integrované nastavení" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8374,6 +8512,12 @@ msgstr "Uchováváno v úložišti přihlašovacích údajů systému, nikdy v p msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Uchováváno v úložišti tohoto prohlížeče, ukládá se průběžně. Chcete-li kopii jako soubor, použijte Otevřít a exportovat." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Uchováno v úložišti přihlašovacích údajů vašeho systému, nikdy v poštovní schránce. Desktopový program ho před vámi nedokáže skutečně utajit." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8410,6 +8554,12 @@ msgstr "Uchováváno jen v tomto počítači" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Uchováváno jen v tomto počítači: pozvánky a opakované události se zatím na server neodesílají" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Uchováno: zadejte nový, chcete-li ho nahradit" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9469,6 +9619,12 @@ msgstr "Rozlišovat velká a malá písmena" msgid "May" msgstr "května" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mechanismus" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9672,6 +9828,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "Pošta Microsoft 365 se přidává jako účet Microsoft: přihlásíte se na vlastní stránce Microsoftu v prohlížeči a MailCraft vaše heslo nikdy neuvidí." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 nebo Outlook.com (integrované)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10805,6 +10967,12 @@ msgstr "Zatím žádný účet: Soubor › Přidat účet" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Server žádného účtu zde zatím neuchovává kalendář, takže je není kam přesunout." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Nebyly nalezeny žádné adresy: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11654,6 +11822,18 @@ msgstr "Číslovaný seznam" msgid "Numbering" msgstr "Číslování" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Integrované nastavení OAuth" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "Nastavení OAuth" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11906,6 +12086,12 @@ msgstr "Jen tentokrát, a odeslat" msgid "Only if nobody replies" msgstr "Jen pokud nikdo neodpoví" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Jen pokud vám ho zprostředkovatel poskytl" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13457,6 +13643,12 @@ msgstr "Opakování" msgid "Red category" msgstr "Červená kategorie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Port přesměrování" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13487,6 +13679,12 @@ msgstr "Aktualizovat" msgid "Refresh Your Certificates and Keys" msgstr "Aktualizovat vaše certifikáty a klíče" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Zaregistrujte jako adresu přesměrování http://127.0.0.1 s libovolným portem (nebo s tím uvedeným výše)." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13879,6 +14077,12 @@ msgstr "Přejmenování kategorie na serveru: {done} z {total} zpráv" msgid "Renewing the sign-in…" msgstr "Obnovuji přihlášení…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Obnovuje se přihlášení… Pokud ho nejde obnovit, přihlaste se na stránce, která se otevře v prohlížeči." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14095,6 +14299,12 @@ msgstr "Restartovat a aktualizovat" msgid "Restart to update is the owner's click." msgstr "Restartovat a aktualizovat musí kliknout vlastník." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Obnovit výchozí nastavení OAuth" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14159,6 +14369,12 @@ msgstr "Revize" msgid "Review certificate…" msgstr "Zkontrolovat certifikát…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Adresa pro odvolání (nepovinné)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14700,6 +14916,12 @@ msgstr "Souhlaste, jen pokud jste o to agenta požádali. Text ve zprávě můž msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Říká, co můžete udělat vy a správce vaší organizace, a umožňuje správci odsud schválit MailCraft na stránce Microsoftu." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Obory" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15207,7 +15429,7 @@ msgid "Send your password to another server?" msgstr "Odeslat heslo na jiný server?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Odeslat přihlášení na jiný server?" @@ -16184,6 +16406,18 @@ msgstr "Nejprve se přihlaste pomocí Odeslat/přijmout, pak změňte automatick msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Chcete-li vidět, kdy jsou ostatní zaneprázdněni, přihlaste se pomocí Odeslat/přijmout." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Přihlásit se místo toho u svého zprostředkovatele identity (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Adresa pro přihlášení" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17085,7 +17319,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Řekněte tvůrcům MailCraftu, co nefungovalo, na GitHubu nebo e-mailem. Hlášení zkontrolujete a odešlete sami." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Tenant" @@ -17808,6 +18042,24 @@ msgstr "Certifikát, který ukazuje server {host}, není ten, kterému jste pro msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Certifikát nevydala certifikační autorita, které tento počítač důvěřuje." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Tajný klíč klienta smí obsahovat jen písmena, číslice a interpunkci" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Tajný klíč klienta pro {account} není v tomto počítači uložen: zadejte ho znovu v Nastavení účtu (Soubor › Informace)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Tajný klíč klienta je uložen pro původní nastavení: chcete-li ho použít s tímto, zadejte ho znovu, jinak bude při uložení zapomenut." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18370,11 +18622,17 @@ msgid "The notes are too long to edit here." msgstr "Poznámky jsou příliš dlouhé na úpravu zde." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Ten v Soubor › Možnosti" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Ten, který je zaregistrovaný pro MailCraft" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18483,6 +18741,12 @@ msgstr "Rozsah potřebuje den, kterým končí" msgid "The range needs a day to start on" msgstr "Rozsah potřebuje den, kterým začíná" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "Port přesměrování je číslo od 1 do 65535, nebo prázdné pro libovolný volný port" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18957,6 +19221,12 @@ msgstr "Přihlášení neprošlo." msgid "The sign-in didn't work. Try again." msgstr "Přihlášení nefungovalo. Zkuste to znovu." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "Přihlášení se odesílá jen na: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19238,6 +19508,12 @@ msgstr "Na adrese {address} není žádná poštovní schránka." msgid "Thesaurus" msgstr "Synonyma" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Tyto adresy jsou mimo doménu vašeho zprostředkovatele identity: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19268,6 +19544,12 @@ msgstr "Tyto kontakty zde nelze sloučit: méně než dva z nich lze změnit." msgid "These could not be removed. Remove them yourself:" msgstr "Tyto nešlo odstranit. Odstraňte je sami:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Toto nastavení už nebude patřit {provider}: MailCraft bude s tímto účtem zacházet jako s účtem s vlastním zprostředkovatelem identity, počínaje hodnotami výše, a znovu se přihlásíte." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20511,6 +20793,12 @@ msgstr "" "\n" "Dokud to nepovolíte, nic z těchto schránek a kalendářů se nečte, pošta a odpovědi na schůzky ze sdílené schránky čekají v tomto počítači a nic se místo nich neodešle z vaší vlastní adresy." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Chcete-li se přihlašovat u vlastního poskytovatele identity, nejprve změňte server příchozí a odchozí pošty na vlastní: přihlášení od něj se nikdy neposílá na servery {provider}." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20553,6 +20841,12 @@ msgstr "Dnes" msgid "Today could not be read." msgstr "Dnešek se nepodařilo přečíst." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Adresa tokenů" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -21048,6 +21342,12 @@ msgstr "Použijte RRRR-MM-DD" msgid "Use a Google app password, not your everyday Google account password." msgstr "Použijte heslo aplikace Google, ne každodenní heslo k účtu Google." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Použít místo toho heslo" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -21066,6 +21366,18 @@ msgstr "Místo toho použít heslo aplikace" msgid "Use https:// instead" msgstr "Místo toho použijte https://" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Použít" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Použít vlastního zprostředkovatele identity" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21084,6 +21396,12 @@ msgstr "Podle nastavení systému" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "Podle nastavení systému se řídí efekty animací v nastavení Windows. Kde MailCraft zatím nastavení systému přečíst neumí, animace se přehrávají, dokud nezvolíte Nikdy nepřehrávat." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Použít místo toho vlastního zprostředkovatele identity…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21228,6 +21546,12 @@ msgstr "Počkat před odesláním" msgid "Wait for the other attachment preview to finish." msgstr "Počkejte, až skončí náhled jiné přílohy." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Počkejte na adresy svého zprostředkovatele identity" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21246,6 +21570,12 @@ msgstr "Čeká se na registraci MailCraftu u Googlu" msgid "Waiting for the approval stopped unexpectedly" msgstr "Čekání na schválení se nečekaně zastavilo" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Čeká se na úložiště přihlašovacích údajů systému…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21909,6 +22239,12 @@ msgstr "Vaše certifikáty a klíče" msgid "Your data was removed" msgstr "Vaše data byla odstraněna" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Vaše doména pro přihlášení uvádí {issuer}." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22125,6 +22461,12 @@ msgstr "Pravidla vaší organizace to pro váš účet nedovolují. Jde o zásad msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "Vaše vlastní certifikáty a klíče používá desktopový program MailCraftu: zde se digitální podpisy ověřují a nic se nepodepisuje ani nedešifruje." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Váš vlastní zprostředkovatel identity" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22509,6 +22851,36 @@ msgstr "adresu sdílené poštovní schránky nelze změnit: odeberte ji a přid msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "sdílená poštovní schránka má vlastní pravidla: tato verze je nevytváří" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "přihlášení u vašeho zprostředkovatele identity se nikdy neodesílá na poštovní servery Microsoftu ani Googlu" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "přihlášení u vašeho zprostředkovatele identity se odesílá na poštovní server v tomto počítači jen při testu" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "přihlášení u vašeho zprostředkovatele identity se používá jen s vlastními poštovními servery tohoto účtu" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "přihlášení u vašeho vlastního zprostředkovatele identity je jen pro poštu, ne pro Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "přihlášení u {provider} se vrací jen přes port zpětné smyčky" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22533,6 +22905,12 @@ msgstr "obrázky podpisu jsou PNG, JPEG nebo GIF (mnoho poštovních programů j msgid "a task needs a title" msgstr "úkol potřebuje název" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "přístup byl na přihlašovací stránce odmítnut" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs msgid "add an Exchange server account first: its organisation's address list is searched" @@ -22776,6 +23154,12 @@ msgstr "zkopírovat do {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "nepodařilo se navázat zabezpečené připojení k {host}: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "na tomto počítači nelze otevřít port, na který by se přihlášení vrátilo" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22812,6 +23196,18 @@ msgstr "k přihlášení zadejte heslo" msgid "enter a user name to sign in" msgstr "k přihlášení zadejte uživatelské jméno" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "zadejte ID klienta zaregistrované pro MailCraft u vašeho zprostředkovatele identity" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "zadejte adresu svého zprostředkovatele identity (jeho vydavatele)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22824,6 +23220,12 @@ msgstr "všichni na @{domain}" msgid "expected and replacement must be on one line" msgstr "hledaný i náhradní text musí být na jednom řádku" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "zjistěte adresy pro přihlášení u svého zprostředkovatele identity (Zjistit), nebo je zadejte" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23868,6 +24270,12 @@ msgstr "osobní" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "obrázky z webu se nestahují: obrázek uložte a přidejte ho ze souboru" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "port {port} na tomto počítači je obsazený: zvolte jiný port přesměrování, nebo automaticky" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23922,6 +24330,12 @@ msgstr "adresa příjemce obsahuje {words}" msgid "replies can go to at most {n} addresses" msgstr "odpovědi mohou jít nejvýše na {n} adres" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "odvolání" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -24064,6 +24478,12 @@ msgstr "nejprve se přihlaste k účtu" msgid "sign in to {who} first" msgstr "nejprve se přihlaste k {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "přihlášení" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24195,6 +24615,12 @@ msgstr "ta zpráva tu není" msgid "that message isn't waiting in the Outbox" msgstr "ta zpráva nečeká ve složce Pošta k odeslání" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "tento port přesměrování nelze použít: zvolte jiný, nebo automaticky" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24393,6 +24819,18 @@ msgstr "změněný výskyt už neexistuje" msgid "the check stopped unexpectedly" msgstr "kontrola se nečekaně zastavila" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "ID klienta smí obsahovat jen písmena, číslice a interpunkci, nejvýše 200 znaků" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "tajný klíč klienta smí obsahovat jen písmena, číslice a interpunkci" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24555,6 +24993,90 @@ msgstr "složka, ve které tato zpráva je, už v tomto počítači není" msgid "the folder was numbered anew while it was being read" msgstr "složka byla během čtení přečíslována" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "adresa zprostředkovatele identity (vydavatele) nesmí obsahovat dotaz ani fragment" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "zprostředkovatel identity se na obvyklých adresách nepopisuje: zadejte jeho přihlašovací adresy" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "zprostředkovatel identity přeposlal svůj popis přes příliš mnoho přesměrování" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "zprostředkovatel identity přeposlal svůj popis na adresu na tomto počítači, v soukromé síti nebo bez https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "adresa zprostředkovatele identity nesmí obsahovat dotaz ani fragment" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "adresa zprostředkovatele identity {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "popis zprostředkovatele identity nelze načíst: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "popis zprostředkovatele identity uvádí adresu pro {what}, která {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "popis zprostředkovatele identity neuvádí žádnou adresu pro {what}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "popis zprostředkovatele identity je příliš dlouhý" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "popis zprostředkovatele identity není očekávaný JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "popis zprostředkovatele identity uvádí jiného vydavatele než zadaná adresa: zkontrolujte adresu znak po znaku" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "podle popisu zprostředkovatel identity nikoho na své stránce nepřihlašuje (autorizační kód)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "podle popisu zprostředkovatel identity nepodporuje chráněné přihlášení (PKCE s S256), které MailCraft používá" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24573,6 +25095,12 @@ msgstr "import nemá složku, do které by dal poštu" msgid "the import was stopped" msgstr "import byl zastaven" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "příchozí a odchozí servery uvedené výše" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24597,6 +25125,12 @@ msgstr "poslední kalendář nelze odstranit" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "seznam zobrazuje složky všech účtů: otevřete složku jednoho účtu, nebo složku pojmenujte" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "název poštovního serveru nelze odeslat s přihlášením" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24735,6 +25269,12 @@ msgstr "platforma odmítla nebo selhala" msgid "the proposed end is not after the proposed start" msgstr "navržený konec není po navrženém začátku" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "port přesměrování musí být mezi 1 a 65535, nebo automatický" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24759,6 +25299,12 @@ msgstr "výsledek by vedl k tomu, že tento účet uchovává víc stavu synchro msgid "the result {why}" msgstr "výsledek {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "adresa pro odvolání {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24975,6 +25521,18 @@ msgstr "server nenabízí STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "server na tomto připojení nepřijímá heslo" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "server nepřijímá token přes OAUTHBEARER, který vyžaduje nastavení OAuth tohoto účtu" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "server nepřijímá token přes XOAUTH2, který vyžaduje nastavení OAuth tohoto účtu" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -25023,6 +25581,12 @@ msgstr "server nenabízí žádný způsob přihlášení heslem" msgid "the server offers no way to sign in with an access token" msgstr "server nenabízí žádný způsob přihlášení přístupovým tokenem" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "server nenabízí žádný způsob přihlášení přístupovým tokenem (ani OAUTHBEARER, ani XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25161,6 +25725,18 @@ msgstr "odpověď serveru je vnořena příliš hluboko" msgid "the server's response is too long" msgstr "odpověď serveru je příliš dlouhá" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "přihlášení se vrátilo od jiného zprostředkovatele identity, než který byl požádán: nic z něj nebylo použito" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "přihlášení se vrátilo bez jména vašeho zprostředkovatele identity, které podle svých slov vždy uvádí: nic z něj nebylo použito" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25221,13 +25797,13 @@ msgid "the top level" msgstr "nejvyšší úroveň" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "uživatelské jméno nebo přístupový token obsahuje znak, který nelze odeslat" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "uživatelské jméno nebo přístupový token je příliš dlouhý na odeslání" @@ -25305,7 +25881,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "podpis s názvem „{to}“ už existuje" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "není žádný přístupový token, kterým se přihlásit" @@ -25322,6 +25898,12 @@ msgstr "není žádný účet" msgid "there is no account to remove" msgstr "není žádný účet k odebrání" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "není žádné dřívější přihlášení k obnovení" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25394,6 +25976,12 @@ msgstr "toto Odeslat/přijmout bylo pro jiný účet, ne pro {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "toto Odeslat/přijmout bylo pro server, který {name} uváděl dříve" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "tento účet se nepřihlašuje u vašeho vlastního zprostředkovatele identity" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25622,6 +26210,12 @@ msgstr "pro {people}" msgid "to {recipient}" msgstr "pro {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "token" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25652,6 +26246,12 @@ msgstr "zadejte adresu, například nekdo@example.org, nebo doménu, například msgid "unexpected server response: {reason}" msgstr "neočekávaná odpověď serveru: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "jako tenanta použijte common, consumers, organizations nebo ID či doménu adresáře" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25812,6 +26412,54 @@ msgstr "přihlásili jste se jako někdo jiný" msgid "you@example.org" msgstr "vy@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "váš zprostředkovatel identity" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "váš zprostředkovatel identity odpověděl stavem {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "váš zprostředkovatel identity teď nemůže nikoho přihlásit: zkuste to později" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "váš zprostředkovatel identity nezná toto ID klienta nebo jeho tajný klíč: zkontrolujte nastavení OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "váš zprostředkovatel identity už toto přihlášení nepřijímá: přihlaste se znovu" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "váš zprostředkovatel identity přihlášení odmítl" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "váš zprostředkovatel identity nedá, co bylo požadováno: zkontrolujte další obory v nastavení OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "adresy vašeho zprostředkovatele identity musí začínat https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -26007,6 +26655,12 @@ msgstr "{days} (celý den)" msgid "{day} at {time}" msgstr "{day} v {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} uvádí, že se její pošta přihlašuje přes zprostředkovatele identity (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/de.po b/crates/i18n/po/de.po index 481966404a..4923282176 100644 --- a/crates/i18n/po/de.po +++ b/crates/i18n/po/de.po @@ -759,6 +759,12 @@ msgstr "Ein freigegebenes Postfach, das mit der Anmeldung von {account} gelesen msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Eine kurze Notiz mit dem Link zu dieser Seite zum Einfügen in E-Mail oder Chat. MailCraft sendet selbst nichts." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Eine Anmeldung bei Ihrem eigenen Identitätsanbieter wird nie an die Mailserver von Microsoft oder Google gesendet: Ändern Sie die Server oben in Ihre eigenen." + #. interface #: crates/ui-egui/src/dialogs.rs msgid "A web address, an email address, a phone number (tel:) or another address such as ms-settings:network-vpn. With nothing selected, the address is put in as it is." @@ -1301,6 +1307,12 @@ msgstr "Wenn Sie eine Besprechungsanfrage in der E-Mail zusagen, mit Vorbehalt z msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Stimmen Sie den Adressen außerhalb der Domäne Ihres Identitätsanbieters zu, oder geben Sie andere ein" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1731,7 +1743,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Alles, was noch an den Server gehen soll, geht zuerst: E-Mails im Postausgang sowie Kennzeichnungen und Verschiebungen, die Sie offline vorgenommen haben. Erreicht MailCraft den Server nicht, wartet der Wechsel, bis es so weit ist." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "Anwendungs-ID (Client-ID)" @@ -2105,6 +2117,12 @@ msgstr "Bitten Sie darum, benachrichtigt zu werden, sobald die Nachricht gelesen msgid "Asked first" msgstr "Zuerst gefragt" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Angefordert zusätzlich zu openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2306,11 +2324,17 @@ msgid "AutoArchive" msgstr "AutoArchivierung" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automatisch" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automatisch (OAUTHBEARER, sonst XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3484,6 +3508,24 @@ msgstr "Kennzeichnung löschen" msgid "Click to select {name}; double-click to open it" msgstr "Klicken, um {name} auszuwählen; doppelklicken, um die Datei zu öffnen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "Client-ID" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Geheimer Clientschlüssel (optional)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Übermittlung des geheimen Clientschlüssels" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4675,6 +4717,12 @@ msgstr "Direkte Antworten an" msgid "Discard" msgstr "Verwerfen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Ermitteln" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5583,6 +5631,12 @@ msgstr "Exportieren…" msgid "External" msgstr "Extern" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Zusätzliche Bereiche" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -5729,11 +5783,29 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Nächsten Rechtschreibfehler suchen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Ermittelt die Anmelde- und Tokenadresse aus der Adresse des Identitätsanbieters. Nur diese Adresse wird gesendet." + #. interface #: crates/ui-egui/src/find_replace.rs msgid "Find what" msgstr "Suchen nach" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Ermitteln Sie die Adressen Ihres Identitätsanbieters mit „Ermitteln“, oder geben Sie sie ein" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "Die Suche nach den Adressen wurde unerwartet beendet" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "Finding your account settings…" @@ -6042,6 +6114,12 @@ msgstr "Heruntergeladene Kalender und Kontakte vergessen" msgid "Forget Trusted Certificate" msgstr "Vertrauenswürdiges Zertifikat vergessen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Geheimen Clientschlüssel vergessen" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6147,6 +6225,12 @@ msgid_plural "Found {n} folders" msgstr[0] "{n} Ordner gefunden" msgstr[1] "{n} Ordner gefunden" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Gefunden: Anmeldung unter {signIn}, Token von {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6472,6 +6556,12 @@ msgstr "Gold" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (integriert)" + #. command label #: crates/ui-egui/src/lib.rs msgid "Google Desktop Application ID" @@ -6859,6 +6949,12 @@ msgstr "Wie sich die Serie wiederholt, legt der Organisator fest." msgid "How many messages each folder holds and the space they take" msgstr "Wie viele Nachrichten jeder Ordner enthält und wie viel Speicherplatz sie belegen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Ich vertraue diesen Adressen" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -6876,6 +6972,18 @@ msgstr "Ich bin Administrator: für meine Organisation genehmigen" msgid "Icons" msgstr "Piktogramme" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Identitätsanbieter" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Identitätsanbieter (Aussteller)" + #. interface #: crates/ui-egui/src/account_setup/help.rs msgid "If Google says the app is in testing, ask the developer to add your email as a test user. If your organization blocks MailCraft, ask its Workspace administrator. Those pages may not return here: cancel, then retry when access is granted or use an app password if allowed." @@ -6931,6 +7039,12 @@ msgstr "Wenn Sie das nicht tun, werden keine Daten dorthin gesendet und die Such msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Wenn Sie das nicht tun, wird nichts gesendet, und Sie können die Server in den Servereinstellungen ändern." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Wenn Sie fortfahren, melden Sie sich auf der Seite Ihres Identitätsanbieters an, und das ausgegebene Zugriffstoken wird an {hosts} gesendet. Fahren Sie nur fort, wenn Sie wissen, dass diese zu Ihrem Anbieter gehören." + #. interface #: crates/ui-egui/src/account_setup.rs msgid "If you go on, your user name and password are sent to {hosts}. Go on only if you know it is your provider's." @@ -7183,6 +7297,12 @@ msgstr "In einer Nur-Text-Nachricht" msgid "In line with text" msgstr "Mit Text in Zeile" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "Im Authorization-Header (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7201,6 +7321,12 @@ msgstr "Im Postausgang: sie wartet auf ihre Zeit" msgid "In the folder pane's order" msgstr "In der Reihenfolge des Ordnerbereichs" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "Im Formular (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs msgid "In the message" @@ -7440,6 +7566,12 @@ msgstr "Sie geht an den Server, sobald MailCraft die Regeln des Servers ändern msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Sie geht mit dem nächsten Senden/Empfangen hinaus; die Liste trägt Sie dann aus." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Er gibt keine Aktualisierungstoken aus: Sie werden jedes Mal erneut zur Anmeldung aufgefordert, wenn eine Anmeldung abläuft." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7776,6 +7908,12 @@ msgstr "E-Mails der letzten" msgid "Keep on the server of {address}" msgstr "Auf dem Server von {address} speichern" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Integrierte Einstellungen beibehalten" + #. interface #: crates/ui-egui/src/import_pst.rs msgid "Keep the notes and journal entries" @@ -7855,6 +7993,12 @@ msgstr "Wird im Anmeldeinformationsspeicher des Systems aufbewahrt, nie im Postf msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Im Speicher dieses Browsers abgelegt und laufend gespeichert. Verwenden Sie „Öffnen & Exportieren“, um eine Kopie als Datei zu speichern." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Wird in der Anmeldeinformationsverwaltung Ihres Systems gespeichert, nie im Postfach. Ein Desktopprogramm kann ihn nicht wirklich vor Ihnen geheim halten." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -7891,6 +8035,12 @@ msgstr "Nur auf diesem Computer gespeichert" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Nur auf diesem Computer gespeichert: Einladungen und Serienereignisse werden noch nicht an den Server gesendet" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Gespeichert: Geben Sie einen neuen ein, um ihn zu ersetzen" + #. interface #: crates/ui-egui/src/reading/signature.rs msgid "Key made:" @@ -8884,6 +9034,12 @@ msgstr "Groß-/Kleinschreibung beachten" msgid "May" msgstr "Mai" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mechanismus" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9073,6 +9229,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "Microsoft 365-E-Mail wird als Microsoft-Konto hinzugefügt: Sie melden sich auf der offiziellen Microsoft-Seite in Ihrem Browser an, und MailCraft bekommt Ihr Passwort niemals zu sehen." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 oder Outlook.com (integriert)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10148,6 +10310,12 @@ msgstr "Noch kein Konto: Datei › Konto hinzufügen" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Noch kein Server eines Kontos führt hier einen Kalender, daher gibt es kein Ziel zum Verschieben." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Keine Adressen gefunden: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -10949,6 +11117,18 @@ msgstr "Nummerierte Liste" msgid "Numbering" msgstr "Nummerierung" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Integrierte OAuth-Einstellungen" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "OAuth-Einstellungen" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11184,6 +11364,12 @@ msgstr "Nur diesmal und senden" msgid "Only if nobody replies" msgstr "Nur wenn niemand antwortet" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Nur wenn Ihr Anbieter einen ausgegeben hat" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "Only keep your custom-domain address if both addresses are aliases of the same Microsoft mailbox." @@ -12623,6 +12809,12 @@ msgstr "Serie" msgid "Red category" msgstr "Rote Kategorie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Umleitungsport" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -12651,6 +12843,12 @@ msgstr "Aktualisieren" msgid "Refresh Your Certificates and Keys" msgstr "Ihre Zertifikate und Schlüssel aktualisieren" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Registrieren Sie http://127.0.0.1 mit beliebigem Port (oder dem obigen) als Umleitungsadresse." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13028,6 +13226,12 @@ msgstr "Kategorie wird auf dem Server umbenannt: {done} von {total} Nachrichten" msgid "Renewing the sign-in…" msgstr "Anmeldung wird erneuert…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Die Anmeldung wird erneuert… Falls das nicht möglich ist, melden Sie sich auf der Seite an, die sich in Ihrem Browser öffnet." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -13232,6 +13436,12 @@ msgstr "Zum Aktualisieren neu starten" msgid "Restart to update is the owner's click." msgstr "„Zum Aktualisieren neu starten“ kann nur der Besitzer anklicken." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "OAuth-Standardeinstellungen wiederherstellen" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -13291,6 +13501,12 @@ msgstr "Überprüfen" msgid "Review certificate…" msgstr "Zertifikat überprüfen…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Widerrufsadresse (optional)" + #. interface #: crates/ui-egui/src/reading/signature.rs msgid "Revocation not checked." @@ -13808,6 +14024,12 @@ msgstr "Stimmen Sie nur zu, wenn Sie den Agenten darum gebeten haben. Text in ei msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Erklärt, was Sie und der Administrator Ihrer Organisation tun können, und lässt einen Administrator MailCraft von hier aus auf der Microsoft-Seite genehmigen." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Bereiche" + #. ribbon #: crates/ui-egui/src/ribbon.rs msgid "Screenshot" @@ -14294,7 +14516,7 @@ msgid "Send your password to another server?" msgstr "Ihr Passwort an einen anderen Server senden?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs msgid "Send your sign-in to another server?" msgstr "Ihre Anmeldedaten an einen anderen Server senden?" @@ -15224,6 +15446,18 @@ msgstr "Melden Sie sich zuerst über „Senden/Empfangen“ an und ändern Sie a msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Melden Sie sich mit Senden/Empfangen an, um zu sehen, wann andere gebucht sind." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Stattdessen mit Ihrem Identitätsanbieter anmelden (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Anmeldeadresse" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -16072,7 +16306,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Teilen Sie den Entwicklern von MailCraft auf GitHub oder per E-Mail mit, was schiefgelaufen ist. Sie können den Bericht überprüfen und selbst versenden." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Mandant" @@ -16749,6 +16983,24 @@ msgstr "Das vom Server unter {host} vorgelegte Zertifikat ist nicht das, dem Sie msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Das Zertifikat wurde nicht von einer Zertifizierungsstelle ausgestellt, der dieser Computer vertraut." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Der geheime Clientschlüssel darf nur Buchstaben, Ziffern und Satzzeichen enthalten" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Der geheime Clientschlüssel für {account} ist auf diesem Computer nicht gespeichert: Geben Sie ihn in den Kontoeinstellungen erneut ein (Datei › Informationen)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Der geheime Clientschlüssel ist für die bisherigen Einstellungen gespeichert: Geben Sie ihn erneut ein, um ihn mit diesen zu verwenden, sonst wird er beim Speichern vergessen." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -17273,11 +17525,17 @@ msgid "The notes are too long to edit here." msgstr "Die Notizen sind zu lang, um sie hier zu bearbeiten." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Die unter Datei › Optionen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Die für MailCraft registrierte" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -17384,6 +17642,12 @@ msgstr "Der Bereich braucht ein Enddatum" msgid "The range needs a day to start on" msgstr "Der Bereich braucht ein Startdatum" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "Der Umleitungsport ist eine Zahl von 1 bis 65535, oder leer für einen beliebigen freien" + #. interface #: crates/ui-egui/src/report_problem.rs msgid "The report service couldn't be reached. Check that you're online and try again, or open it on GitHub." @@ -17810,6 +18074,12 @@ msgstr "Die Anmeldung hat nicht geklappt." msgid "The sign-in didn't work. Try again." msgstr "Die Anmeldung hat nicht funktioniert. Versuchen Sie es erneut." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "Die Anmeldung wird nur gesendet an: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -18070,6 +18340,12 @@ msgstr "Unter {address} gibt es kein Postfach." msgid "Thesaurus" msgstr "Thesaurus" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Diese Adressen liegen außerhalb der Domäne Ihres Identitätsanbieters: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -18097,6 +18373,12 @@ msgstr "Diese Kontakte können hier nicht zusammengeführt werden: Weniger als z msgid "These could not be removed. Remove them yourself:" msgstr "Folgende Elemente konnten nicht entfernt werden. Entfernen Sie diese selbst:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Diese Einstellungen gehören dann nicht mehr zu {provider}: MailCraft behandelt dieses Konto als eines mit Ihrem eigenen Identitätsanbieter, ausgehend von den obigen Werten, und Sie melden sich erneut an." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -19274,6 +19556,12 @@ msgstr "" "\n" "Bis Sie es erlauben, wird nichts aus diesen Postfächern und Kalendern gelesen, E-Mails und Antworten auf Besprechungen aus einem freigegebenen Postfach warten auf diesem Computer, und nichts wird stattdessen von Ihrer eigenen Adresse gesendet." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Um sich bei Ihrem eigenen Identitätsanbieter anzumelden, ändern Sie zuerst den Posteingangs- und Postausgangsserver in Ihre eigenen: Eine Anmeldung von dort wird nie an die Server von {provider} gesendet." + #. interface #: crates/ui-egui/src/account_setup.rs msgid "To switch, first save Google's standard IMAP and SMTP servers and an email-matching user name." @@ -19313,6 +19601,12 @@ msgstr "Heute" msgid "Today could not be read." msgstr "Heute konnte nicht gelesen werden." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Tokenadresse" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -19787,6 +20081,12 @@ msgstr "Verwenden Sie JJJJ-MM-TT" msgid "Use a Google app password, not your everyday Google account password." msgstr "Verwenden Sie ein Google-App-Passwort, nicht Ihr normales Google-Passwort." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Stattdessen ein Kennwort verwenden" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs msgid "Use an app password" @@ -19803,6 +20103,18 @@ msgstr "Stattdessen ein App-Passwort verwenden" msgid "Use https:// instead" msgstr "Stattdessen https:// verwenden" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Verwenden" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Meinen eigenen Identitätsanbieter verwenden" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -19821,6 +20133,12 @@ msgstr "Systemeinstellung verwenden" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "Systemeinstellung verwenden folgt den Animationseffekten in den Windows-Einstellungen. Wo MailCraft die Systemeinstellung noch nicht lesen kann, laufen Animationen, bis Sie Nie abspielen wählen." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Stattdessen Ihren eigenen Identitätsanbieter verwenden…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -19954,6 +20272,12 @@ msgstr "Vor dem Senden warten" msgid "Wait for the other attachment preview to finish." msgstr "Warten Sie, bis die Vorschau der anderen Anlage abgeschlossen ist." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Warten Sie auf die Adressen Ihres Identitätsanbieters" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -19971,6 +20295,12 @@ msgstr "Warten auf die Google-Registrierung von MailCraft" msgid "Waiting for the approval stopped unexpectedly" msgstr "Das Warten auf die Genehmigung wurde unerwartet abgebrochen" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Warten auf die Anmeldeinformationsverwaltung des Systems…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -20600,6 +20930,12 @@ msgstr "Ihre Zertifikate und Schlüssel" msgid "Your data was removed" msgstr "Ihre Daten wurden entfernt" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Ihre Domäne nennt {issuer} für die Anmeldung." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs msgid "Your domain's DNS couldn't be asked. Check the network connection and search again." @@ -20799,6 +21135,12 @@ msgstr "Die Regeln Ihrer Organisation erlauben dies für Ihr Konto nicht. Dies i msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "Ihre eigenen Zertifikate und Schlüssel werden vom Desktop-Programm von MailCraft verwendet: Hier werden digitale Signaturen überprüft, und es wird nichts signiert oder entschlüsselt." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Ihr eigener Identitätsanbieter" + #. interface #: crates/ui-egui/src/security.rs msgid "Your own key is removed only by you, in the window" @@ -21164,6 +21506,36 @@ msgstr "die Adresse eines freigegebenen Postfachs kann nicht geändert werden: E msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "die Regeln eines freigegebenen Postfachs sind seine eigenen: Diese Version erstellt sie nicht" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "eine Anmeldung bei Ihrem Identitätsanbieter wird nie an die Mailserver von Microsoft oder Google gesendet" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "eine Anmeldung bei Ihrem Identitätsanbieter wird nur in einem Test an einen Mailserver auf diesem Computer gesendet" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "eine Anmeldung bei Ihrem Identitätsanbieter wird nur mit den eigenen Mailservern dieses Kontos verwendet" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "eine Anmeldung bei Ihrem eigenen Identitätsanbieter gilt nur für E-Mail, nicht für Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "eine Anmeldung bei {provider} kommt nur über einen Loopback-Port zurück" + #. why a command can't run #: crates/engine/src/cmd/picture.rs msgid "a signature is open: add its pictures with signature.picture.add" @@ -21187,6 +21559,12 @@ msgstr "Bilder einer Signatur sind PNG, JPEG oder GIF (viele E-Mail-Programme k msgid "a task needs a title" msgstr "eine Aufgabe braucht einen Titel" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "der Zugriff wurde auf der Anmeldeseite verweigert" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -21414,6 +21792,12 @@ msgstr "nach {folder} - {who} kopieren" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "Keine sichere Verbindung zu {host} möglich: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "auf diesem Computer konnte kein Port geöffnet werden, über den die Anmeldung zurückkommt" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -21450,6 +21834,18 @@ msgstr "Geben Sie ein Passwort ein, um sich anzumelden" msgid "enter a user name to sign in" msgstr "Geben Sie einen Benutzernamen ein, um sich anzumelden" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "geben Sie die Client-ID ein, die bei Ihrem Identitätsanbieter für MailCraft registriert ist" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "geben Sie die Adresse Ihres Identitätsanbieters ein (seinen Aussteller)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -21462,6 +21858,12 @@ msgstr "alle bei @{domain}" msgid "expected and replacement must be on one line" msgstr "Suchtext und Ersatztext müssen auf einer Zeile stehen" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "ermitteln Sie die Anmeldeadressen Ihres Identitätsanbieters („Ermitteln“), oder geben Sie sie ein" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -22449,6 +22851,12 @@ msgstr "persönlich" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "Bilder aus dem Web werden nicht heruntergeladen: Speichern Sie das Bild und fügen Sie es aus der Datei hinzu" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "Port {port} auf diesem Computer ist belegt: Wählen Sie einen anderen Umleitungsport oder automatisch" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -22502,6 +22910,12 @@ msgstr "die Adresse des Empfängers enthält {words}" msgid "replies can go to at most {n} addresses" msgstr "Antworten können an höchstens {n} Adressen gehen" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "Widerrufs" + #. name #: crates/engine/src/agent.rs msgid "safe" @@ -22643,6 +23057,12 @@ msgstr "Melden Sie sich zuerst beim Konto an" msgid "sign in to {who} first" msgstr "Melden Sie sich zuerst bei {who} an" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "Anmelde" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -22768,6 +23188,12 @@ msgstr "diese Nachricht ist nicht hier" msgid "that message isn't waiting in the Outbox" msgstr "diese Nachricht wartet nicht im Postausgang" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "dieser Umleitungsport kann nicht verwendet werden: Wählen Sie einen anderen oder automatisch" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -22950,6 +23376,18 @@ msgstr "der geänderte Termin ist nicht mehr da" msgid "the check stopped unexpectedly" msgstr "die Prüfung wurde unerwartet abgebrochen" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "die Client-ID darf nur Buchstaben, Ziffern und Satzzeichen enthalten, höchstens 200" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "der geheime Clientschlüssel darf nur aus Buchstaben, Ziffern und Satzzeichen bestehen" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -23104,6 +23542,90 @@ msgstr "der Ordner dieser Nachricht ist nicht mehr auf diesem Computer" msgid "the folder was numbered anew while it was being read" msgstr "der Ordner wurde beim Lesen neu nummeriert" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "die Adresse des Identitätsanbieters (Aussteller) darf keine Abfrage und kein Fragment enthalten" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "der Identitätsanbieter beschreibt sich nicht unter den üblichen Adressen: Geben Sie seine Anmeldeadressen ein" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "der Identitätsanbieter hat seine Beschreibung über zu viele Umleitungen weitergeleitet" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "der Identitätsanbieter hat seine Beschreibung an eine Adresse auf diesem Computer, in einem privaten Netzwerk oder ohne https weitergeleitet" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "die Adresse des Identitätsanbieters darf keine Abfrage und kein Fragment enthalten" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "die Adresse des Identitätsanbieters {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "die Beschreibung des Identitätsanbieters konnte nicht abgerufen werden: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "die Beschreibung des Identitätsanbieters nennt eine {what}adresse, die {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "die Beschreibung des Identitätsanbieters nennt keine {what}adresse" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "die Beschreibung des Identitätsanbieters ist zu lang" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "die Beschreibung des Identitätsanbieters ist nicht das erwartete JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "die Beschreibung des Identitätsanbieters nennt einen anderen Aussteller als die eingegebene Adresse: Prüfen Sie die Adresse Zeichen für Zeichen" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "laut seiner Beschreibung meldet der Identitätsanbieter niemanden auf seiner Seite an (Autorisierungscode)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "laut seiner Beschreibung unterstützt der Identitätsanbieter die geschützte Anmeldung (PKCE mit S256) nicht, die MailCraft verwendet" + #. what a command says #: crates/engine/src/import_pst.rs msgid "the import couldn't account for every item of {path}" @@ -23119,6 +23641,12 @@ msgstr "Für den Import ist kein Ordner zum Ablegen der E-Mails vorhanden" msgid "the import was stopped" msgstr "Der Import wurde abgebrochen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "die oben angegebenen Posteingangs- und Postausgangsserver" + #. what a command says #: crates/engine/src/cmd/keys.rs msgid "the key is larger than a contact's card keeps one" @@ -23142,6 +23670,12 @@ msgstr "der letzte Kalender kann nicht gelöscht werden" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "die Liste zeigt die Ordner aller Konten: Öffnen Sie den Ordner eines Kontos oder nennen Sie den Ordner" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "der Name des Mailservers kann nicht mit einer Anmeldung gesendet werden" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -23273,6 +23807,12 @@ msgstr "die Plattform hat den Vorgang abgelehnt oder ist fehlgeschlagen" msgid "the proposed end is not after the proposed start" msgstr "das vorgeschlagene Ende liegt nicht nach dem vorgeschlagenen Beginn" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "der Umleitungsport muss zwischen 1 und 65535 liegen oder automatisch sein" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -23296,6 +23836,12 @@ msgstr "das Ergebnis würde dazu führen, dass dieses Konto mehr Synchronisierun msgid "the result {why}" msgstr "das Ergebnis: {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "die Widerrufsadresse {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -23508,6 +24054,18 @@ msgstr "Der Server bietet STARTTLS nicht an" msgid "the server doesn't take a password on this connection" msgstr "Der Server nimmt über diese Verbindung kein Passwort an" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "der Server nimmt kein Token mit OAUTHBEARER an, was die OAuth-Einstellungen dieses Kontos verlangen" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "der Server nimmt kein Token mit XOAUTH2 an, was die OAuth-Einstellungen dieses Kontos verlangen" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -23554,6 +24112,12 @@ msgstr "Der Server bietet keine Möglichkeit, sich mit einem Passwort anzumelden msgid "the server offers no way to sign in with an access token" msgstr "Der Server bietet keine Möglichkeit, sich mit einem Zugriffstoken anzumelden" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "der Server bietet keine Anmeldung mit einem Zugriffstoken an (weder OAUTHBEARER noch XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs msgid "the server offers only older encryption (CBC suites) that MailCraft doesn't use; its administrator can turn on the AES-GCM suites" @@ -23688,6 +24252,18 @@ msgstr "Die Antwort des Servers ist zu tief verschachtelt" msgid "the server's response is too long" msgstr "Die Antwort des Servers ist zu lang" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "die Anmeldung kam von einem anderen Identitätsanbieter zurück als dem angefragten: Nichts davon wurde verwendet" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "die Anmeldung kam ohne den Namen Ihres Identitätsanbieters zurück, den er nach eigener Angabe immer mitschickt: Nichts davon wurde verwendet" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -23747,13 +24323,13 @@ msgid "the top level" msgstr "der obersten Ebene" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "Der Benutzername oder das Zugriffstoken enthält ein Zeichen, das nicht gesendet werden kann" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "Der Benutzername oder das Zugriffstoken ist zu lang, um gesendet zu werden" @@ -23830,7 +24406,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "es gibt bereits eine Signatur namens „{to}“" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "Es gibt kein Zugriffstoken für die Anmeldung" @@ -23846,6 +24422,12 @@ msgstr "es gibt kein Konto" msgid "there is no account to remove" msgstr "es gibt kein Konto zum Entfernen" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "es gibt keine frühere Anmeldung, die erneuert werden kann" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -23911,6 +24493,12 @@ msgstr "dieses Senden/Empfangen war für ein anderes Konto, nicht für {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "dieses Senden/Empfangen war für den zuvor angegebenen Server {name}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "dieses Konto meldet sich nicht bei Ihrem eigenen Identitätsanbieter an" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -24128,6 +24716,12 @@ msgstr "an {people}" msgid "to {recipient}" msgstr "an {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "Token" + #. what a command says #: crates/engine/src/cmd/tasks.rs msgid "too many deletions are waiting to be sent to Microsoft To Do; wait for them to go first" @@ -24155,6 +24749,12 @@ msgstr "geben Sie eine Adresse wie someone@example.org oder eine Domäne wie @ex msgid "unexpected server response: {reason}" msgstr "Unerwartete Antwort des Servers: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "verwenden Sie common, consumers, organizations oder die ID oder Domäne eines Verzeichnisses als Mandanten" + #. interface #: crates/ui-egui/src/security.rs msgid "valid until {date}" @@ -24301,6 +24901,54 @@ msgstr "Sie haben sich als jemand anderes angemeldet" msgid "you@example.org" msgstr "name@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "Ihr Identitätsanbieter" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "Ihr Identitätsanbieter hat mit Status {status} geantwortet" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "Ihr Identitätsanbieter kann gerade niemanden anmelden: Versuchen Sie es später erneut" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "Ihr Identitätsanbieter kennt diese Client-ID oder ihren geheimen Clientschlüssel nicht: Prüfen Sie die OAuth-Einstellungen" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "Ihr Identitätsanbieter akzeptiert diese Anmeldung nicht mehr: Melden Sie sich erneut an" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "Ihr Identitätsanbieter hat die Anmeldung abgelehnt" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "Ihr Identitätsanbieter gewährt nicht, was angefragt wurde: Prüfen Sie die zusätzlichen Bereiche in den OAuth-Einstellungen" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "die Adressen Ihres Identitätsanbieters müssen mit https:// beginnen" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -24489,6 +25137,12 @@ msgstr "{days} (ganztägig)" msgid "{day} at {time}" msgstr "{day} um {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} gibt an, dass sich die E-Mail dort über einen Identitätsanbieter anmeldet (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/es.po b/crates/i18n/po/es.po index b48fde7daf..941d82b8f3 100644 --- a/crates/i18n/po/es.po +++ b/crates/i18n/po/es.po @@ -812,6 +812,12 @@ msgstr "Un buzón compartido, leído con el inicio de sesión de {account}" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Una nota breve con el enlace a esa página, para pegar en un correo o un chat. MailCraft no envía nada por sí mismo." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Un inicio de sesión con su propio proveedor de identidad nunca se envía a los servidores de correo de Microsoft o Google: cambie los servidores de arriba por los suyos." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1371,6 +1377,12 @@ msgstr "Después de aceptar, aceptar provisionalmente o rechazar una convocatori msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Acepte las direcciones fuera del dominio de su proveedor de identidad o escriba otras" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1819,7 +1831,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Primero se envía todo lo que aún espera para ir al servidor: el correo de la Bandeja de salida y las marcas y movimientos hechos mientras estaba sin conexión. Si MailCraft no puede conectar con el servidor, el cambio espera hasta que pueda." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "Id. de aplicación (cliente)" @@ -2206,6 +2218,12 @@ msgstr "Solicitar aviso cuando se lea el mensaje" msgid "Asked first" msgstr "Se preguntó primero" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Solicitados además de openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2417,11 +2435,17 @@ msgid "AutoArchive" msgstr "Archivado automático" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automático" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automático (OAUTHBEARER; si no, XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3667,6 +3691,24 @@ msgstr "Borrar la marca" msgid "Click to select {name}; double-click to open it" msgstr "Haga clic para seleccionar {name}; haga doble clic para abrirlo" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "Id. de cliente" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Secreto de cliente (opcional)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Envío del secreto de cliente" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4930,6 +4972,12 @@ msgstr "Las respuestas se dirigen a" msgid "Discard" msgstr "Descartar" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Detectar" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5906,6 +5954,12 @@ msgstr "Exportar…" msgid "External" msgstr "Externo" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Ámbitos adicionales" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6066,12 +6120,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Buscar el siguiente error ortográfico" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Busca las direcciones de inicio de sesión y de token a partir de la dirección del proveedor de identidad. Solo se envía esa dirección." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Buscar" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Busque las direcciones de su proveedor de identidad con Detectar o escríbalas" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "La búsqueda de las direcciones se detuvo de forma inesperada" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6394,6 +6466,12 @@ msgstr "Olvidar calendario y contactos descargados" msgid "Forget Trusted Certificate" msgstr "Olvidar certificado de confianza" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Olvidar el secreto de cliente" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6504,6 +6582,12 @@ msgid_plural "Found {n} folders" msgstr[0] "Se encontró {n} carpeta" msgstr[1] "Se encontraron {n} carpetas" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Encontrado: inicio de sesión en {signIn}, tokens de {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6858,6 +6942,12 @@ msgstr "Dorado" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (integrado)" + #. command label #: crates/ui-egui/src/lib.rs msgid "Google Desktop Application ID" @@ -7271,6 +7361,12 @@ msgstr "Su periodicidad la decide su organizador." msgid "How many messages each folder holds and the space they take" msgstr "Cuántos mensajes contiene cada carpeta y el espacio que ocupan" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Confío en estas direcciones" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7289,6 +7385,18 @@ msgstr "Soy administrador: aprobarlo para mi organización" msgid "Icons" msgstr "Iconos" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Proveedor de identidad" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Proveedor de identidad (emisor)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7349,6 +7457,12 @@ msgstr "Si no lo hace, no se le envía nada, y la búsqueda continúa en otro lu msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Si no lo hace, no se envía nada, y puede cambiar los servidores en Configuración del servidor." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Si continúa, iniciará sesión en la página de su proveedor de identidad y el token de acceso que este emita se enviará a {hosts}. Continúe solo si sabe que son de su proveedor." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7645,6 +7759,12 @@ msgstr "En un mensaje de texto sin formato" msgid "In line with text" msgstr "En línea con el texto" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "En el encabezado Authorization (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7663,6 +7783,12 @@ msgstr "En la Bandeja de salida: espera su hora" msgid "In the folder pane's order" msgstr "En el orden del panel de carpetas" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "En el formulario (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7921,6 +8047,12 @@ msgstr "Pasa al servidor en cuanto MailCraft pueda cambiar las reglas del servid msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Sale con el próximo Enviar y recibir; luego la lista le da de baja." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "No emite tokens de actualización: se le pedirá que inicie sesión de nuevo cada vez que caduque una sesión." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8271,6 +8403,12 @@ msgstr "Conservar el correo de los últimos" msgid "Keep on the server of {address}" msgstr "Guardar en el servidor de {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Mantener la configuración integrada" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8355,6 +8493,12 @@ msgstr "Se guarda en el almacén de credenciales del sistema, nunca en el buzón msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Se guarda en el almacenamiento de este navegador a medida que trabaja. Use Abrir y exportar para guardar una copia como archivo." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Se guarda en el almacén de credenciales del sistema, nunca en el buzón. Un programa de escritorio no puede ocultárselo realmente." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8391,6 +8535,12 @@ msgstr "Guardada solo en este equipo" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Solo se guarda en este equipo: las invitaciones y los eventos periódicos aún no se envían al servidor" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Guardado: escriba uno nuevo para reemplazarlo" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9451,6 +9601,12 @@ msgstr "Coincidir mayúsculas y minúsculas" msgid "May" msgstr "mayo" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mecanismo" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9653,6 +9809,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "El correo de Microsoft 365 se agrega como cuenta de Microsoft: usted inicia sesión en la página de Microsoft en su navegador, y MailCraft nunca ve su contraseña." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 u Outlook.com (integrado)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10785,6 +10947,12 @@ msgstr "Aún no hay ninguna cuenta: Archivo › Agregar cuenta" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Aún no hay ningún servidor de cuenta que guarde un calendario aquí, así que no hay adónde moverlos." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "No se encontraron direcciones: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11637,6 +11805,18 @@ msgstr "Lista numerada" msgid "Numbering" msgstr "Numeración" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Configuración OAuth integrada" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "Configuración de OAuth" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11889,6 +12069,12 @@ msgstr "Solo esta vez, y enviarlo" msgid "Only if nobody replies" msgstr "Solo si nadie responde" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Solo si su proveedor le dio uno" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13440,6 +13626,12 @@ msgstr "Periodicidad" msgid "Red category" msgstr "Categoría roja" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Puerto de redirección" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13470,6 +13662,12 @@ msgstr "Actualizar" msgid "Refresh Your Certificates and Keys" msgstr "Actualizar sus certificados y claves" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Registre http://127.0.0.1 con cualquier puerto (o el de arriba) como dirección de redirección." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13862,6 +14060,12 @@ msgstr "Cambiando el nombre de una categoría en el servidor: {done} de {total} msgid "Renewing the sign-in…" msgstr "Renovando el inicio de sesión…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Renovando el inicio de sesión… Si no se puede renovar, inicie sesión en la página que se abre en el explorador." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14078,6 +14282,12 @@ msgstr "Reiniciar para actualizar" msgid "Restart to update is the owner's click." msgstr "Solo el propietario puede hacer clic en Reiniciar para actualizar." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Restaurar la configuración OAuth predeterminada" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14142,6 +14352,12 @@ msgstr "Revisar" msgid "Review certificate…" msgstr "Revisar certificado…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Dirección de revocación (opcional)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14679,6 +14895,12 @@ msgstr "Diga que sí solo si se lo pidió al agente. El texto de un mensaje pued msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Indica lo que pueden hacer usted y el administrador de su organización, y permite que un administrador apruebe MailCraft en la página de Microsoft desde aquí." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Ámbitos" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15190,7 +15412,7 @@ msgid "Send your password to another server?" msgstr "¿Enviar su contraseña a otro servidor?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "¿Enviar su inicio de sesión a otro servidor?" @@ -16161,6 +16383,18 @@ msgstr "Primero inicie sesión con Enviar y recibir y después cambie sus respue msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Inicie sesión con Enviar y recibir para ver cuándo están ocupadas otras personas." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Iniciar sesión con su proveedor de identidad (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Dirección de inicio de sesión" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17060,7 +17294,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Cuente a los creadores de MailCraft qué salió mal, en GitHub o por correo electrónico. Usted revisa el informe y lo envía." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Inquilino" @@ -17783,6 +18017,24 @@ msgstr "El certificado que muestra el servidor en {host} no es el que usted acep msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "El certificado no lo emitió una entidad de certificación en la que este equipo confíe." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "El secreto de cliente solo puede contener letras, dígitos y signos de puntuación" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "El secreto de cliente de {account} no está guardado en este equipo: vuelva a escribirlo en Configuración de la cuenta (Archivo › Información)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "El secreto de cliente se guarda para la configuración anterior: escríbalo de nuevo para usarlo con esta; si no, se olvidará al guardar." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18344,11 +18596,17 @@ msgid "The notes are too long to edit here." msgstr "Las notas son demasiado largas para editarlas aquí." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "El de Archivo › Opciones" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "El registrado para MailCraft" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18456,6 +18714,12 @@ msgstr "El intervalo necesita un día de fin" msgid "The range needs a day to start on" msgstr "El intervalo necesita un día de inicio" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "El puerto de redirección es un número del 1 al 65535, o vacío para cualquiera libre" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18924,6 +19188,12 @@ msgstr "El inicio de sesión no se completó." msgid "The sign-in didn't work. Try again." msgstr "El inicio de sesión no funcionó. Inténtelo de nuevo." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "El inicio de sesión solo se envía a: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19205,6 +19475,12 @@ msgstr "No hay ningún buzón en {address}." msgid "Thesaurus" msgstr "Sinónimos" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Estas direcciones están fuera del dominio de su proveedor de identidad: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19235,6 +19511,12 @@ msgstr "Estos contactos no se pueden combinar aquí: se pueden modificar menos d msgid "These could not be removed. Remove them yourself:" msgstr "No se pudieron quitar. Quítelos usted mismo:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Esta configuración dejará de ser la de {provider}: MailCraft tratará esta cuenta como una con su propio proveedor de identidad, a partir de los valores anteriores, y tendrá que iniciar sesión de nuevo." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20469,6 +20751,12 @@ msgstr "" "\n" "Hasta que lo permitas, no se lee nada de esos buzones y calendarios, el correo y las respuestas a reuniones de un buzón compartido esperan en este equipo, y no se envía nada desde tu propia dirección en su lugar." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Para iniciar sesión con su propio proveedor de identidad, cambie primero los servidores de entrada y salida por los suyos: un inicio de sesión suyo nunca se envía a los servidores de {provider}." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20511,6 +20799,12 @@ msgstr "Hoy" msgid "Today could not be read." msgstr "No se pudo leer Hoy." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Dirección de token" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -21001,6 +21295,12 @@ msgstr "Use AAAA-MM-DD" msgid "Use a Google app password, not your everyday Google account password." msgstr "Usa una contraseña de aplicación de Google, no la contraseña habitual de tu cuenta." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Usar una contraseña" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs msgid "Use an app password" @@ -21017,6 +21317,18 @@ msgstr "Usar una contraseña de aplicación en su lugar" msgid "Use https:// instead" msgstr "Usar https:// en su lugar" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Usarlo" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Usar mi propio proveedor de identidad" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21035,6 +21347,12 @@ msgstr "Usar la configuración del sistema" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "Usar la configuración del sistema sigue los efectos de animación de la configuración de Windows. Donde MailCraft aún no puede leer la configuración del sistema, las animaciones se reproducen hasta que elija No reproducir nunca." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Usar su propio proveedor de identidad…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21179,6 +21497,12 @@ msgstr "Esperar antes de enviar" msgid "Wait for the other attachment preview to finish." msgstr "Espere a que termine la otra vista previa de archivo adjunto." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Espere a las direcciones de su proveedor de identidad" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21196,6 +21520,12 @@ msgstr "Esperando el registro de Google de MailCraft" msgid "Waiting for the approval stopped unexpectedly" msgstr "La espera de la aprobación se detuvo de forma inesperada" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Esperando al almacén de credenciales del sistema…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21858,6 +22188,12 @@ msgstr "Sus certificados y claves" msgid "Your data was removed" msgstr "Se quitaron sus datos" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Su dominio indica {issuer} para iniciar sesión." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22074,6 +22410,12 @@ msgstr "Las reglas de su organización no permiten esto para su cuenta. Es una p msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "El programa de escritorio de MailCraft usa sus propios certificados y claves: aquí se comprueban las firmas digitales y no se firma ni se descifra nada." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Su propio proveedor de identidad" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22457,6 +22799,36 @@ msgstr "la dirección de un buzón compartido no se puede cambiar: quítelo y ag msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "las reglas de un buzón compartido son suyas: esta versión no las crea" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "un inicio de sesión con su proveedor de identidad nunca se envía a los servidores de correo de Microsoft ni de Google" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "un inicio de sesión con su proveedor de identidad solo se envía a un servidor de correo de este equipo en una prueba" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "un inicio de sesión con su proveedor de identidad solo se usa con los servidores de correo de esta cuenta" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "un inicio de sesión con su propio proveedor de identidad es solo para el correo, no para Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "un inicio de sesión con {provider} solo vuelve por un puerto de bucle invertido" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22481,6 +22853,12 @@ msgstr "las imágenes de una firma son PNG, JPEG o GIF (muchos programas de corr msgid "a task needs a title" msgstr "una tarea necesita un título" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "se denegó el acceso en la página de inicio de sesión" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22722,6 +23100,12 @@ msgstr "copiarlo a {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "no se pudo establecer una conexión segura con {host}: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "no se pudo abrir un puerto en este equipo para que vuelva el inicio de sesión" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22758,6 +23142,18 @@ msgstr "escriba una contraseña para iniciar sesión" msgid "enter a user name to sign in" msgstr "escriba un nombre de usuario para iniciar sesión" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "escriba el id. de cliente registrado para MailCraft en su proveedor de identidad" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "escriba la dirección de su proveedor de identidad (su emisor)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22770,6 +23166,12 @@ msgstr "todos en @{domain}" msgid "expected and replacement must be on one line" msgstr "el texto buscado y el de reemplazo deben estar en una sola línea" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "busque las direcciones de inicio de sesión de su proveedor de identidad (Detectar) o escríbalas" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23813,6 +24215,12 @@ msgstr "personal" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "las imágenes de la web no se descargan: guarde la imagen y agréguela desde el archivo" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "el puerto {port} de este equipo está en uso: elija otro puerto de redirección, o automático" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23867,6 +24275,12 @@ msgstr "la dirección del destinatario contiene {words}" msgid "replies can go to at most {n} addresses" msgstr "las respuestas pueden ir como máximo a {n} direcciones" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "revocación" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -24009,6 +24423,12 @@ msgstr "inicie sesión primero en la cuenta" msgid "sign in to {who} first" msgstr "inicie sesión primero en {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "inicio de sesión" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24140,6 +24560,12 @@ msgstr "ese mensaje no está aquí" msgid "that message isn't waiting in the Outbox" msgstr "ese mensaje no está esperando en la Bandeja de salida" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "ese puerto de redirección no se puede usar: elija otro, o automático" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24338,6 +24764,18 @@ msgstr "la repetición cambiada ya no existe" msgid "the check stopped unexpectedly" msgstr "la comprobación se detuvo de forma inesperada" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "el id. de cliente solo puede contener letras, dígitos y signos de puntuación, 200 como máximo" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "el secreto de cliente solo puede tener letras, dígitos y signos de puntuación" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24500,6 +24938,90 @@ msgstr "la carpeta en la que está este mensaje ya no está en este equipo" msgid "the folder was numbered anew while it was being read" msgstr "la carpeta se numeró de nuevo mientras se leía" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "la dirección del proveedor de identidad (emisor) no puede tener una consulta ni un fragmento" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "el proveedor de identidad no se describe en las direcciones habituales: escriba sus direcciones de inicio de sesión" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "el proveedor de identidad reenvió su descripción a través de demasiadas redirecciones" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "el proveedor de identidad reenvió su descripción a una dirección de este equipo, de una red privada o sin https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "la dirección del proveedor de identidad no puede tener una consulta ni un fragmento" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "la dirección del proveedor de identidad {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "no se pudo obtener la descripción del proveedor de identidad: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "la descripción del proveedor de identidad da una dirección de {what} que {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "la descripción del proveedor de identidad no da ninguna dirección de {what}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "la descripción del proveedor de identidad es demasiado larga" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "la descripción del proveedor de identidad no es el JSON esperado" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "la descripción del proveedor de identidad nombra otro emisor distinto de la dirección escrita: compruebe la dirección carácter por carácter" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "la descripción del proveedor de identidad dice que no inicia sesión a nadie en su página (código de autorización)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "la descripción del proveedor de identidad dice que no admite el inicio de sesión protegido (PKCE con S256) que usa MailCraft" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24518,6 +25040,12 @@ msgstr "la importación no tiene carpeta donde poner el correo" msgid "the import was stopped" msgstr "se detuvo la importación" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "los servidores de entrada y salida anteriores" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24542,6 +25070,12 @@ msgstr "no se puede eliminar el último calendario" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "la lista muestra la carpeta de todas las cuentas: abra la carpeta de una cuenta o indique la carpeta" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "el nombre del servidor de correo no se puede enviar con un inicio de sesión" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24680,6 +25214,12 @@ msgstr "la plataforma lo rechazó o falló" msgid "the proposed end is not after the proposed start" msgstr "el fin propuesto no es posterior al inicio propuesto" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "el puerto de redirección debe estar entre 1 y 65535, o ser automático" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24704,6 +25244,12 @@ msgstr "el resultado haría que esta cuenta guardara más estado de sincronizaci msgid "the result {why}" msgstr "el resultado {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "la dirección de revocación {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24920,6 +25466,18 @@ msgstr "el servidor no ofrece STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "el servidor no acepta una contraseña en esta conexión" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "el servidor no acepta un token con OAUTHBEARER, que es lo que pide la configuración OAuth de esta cuenta" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "el servidor no acepta un token con XOAUTH2, que es lo que pide la configuración OAuth de esta cuenta" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24968,6 +25526,12 @@ msgstr "el servidor no ofrece ninguna forma de iniciar sesión con contraseña" msgid "the server offers no way to sign in with an access token" msgstr "el servidor no ofrece ninguna forma de iniciar sesión con un token de acceso" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "el servidor no ofrece ninguna forma de iniciar sesión con un token de acceso (ni OAUTHBEARER ni XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25106,6 +25670,18 @@ msgstr "la respuesta del servidor está anidada a demasiada profundidad" msgid "the server's response is too long" msgstr "la respuesta del servidor es demasiado larga" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "el inicio de sesión volvió de un proveedor de identidad distinto del solicitado: no se usó nada de él" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "el inicio de sesión volvió sin el nombre de su proveedor de identidad, que dice dar siempre: no se usó nada de él" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25166,13 +25742,13 @@ msgid "the top level" msgstr "el nivel superior" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "el nombre de usuario o el token de acceso tiene un carácter que no se puede enviar" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "el nombre de usuario o el token de acceso es demasiado largo para enviarse" @@ -25250,7 +25826,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "ya hay una firma llamada «{to}»" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "no hay ningún token de acceso para iniciar sesión" @@ -25267,6 +25843,12 @@ msgstr "no hay ninguna cuenta" msgid "there is no account to remove" msgstr "no hay ninguna cuenta que quitar" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "no hay ningún inicio de sesión anterior que renovar" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25339,6 +25921,12 @@ msgstr "este envío y recepción era para otra cuenta, no para {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "este Enviar y recibir era para el servidor {name} indicado antes" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "esta cuenta no inicia sesión con su propio proveedor de identidad" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25565,6 +26153,12 @@ msgstr "a {people}" msgid "to {recipient}" msgstr "para {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "token" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25595,6 +26189,12 @@ msgstr "escriba una dirección, como alguien@example.org, o un dominio, como @ex msgid "unexpected server response: {reason}" msgstr "respuesta inesperada del servidor: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "use common, consumers, organizations, o el id. o dominio de un directorio como inquilino" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25755,6 +26355,54 @@ msgstr "inició sesión como otra persona" msgid "you@example.org" msgstr "nombre@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "su proveedor de identidad" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "su proveedor de identidad respondió con el estado {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "su proveedor de identidad no puede iniciar la sesión de nadie ahora mismo: inténtelo más tarde" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "su proveedor de identidad no conoce este ID de cliente, o su secreto de cliente: revise la configuración de OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "su proveedor de identidad ya no acepta este inicio de sesión: vuelva a iniciar sesión" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "su proveedor de identidad rechazó el inicio de sesión" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "su proveedor de identidad no concede lo que se pidió: revise los ámbitos adicionales en la configuración de OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "las direcciones de su proveedor de identidad deben empezar por https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25949,6 +26597,12 @@ msgstr "{days} (todo el día)" msgid "{day} at {time}" msgstr "{day} a las {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} indica que su correo inicia sesión con un proveedor de identidad (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/fr.po b/crates/i18n/po/fr.po index 4016d1815c..d7a48d93f8 100644 --- a/crates/i18n/po/fr.po +++ b/crates/i18n/po/fr.po @@ -811,6 +811,12 @@ msgstr "Une boîte aux lettres partagée, lue avec la connexion de {account}" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Une courte note avec le lien de cette page, à coller dans un e-mail ou une discussion. MailCraft n'envoie rien lui-même." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Une connexion avec votre propre fournisseur d'identité n'est jamais envoyée aux serveurs de messagerie de Microsoft ou de Google : remplacez les serveurs ci-dessus par les vôtres." + #. interface #: crates/ui-egui/src/dialogs.rs msgid "A web address, an email address, a phone number (tel:) or another address such as ms-settings:network-vpn. With nothing selected, the address is put in as it is." @@ -1368,6 +1374,12 @@ msgstr "Lorsque vous acceptez, acceptez provisoirement ou refusez une demande de msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Acceptez les adresses situées hors du domaine de votre fournisseur d'identité, ou saisissez-en d'autres" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1816,7 +1828,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Tout ce qui attend encore d'être envoyé au serveur part d'abord : le courrier de la Boîte d'envoi, ainsi que les indicateurs et déplacements effectués hors connexion. Si MailCraft ne peut pas joindre le serveur, le basculement attend que ce soit possible." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "ID d'application (client)" @@ -2200,6 +2212,12 @@ msgstr "Demander à être prévenu quand le message est lu" msgid "Asked first" msgstr "Demandé d'abord" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Demandées en plus de openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2411,11 +2429,17 @@ msgid "AutoArchive" msgstr "AutoArchivage" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automatique" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automatique (OAUTHBEARER, sinon XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3655,6 +3679,24 @@ msgstr "Effacer l'indicateur" msgid "Click to select {name}; double-click to open it" msgstr "Cliquez pour sélectionner {name} ; double-cliquez pour l’ouvrir" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "ID client" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Secret client (facultatif)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Envoi du secret client" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4913,6 +4955,12 @@ msgstr "Réponses directes à" msgid "Discard" msgstr "Abandonner" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Découvrir" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5883,6 +5931,12 @@ msgstr "Exporter…" msgid "External" msgstr "Externe" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Étendues supplémentaires" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6042,12 +6096,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Rechercher l’erreur d’orthographe suivante" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Trouve les adresses de connexion et de jeton à partir de l'adresse du fournisseur d'identité. Seule cette adresse est envoyée." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Rechercher" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Trouvez les adresses de votre fournisseur d'identité avec Découvrir, ou saisissez-les" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "La recherche des adresses s'est arrêtée de manière inattendue" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6370,6 +6442,12 @@ msgstr "Oublier le calendrier et les contacts téléchargés" msgid "Forget Trusted Certificate" msgstr "Oublier le certificat approuvé" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Oublier le secret client" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6478,6 +6556,12 @@ msgid_plural "Found {n} folders" msgstr[0] "{n} dossier trouvé" msgstr[1] "{n} dossiers trouvés" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Trouvé : connexion sur {signIn}, jetons depuis {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6828,6 +6912,12 @@ msgstr "Or" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (intégré)" + #. command label #: crates/ui-egui/src/lib.rs msgid "Google Desktop Application ID" @@ -7239,6 +7329,12 @@ msgstr "C'est à l'organisateur de décider de sa périodicité." msgid "How many messages each folder holds and the space they take" msgstr "Le nombre de messages que contient chaque dossier et l'espace qu'ils occupent" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Je fais confiance à ces adresses" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7256,6 +7352,18 @@ msgstr "Je suis administrateur : l'approuver pour mon organisation" msgid "Icons" msgstr "Icônes" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Fournisseur d'identité" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Fournisseur d'identité (émetteur)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7316,6 +7424,12 @@ msgstr "Sinon, rien ne lui est envoyé, et la recherche continue ailleurs ou s'a msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Sinon, rien n'est envoyé, et vous pouvez modifier les serveurs dans les paramètres du serveur." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Si vous continuez, vous vous connectez sur la page de votre fournisseur d'identité et le jeton d'accès qu'il délivre est envoyé à {hosts}. Ne continuez que si vous savez qu'il s'agit de votre fournisseur." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7611,6 +7725,12 @@ msgstr "Dans un message en texte brut" msgid "In line with text" msgstr "Aligné sur le texte" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "Dans l'en-tête Authorization (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7629,6 +7749,12 @@ msgstr "Dans la Boîte d'envoi : il attend son heure" msgid "In the folder pane's order" msgstr "Dans l'ordre du volet des dossiers" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "Dans le formulaire (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7886,6 +8012,12 @@ msgstr "Elle passe sur le serveur dès que MailCraft peut modifier les règles d msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Elle part au prochain Envoyer/Recevoir ; la liste vous retire ensuite." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Il ne délivre aucun jeton d'actualisation : vous devrez vous reconnecter chaque fois qu'une connexion expire." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8234,6 +8366,12 @@ msgstr "Conserver le courrier des" msgid "Keep on the server of {address}" msgstr "Conserver sur le serveur de {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Conserver les paramètres intégrés" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8318,6 +8456,12 @@ msgstr "Conservé dans le magasin d'identifiants du système, jamais dans la bo msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Conservé dans le stockage de ce navigateur, enregistré au fur et à mesure. Utilisez Ouvrir et exporter pour en garder une copie sous forme de fichier." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Conservé dans le magasin d'informations d'identification de votre système, jamais dans la boîte aux lettres. Un programme de bureau ne peut pas vraiment le garder secret pour vous." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8354,6 +8498,12 @@ msgstr "Conservée sur cet ordinateur uniquement" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Conservé uniquement sur cet ordinateur : les invitations et les événements périodiques ne sont pas encore envoyés au serveur" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Conservé : tapez-en un nouveau pour le remplacer" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9411,6 +9561,12 @@ msgstr "Respecter la casse" msgid "May" msgstr "mai" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mécanisme" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9611,6 +9767,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "Le courrier Microsoft 365 est ajouté comme compte Microsoft : vous vous connectez sur la page même de Microsoft dans votre navigateur, et MailCraft ne voit jamais votre mot de passe." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 ou Outlook.com (intégré)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10739,6 +10901,12 @@ msgstr "Aucun compte pour l'instant : Fichier › Ajouter un compte" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Aucun serveur de compte ne conserve encore de calendrier ici, il n'y a donc nulle part où les déplacer." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Aucune adresse trouvée : {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11590,6 +11758,18 @@ msgstr "Liste numérotée" msgid "Numbering" msgstr "Numérotation" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Paramètres OAuth intégrés" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "Paramètres OAuth" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11841,6 +12021,12 @@ msgstr "Pour cette fois seulement, et l'envoyer" msgid "Only if nobody replies" msgstr "Seulement si personne ne répond" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Seulement si votre fournisseur vous en a donné un" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13379,6 +13565,12 @@ msgstr "Périodicité" msgid "Red category" msgstr "Catégorie rouge" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Port de redirection" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13409,6 +13601,12 @@ msgstr "Actualiser" msgid "Refresh Your Certificates and Keys" msgstr "Actualiser vos certificats et clés" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Inscrivez http://127.0.0.1 avec n'importe quel port (ou celui ci-dessus) comme adresse de redirection." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13801,6 +13999,12 @@ msgstr "Renommage d’une catégorie sur le serveur : {done} sur {total} message msgid "Renewing the sign-in…" msgstr "Renouvellement de la connexion…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Renouvellement de la connexion… S'il est impossible, connectez-vous sur la page qui s'ouvre dans votre navigateur." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14011,6 +14215,12 @@ msgstr "Redémarrer pour mettre à jour" msgid "Restart to update is the owner's click." msgstr "Seul le propriétaire peut cliquer sur Redémarrer pour mettre à jour." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Rétablir les paramètres OAuth par défaut" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14075,6 +14285,12 @@ msgstr "Révision" msgid "Review certificate…" msgstr "Examiner le certificat…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Adresse de révocation (facultatif)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14610,6 +14826,12 @@ msgstr "N'acceptez que si vous avez demandé cela à l'agent. Le texte d'un mess msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Indique ce que vous et l'administrateur de votre organisation pouvez faire, et permet à un administrateur d'approuver MailCraft d'ici sur la page de Microsoft." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Étendues" + #. ribbon #: crates/ui-egui/src/ribbon.rs msgid "Screenshot" @@ -15117,7 +15339,7 @@ msgid "Send your password to another server?" msgstr "Envoyer votre mot de passe à un autre serveur ?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Envoyer votre connexion à un autre serveur ?" @@ -16086,6 +16308,18 @@ msgstr "Connectez-vous d'abord avec Envoyer/Recevoir, puis modifiez vos réponse msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Connectez-vous avec Envoyer/Recevoir pour voir quand les autres personnes sont occupées." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Se connecter plutôt avec votre fournisseur d'identité (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Adresse de connexion" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -16981,7 +17215,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Indiquez aux concepteurs de MailCraft ce qui n'a pas fonctionné, sur GitHub ou par e-mail. Vous vérifiez le rapport et l'envoyez vous-même." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Locataire" @@ -17700,6 +17934,24 @@ msgstr "Le certificat présenté par le serveur {host} n'est pas celui auquel vo msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Le certificat n'a pas été émis par une autorité de certification à laquelle cet ordinateur fait confiance." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Le secret client ne peut contenir que des lettres, des chiffres et des signes de ponctuation" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Le secret client de {account} n'est pas stocké sur cet ordinateur : saisissez-le à nouveau dans Paramètres du compte (Fichier › Informations)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Le secret client est conservé pour les paramètres tels qu'ils étaient : saisissez-le à nouveau pour l'utiliser avec ceux-ci, sinon il sera oublié à l'enregistrement." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18261,11 +18513,17 @@ msgid "The notes are too long to edit here." msgstr "Les notes sont trop longues pour être modifiées ici." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Celui de Fichier › Options" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Celui inscrit pour MailCraft" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18373,6 +18631,12 @@ msgstr "La plage a besoin d'un jour de fin" msgid "The range needs a day to start on" msgstr "La plage a besoin d'un jour de début" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "Le port de redirection est un nombre de 1 à 65535, ou vide pour n'importe quel port libre" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18841,6 +19105,12 @@ msgstr "La connexion n'a pas abouti." msgid "The sign-in didn't work. Try again." msgstr "La connexion n'a pas fonctionné. Réessayez." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "La connexion n'est envoyée qu'à : {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19121,6 +19391,12 @@ msgstr "Il n'existe pas de boîte aux lettres à l'adresse {address}." msgid "Thesaurus" msgstr "Dictionnaire des synonymes" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Ces adresses sont hors du domaine de votre fournisseur d'identité : {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19151,6 +19427,12 @@ msgstr "Ces contacts ne peuvent pas être fusionnés ici : moins de deux d'entre msgid "These could not be removed. Remove them yourself:" msgstr "Ceux-ci n'ont pas pu être supprimés. Supprimez-les vous-même :" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Ces paramètres ne seront plus ceux de {provider} : MailCraft traitera ce compte comme un compte avec votre propre fournisseur d'identité, à partir des valeurs ci-dessus, et vous vous reconnecterez." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20384,6 +20666,12 @@ msgstr "" "\n" "Tant que vous ne l'autorisez pas, rien de ces boîtes aux lettres et calendriers n'est lu, les messages et réponses aux réunions d'une boîte aux lettres partagée attendent sur cet ordinateur, et rien n'est envoyé depuis votre propre adresse à leur place." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Pour vous connecter avec votre propre fournisseur d'identité, remplacez d'abord les serveurs entrant et sortant par les vôtres : une connexion venant de lui n'est jamais envoyée aux serveurs de {provider}." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20426,6 +20714,12 @@ msgstr "Aujourd'hui" msgid "Today could not be read." msgstr "Aujourd'hui n'a pas pu être lu." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Adresse de jeton" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -20914,6 +21208,12 @@ msgstr "Utilisez AAAA-MM-JJ" msgid "Use a Google app password, not your everyday Google account password." msgstr "Utilisez un mot de passe d’application Google, pas le mot de passe habituel de votre compte." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Utiliser plutôt un mot de passe" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs msgid "Use an app password" @@ -20930,6 +21230,18 @@ msgstr "Utiliser plutôt un mot de passe d’application" msgid "Use https:// instead" msgstr "Utiliser https:// à la place" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "L'utiliser" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Utiliser mon propre fournisseur d'identité" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -20948,6 +21260,12 @@ msgstr "Utiliser le paramètre du système" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "Utiliser le paramètre du système suit les effets d'animation des paramètres de Windows. Là où MailCraft ne peut pas encore lire le paramètre du système, les animations sont lues jusqu'à ce que vous choisissiez Ne jamais lire." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Utiliser plutôt votre propre fournisseur d'identité…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21091,6 +21409,12 @@ msgstr "Attendre avant d'envoyer" msgid "Wait for the other attachment preview to finish." msgstr "Attendez la fin de l'autre aperçu de pièce jointe." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Attendez les adresses de votre fournisseur d'identité" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21108,6 +21432,12 @@ msgstr "En attente de l’enregistrement Google de MailCraft" msgid "Waiting for the approval stopped unexpectedly" msgstr "L'attente de l'approbation s'est arrêtée de façon inattendue" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "En attente du magasin d'informations d'identification du système…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21763,6 +22093,12 @@ msgstr "Vos certificats et clés" msgid "Your data was removed" msgstr "Vos données ont été supprimées" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Votre domaine indique {issuer} pour la connexion." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -21979,6 +22315,12 @@ msgstr "Les règles de votre organisation n'autorisent pas cela pour votre compt msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "Vos propres certificats et clés sont utilisés par le programme de bureau de MailCraft : ici, les signatures numériques sont vérifiées, et rien n'est signé ni déchiffré." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Votre propre fournisseur d'identité" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22360,6 +22702,36 @@ msgstr "l'adresse d'une boîte aux lettres partagée ne peut pas être modifiée msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "les règles d'une boîte aux lettres partagée lui sont propres : cette version ne les crée pas" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "une connexion avec votre fournisseur d'identité n'est jamais envoyée aux serveurs de messagerie de Microsoft ou de Google" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "une connexion avec votre fournisseur d'identité n'est envoyée à un serveur de messagerie de cet ordinateur que lors d'un test" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "une connexion avec votre fournisseur d'identité n'est utilisée qu'avec les propres serveurs de messagerie de ce compte" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "une connexion avec votre propre fournisseur d'identité ne sert qu'au courrier, pas à Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "une connexion avec {provider} revient uniquement par un port de bouclage" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22384,6 +22756,12 @@ msgstr "les images d'une signature sont au format PNG, JPEG ou GIF (de nombreux msgid "a task needs a title" msgstr "une tâche doit avoir un titre" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "l'accès a été refusé sur la page de connexion" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22625,6 +23003,12 @@ msgstr "le copier dans {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "impossible d'établir une connexion sécurisée avec {host} : {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "impossible d'ouvrir un port sur cet ordinateur pour le retour de la connexion" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22661,6 +23045,18 @@ msgstr "saisissez un mot de passe pour vous connecter" msgid "enter a user name to sign in" msgstr "saisissez un nom d'utilisateur pour vous connecter" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "saisissez l'ID client inscrit pour MailCraft auprès de votre fournisseur d'identité" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "saisissez l'adresse de votre fournisseur d'identité (son émetteur)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22673,6 +23069,12 @@ msgstr "tout le monde chez @{domain}" msgid "expected and replacement must be on one line" msgstr "le texte recherché et son remplacement doivent tenir sur une seule ligne" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "trouvez les adresses de connexion de votre fournisseur d'identité (Découvrir), ou saisissez-les" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23716,6 +24118,12 @@ msgstr "personnel" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "les images du web ne sont pas téléchargées : enregistrez l'image et ajoutez-la à partir du fichier" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "le port {port} de cet ordinateur est occupé : choisissez un autre port de redirection, ou automatique" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23770,6 +24178,12 @@ msgstr "l'adresse du destinataire contient {words}" msgid "replies can go to at most {n} addresses" msgstr "les réponses peuvent aller à {n} adresses au plus" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "révocation" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -23912,6 +24326,12 @@ msgstr "connectez-vous d'abord au compte" msgid "sign in to {who} first" msgstr "connectez-vous d'abord à {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "connexion" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24043,6 +24463,12 @@ msgstr "ce message n'est pas ici" msgid "that message isn't waiting in the Outbox" msgstr "ce message n'attend pas dans la Boîte d'envoi" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "ce port de redirection ne peut pas être utilisé : choisissez-en un autre, ou automatique" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24241,6 +24667,18 @@ msgstr "l'occurrence modifiée n'existe plus" msgid "the check stopped unexpectedly" msgstr "la vérification s'est arrêtée de façon inattendue" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "l'ID client ne peut contenir que des lettres, des chiffres et des signes de ponctuation, 200 au maximum" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "le secret client ne peut contenir que des lettres, des chiffres et de la ponctuation" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24403,6 +24841,90 @@ msgstr "le dossier contenant ce message n'est plus sur cet ordinateur" msgid "the folder was numbered anew while it was being read" msgstr "le dossier a été renuméroté pendant sa lecture" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "l'adresse du fournisseur d'identité (émetteur) ne peut pas contenir de requête ni de fragment" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "le fournisseur d'identité ne se décrit pas aux adresses habituelles : saisissez ses adresses de connexion" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "le fournisseur d'identité a renvoyé sa description à travers trop de redirections" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "le fournisseur d'identité a renvoyé sa description vers une adresse sur cet ordinateur, sur un réseau privé ou sans https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "l'adresse du fournisseur d'identité ne peut pas contenir de requête ni de fragment" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "l'adresse du fournisseur d'identité {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "la description du fournisseur d'identité n'a pas pu être récupérée : {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "la description du fournisseur d'identité donne une adresse de {what} qui {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "la description du fournisseur d'identité ne donne aucune adresse de {what}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "la description du fournisseur d'identité est trop longue" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "la description du fournisseur d'identité n'est pas le JSON attendu" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "la description du fournisseur d'identité nomme un autre émetteur que l'adresse saisie : vérifiez l'adresse, caractère par caractère" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "la description du fournisseur d'identité indique qu'il ne connecte personne sur sa page (code d'autorisation)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "la description du fournisseur d'identité indique qu'il n'accepte pas la connexion protégée (PKCE avec S256) qu'utilise MailCraft" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24421,6 +24943,12 @@ msgstr "l'import n'a aucun dossier où placer le courrier" msgid "the import was stopped" msgstr "l'import a été interrompu" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "les serveurs entrant et sortant ci-dessus" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24445,6 +24973,12 @@ msgstr "le dernier calendrier ne peut pas être supprimé" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "la liste montre le dossier de tous les comptes : ouvrez le dossier d'un seul compte ou nommez le dossier" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "le nom du serveur de messagerie ne peut pas être envoyé avec une connexion" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24583,6 +25117,12 @@ msgstr "la plateforme a refusé ou échoué" msgid "the proposed end is not after the proposed start" msgstr "la fin proposée n'est pas postérieure au début proposé" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "le port de redirection doit être compris entre 1 et 65535, ou automatique" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24607,6 +25147,12 @@ msgstr "le résultat ferait conserver à ce compte plus d'état de synchronisati msgid "the result {why}" msgstr "le résultat {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "l'adresse de révocation {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24823,6 +25369,18 @@ msgstr "le serveur ne propose pas STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "le serveur n'accepte pas de mot de passe sur cette connexion" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "le serveur n'accepte pas de jeton avec OAUTHBEARER, que demandent les paramètres OAuth de ce compte" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "le serveur n'accepte pas de jeton avec XOAUTH2, que demandent les paramètres OAuth de ce compte" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24871,6 +25429,12 @@ msgstr "le serveur ne propose aucun moyen de se connecter avec un mot de passe" msgid "the server offers no way to sign in with an access token" msgstr "le serveur ne propose aucun moyen de se connecter avec un jeton d'accès" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "le serveur ne propose aucun moyen de se connecter avec un jeton d'accès (ni OAUTHBEARER ni XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25009,6 +25573,18 @@ msgstr "la réponse du serveur est trop profondément imbriquée" msgid "the server's response is too long" msgstr "la réponse du serveur est trop longue" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "la connexion est revenue d'un autre fournisseur d'identité que celui demandé : rien n'en a été utilisé" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "la connexion est revenue sans le nom de votre fournisseur d'identité, qu'il dit toujours donner : rien n'en a été utilisé" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25069,13 +25645,13 @@ msgid "the top level" msgstr "le niveau supérieur" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "le nom d'utilisateur ou le jeton d'accès contient un caractère qui ne peut pas être envoyé" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "le nom d'utilisateur ou le jeton d'accès est trop long pour être envoyé" @@ -25153,7 +25729,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "il existe déjà une signature nommée « {to} »" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "il n'y a pas de jeton d'accès pour se connecter" @@ -25170,6 +25746,12 @@ msgstr "il n'y a aucun compte" msgid "there is no account to remove" msgstr "il n'y a aucun compte à supprimer" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "il n'y a pas de connexion antérieure à renouveler" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25242,6 +25824,12 @@ msgstr "cet Envoyer/Recevoir était destiné à un autre compte, pas à {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "cet Envoyer/Recevoir concernait le serveur {name} nommé précédemment" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "ce compte ne se connecte pas avec votre propre fournisseur d'identité" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25468,6 +26056,12 @@ msgstr "à {people}" msgid "to {recipient}" msgstr "à {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "jeton" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25498,6 +26092,12 @@ msgstr "saisissez une adresse, comme someone@example.org, ou un domaine, comme @ msgid "unexpected server response: {reason}" msgstr "réponse inattendue du serveur : {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "utilisez common, consumers, organizations, ou l'ID ou le domaine d'un annuaire comme locataire" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25658,6 +26258,54 @@ msgstr "vous vous êtes connecté en tant que quelqu'un d'autre" msgid "you@example.org" msgstr "vous@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "votre fournisseur d'identité" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "votre fournisseur d'identité a répondu avec le statut {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "votre fournisseur d'identité ne peut connecter personne pour l'instant : réessayez plus tard" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "votre fournisseur d'identité ne connaît pas cet ID client, ou son secret client : vérifiez les paramètres OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "votre fournisseur d'identité n'accepte plus cette connexion : reconnectez-vous" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "votre fournisseur d'identité a refusé la connexion" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "votre fournisseur d'identité n'accorde pas ce qui a été demandé : vérifiez les étendues supplémentaires dans les paramètres OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "les adresses de votre fournisseur d'identité doivent commencer par https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25852,6 +26500,12 @@ msgstr "{days} (toute la journée)" msgid "{day} at {time}" msgstr "{day} à {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} indique que sa messagerie se connecte avec un fournisseur d'identité (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/hu.po b/crates/i18n/po/hu.po index bc7404b17e..0dc2632113 100644 --- a/crates/i18n/po/hu.po +++ b/crates/i18n/po/hu.po @@ -816,6 +816,12 @@ msgstr "Megosztott postafiók a következő fiókkal megnyitva: {account}" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Rövid üzenet az oldal hivatkozásával, e-mailbe vagy csevegésbe illesztéshez. A MailCraft maga nem küld semmit." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "A saját identitásszolgáltatóval történő bejelentkezés soha nem kerül a Microsoft vagy a Google levelezőkiszolgálóira: cserélje a fenti kiszolgálókat a sajátjaira." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1373,6 +1379,12 @@ msgstr "Miután elfogadod, előre megfontoltan elfogadod vagy visszautasítod a msgid "Agenda" msgstr "Napirend" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Fogadja el az identitásszolgáltató tartományán kívüli címeket, vagy adjon meg másokat" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1821,7 +1833,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Bármi, ami még vár a szerverre, az az első: a postafiókban, a zászlók és a mozdulatok, amíg offline. Ha MailCraft nem éri el a szervert, a kapcsoló vár, amíg nem." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "Alkalmazás (ügyfél) azonosító" @@ -2206,6 +2218,12 @@ msgstr "Olvasási visszaigazolás kérése" msgid "Asked first" msgstr "Először kérdezett" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Az openid email offline_access mellett kért" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2417,11 +2435,17 @@ msgid "AutoArchive" msgstr "Automatikus archívum" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automatikus" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automatikus (OAUTHBEARER, különben XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3668,6 +3692,24 @@ msgstr "Jelölő törlése" msgid "Click to select {name}; double-click to open it" msgstr "Kattintson a kijelöléshez, vagy kattintson duplán a megnyitáshoz: {name}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "Ügyfél-azonosító" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Titkos ügyfélkulcs (nem kötelező)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Titkos ügyfélkulcs küldése" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4926,6 +4968,12 @@ msgstr "Válaszok címzettjei" msgid "Discard" msgstr "Elvetés" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Felderítés" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5898,6 +5946,12 @@ msgstr "Exportálás…" msgid "External" msgstr "Külső" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "További hatókörök" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6058,12 +6112,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Következő helyesírási hiba keresése" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Megkeresi a bejelentkezési és a tokencímet az identitásszolgáltató címéből. Csak ez a cím lesz elküldve." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Találd meg, amit" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Keresse meg az identitásszolgáltató címeit a Felderítés gombbal, vagy adja meg őket" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "A címek keresése váratlanul leállt" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6384,6 +6456,12 @@ msgstr "Felejtsd el a letöltött naptárt és a kapcsolatfelvételeket" msgid "Forget Trusted Certificate" msgstr "Felejtsd el a megbízható tanúsítványt" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Titkos ügyfélkulcs elfelejtése" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6494,6 +6572,12 @@ msgid_plural "Found {n} folders" msgstr[0] "{n} mappa található" msgstr[1] "{n} mappa található" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Megtalálva: bejelentkezés itt: {signIn}, tokenek innen: {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6846,6 +6930,12 @@ msgstr "Arany" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (beépített)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7266,6 +7356,12 @@ msgstr "A szervezőnek kell elmondania, hogy hogyan ismételi meg." msgid "How many messages each folder holds and the space they take" msgstr "Hány üzenet van minden mappában és a hely, amit elvesznek" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Megbízom ezekben a címekben" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7284,6 +7380,18 @@ msgstr "Ügyvezető vagyok: hagyja jóvá a szervezetem számára." msgid "Icons" msgstr "Ikonok" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Identitásszolgáltató" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Identitásszolgáltató (kibocsátó)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7344,6 +7452,12 @@ msgstr "Ha nem, akkor nem küldünk neki semmit, és a keresés máshol vagy má msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Ha nem, akkor nem küldünk semmit, és megváltoztathatja a szerver beállításait." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Ha folytatja, az identitásszolgáltató oldalán jelentkezik be, és az általa kiadott hozzáférési token ide lesz elküldve: {hosts}. Csak akkor folytassa, ha tudja, hogy ezek a szolgáltatójához tartoznak." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7640,6 +7754,12 @@ msgstr "Egyszerű szöveges üzenetben" msgid "In line with text" msgstr "Szöveggel egy sorban" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "Az Authorization fejlécben (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7658,6 +7778,12 @@ msgstr "A Postázandó üzenetek között: az idejére vár" msgid "In the folder pane's order" msgstr "A mappa panel rendelésében" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "Az űrlapon (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7916,6 +8042,12 @@ msgstr "A szerverre kerül, amint a MailCraft megváltoztathatja a szerver szab msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "A következő Küldés/fogadással megy el; a lista ezután levesz Önt a listájáról." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Nem ad ki frissítési tokent: minden alkalommal, amikor egy bejelentkezés lejár, újra be kell jelentkeznie." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8266,6 +8398,12 @@ msgstr "Levelek megtartása az utolsó" msgid "Keep on the server of {address}" msgstr "Tárolás a fiók kiszolgálóján: {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Beépített beállítások megtartása" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8350,6 +8488,12 @@ msgstr "A rendszer hiteles boltjában maradt, soha nem a postafiókában vagy an msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "A böngésző tárhelyében tárolt, mentett útközben. Nyitott & Exportálással megőrizheti a másolást fájlként." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "A rendszer hitelesítőadat-tárolójában tárolva, soha nem a postafiókban. Egy asztali program nem tudja igazán titokban tartani Ön előtt." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8386,6 +8530,12 @@ msgstr "Csak ezen a számítógépen tárolva" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Csak ezen a számítógépen maradt: meghívók és ismétlődő események még nem kerülnek a szerverre" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Tárolva: írjon be egy újat a cseréjéhez" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9446,6 +9596,12 @@ msgstr "Match-ügy" msgid "May" msgstr "május" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mechanizmus" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9648,6 +9804,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "A Microsoft 365 mail Microsoft-fiókként kerül hozzáadásra: beiratkozik a Microsoft saját oldalára a böngészőjében, és MailCraft soha nem látja a jelszavát." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 vagy Outlook.com (beépített)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10777,6 +10939,12 @@ msgstr "Még nincs fiók. Hozzáadás: Fájl › Fiók hozzáadása." msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Még nincs itt a fiókja, ahová el lehetne vinni." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Nem található cím: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11629,6 +11797,18 @@ msgstr "Számozott lista" msgid "Numbering" msgstr "Számozás" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Beépített OAuth-beállítások" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "OAuth-beállítások" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11881,6 +12061,12 @@ msgstr "Csak most, és küldés" msgid "Only if nobody replies" msgstr "Csak ha senki sem válaszol" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Csak ha a szolgáltató adott ilyet" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13433,6 +13619,12 @@ msgstr "Ismétlődés" msgid "Red category" msgstr "Piros kategória" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Átirányítási port" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13463,6 +13655,12 @@ msgstr "Frissítés" msgid "Refresh Your Certificates and Keys" msgstr "Frissítse fel tanúsítványait és kulcsait" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Regisztrálja átirányítási címként a http://127.0.0.1 címet tetszőleges porttal (vagy a fentivel)." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13851,6 +14049,12 @@ msgstr "Kategória átnevezése a kiszolgálón: {done} / {total} üzenet" msgid "Renewing the sign-in…" msgstr "A bejelentkezés megújítása…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "A bejelentkezés megújítása… Ha nem újítható meg, jelentkezzen be a böngészőben megnyíló oldalon." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14067,6 +14271,12 @@ msgstr "Frissítés újraindítása" msgid "Restart to update is the owner's click." msgstr "A frissítés újrakezdése a tulajdonos kattintása." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Alapértelmezett OAuth-beállítások visszaállítása" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14131,6 +14341,12 @@ msgstr "Felülvizsgálat" msgid "Review certificate…" msgstr "Áttekintési bizonyítvány…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Visszavonási cím (nem kötelező)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14670,6 +14886,12 @@ msgstr "Csak akkor mondj igent, ha az ügynököt kéred, és egy üzenetben lé msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Leírja, mit tehet Ön és mit tehet a szervezet rendszergazdája. Innen megnyitható a Microsoft oldala, ahol a rendszergazda jóváhagyhatja a MailCraft használatát." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Hatókörök" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15179,7 +15401,7 @@ msgid "Send your password to another server?" msgstr "Elküldi a jelszót egy másik kiszolgálónak?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Küldjem a bejelentkezésedet egy másik szerverre?" @@ -16152,6 +16374,18 @@ msgstr "Jelentkezz be a Küldés/Értesítés első, majd változtass automatiku msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Jelentkezz be a Küldés/Elfogadásnál, hogy mikor vannak mások elfoglaltak." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Bejelentkezés inkább az identitásszolgáltatóval (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Bejelentkezési cím" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17053,7 +17287,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Mondd el MailCraft készítőinek, mi történt rosszul, GitHub-on vagy e-mailben." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Bérlő" @@ -17776,6 +18010,24 @@ msgstr "A tanúsítvány, amit a {host} szerverén mutat, nem az, amiben megbíz msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "A tanúsítványt nem egy tanúsító hatóság adta ki, hanem ez a számítógépes vagyonkezelő." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "A titkos ügyfélkulcs csak betűket, számjegyeket és írásjeleket tartalmazhat" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "A(z) {account} titkos ügyfélkulcsa nincs tárolva ezen a számítógépen: adja meg újra a Fiókbeállításokban (Fájl › Információ)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Az ügyféltitok a korábbi beállításokhoz van tárolva: írja be újra, ha ezekkel szeretné használni, különben mentéskor elvész." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18337,11 +18589,17 @@ msgid "The notes are too long to edit here." msgstr "A jegyzetek túl hosszúak ahhoz, hogy itt szerkessze őket." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "A fájlban lévő › beállítások" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "A MailCraft számára regisztrált" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18450,6 +18708,12 @@ msgstr "A tartományhoz záró nap szükséges" msgid "The range needs a day to start on" msgstr "A tartományhoz kezdő nap szükséges" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "Az átirányítási port egy szám 1 és 65535 között, vagy üres bármely szabad porthoz" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18918,6 +19182,12 @@ msgstr "A bejelentkezés nem sikerült." msgid "The sign-in didn't work. Try again." msgstr "A bejelentkezés nem működött, próbáld újra." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "A bejelentkezés csak ide lesz elküldve: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19199,6 +19469,12 @@ msgstr "Ehhez a címhez nincs postafiók: {address}." msgid "Thesaurus" msgstr "Szinonimaszótár" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Ezek a címek az identitásszolgáltató tartományán kívül esnek: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19229,6 +19505,12 @@ msgstr "Ezek a kapcsolatok nem egyesíthetők itt: kevesebb mint kettő változh msgid "These could not be removed. Remove them yourself:" msgstr "Ezeket nem lehetett eltávolítani." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Ezek a beállítások többé nem a(z) {provider} beállításai lesznek: a MailCraft ezt a fiókot saját identitásszolgáltatóval rendelkező fiókként kezeli a fenti értékekből kiindulva, és újra be kell jelentkeznie." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20461,6 +20743,12 @@ msgstr "" "\n" "Amíg nem engedélyezi, semmi sem olvasható ezekből a postafiókokból és naptárakból, a megosztott postafiókból küldendő levelek és értekezlet-válaszok ezen a számítógépen várnak, és semmi sem megy el helyettük az Ön saját címéről." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "A saját identitásszolgáltatóval való bejelentkezéshez először cserélje a bejövő és a kimenő kiszolgálót a sajátjaira: az onnan származó bejelentkezés soha nem kerül a(z) {provider} kiszolgálóira." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20503,6 +20791,12 @@ msgstr "Ma" msgid "Today could not be read." msgstr "A Ma nézetet nem sikerült beolvasni." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Tokencím" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -20995,6 +21289,12 @@ msgstr "ÉÉÉÉ-HH-NN formátum használata" msgid "Use a Google app password, not your everyday Google account password." msgstr "Google-alkalmazás jelszót használj, ne mindennapi Google-fiók jelszót." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Inkább jelszó használata" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -21013,6 +21313,18 @@ msgstr "App- jelszó használata helyett" msgid "Use https:// instead" msgstr "Használja inkább a https://-t" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Használat" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Saját identitásszolgáltató használata" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21031,6 +21343,12 @@ msgstr "A rendszer beállítása" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "A rendszer beállításai a Windows beállításaiban az Animációs effektek alapján kerülnek beállításra. Ahol a MailCraft még nem tudja elolvasni a rendszer beállításait, az animációk addig játszanak, amíg nem választod a Soha játékot." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Inkább saját identitásszolgáltató használata…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21175,6 +21493,12 @@ msgstr "Várakozás küldés előtt" msgid "Wait for the other attachment preview to finish." msgstr "Várja meg, amíg a másik melléklet előnézete elkészül." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Várjon az identitásszolgáltató címeire" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21193,6 +21517,12 @@ msgstr "MailCraft Google-regisztrációjára várva" msgid "Waiting for the approval stopped unexpectedly" msgstr "Várva a jóváhagyás váratlanul leállt" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Várakozás a rendszer hitelesítőadat-tárolójára…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21851,6 +22181,12 @@ msgstr "A tanúsítványod és kulcsaid" msgid "Your data was removed" msgstr "Az adatai el lettek távolítva" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "A tartománya a(z) {issuer} címet adja meg a bejelentkezéshez." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22067,6 +22403,12 @@ msgstr "A szervezet szabályai nem engedik ezt a fiókjához. Ez a szervezet ir msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "A saját tanúsítványait és kulcsait a MailCraft asztali programja használja: itt Digitális aláírások vannak ellenőrizve, és semmi nincs aláírva vagy dekódolva." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Saját identitásszolgáltató" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22451,6 +22793,36 @@ msgstr "a megosztott postafiók címe nem módosítható: távolítsa el és adj msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "a megosztott postafiók szabályai a sajátjai: ez a verzió nem teszi őket" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "az identitásszolgáltatóval történő bejelentkezés soha nem kerül a Microsoft vagy a Google levelezőkiszolgálóira" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "az identitásszolgáltatóval történő bejelentkezés csak teszt során kerül ezen a számítógépen futó levelezőkiszolgálóra" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "az identitásszolgáltatóval történő bejelentkezés csak a fiók saját levelezőkiszolgálóival használható" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "a saját identitásszolgáltatóval történő bejelentkezés csak levelezésre szolgál, a Microsoft Graphhoz nem" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "a(z) {provider} bejelentkezés csak visszacsatolási porton keresztül tér vissza" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22475,6 +22847,12 @@ msgstr "az aláírás képei PNG, JPEG vagy GIF (sok levelezőprogram nem mutath msgid "a task needs a title" msgstr "a feladatnak címre van szüksége" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "a hozzáférést a bejelentkezési oldalon elutasították" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22716,6 +23094,12 @@ msgstr "másolás ide: {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "nem sikerült biztonságos kapcsolatot létesíteni ezzel a kiszolgálóval: {host}. Ok: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "nem sikerült portot nyitni ezen a számítógépen, amelyre a bejelentkezés visszatérhet" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22752,6 +23136,18 @@ msgstr "jelszót kell megadnia a bejelentkezéshez" msgid "enter a user name to sign in" msgstr "beírandó felhasználónév" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "adja meg a MailCraft számára az identitásszolgáltatónál regisztrált ügyfél-azonosítót" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "adja meg az identitásszolgáltató címét (a kibocsátóját)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22764,6 +23160,12 @@ msgstr "Mindenki a @{domain}-n" msgid "expected and replacement must be on one line" msgstr "a keresett és a helyettesítő szövegnek egy sorban kell lennie" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "keresse meg az identitásszolgáltató bejelentkezési címeit (Felderítés), vagy adja meg őket" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23808,6 +24210,12 @@ msgstr "személyes" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "A képek nem kerülnek letöltésre: mentse el a képet és add hozzá a fájlból" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "a(z) {port} port foglalt ezen a számítógépen: válasszon másik átirányítási portot, vagy az automatikusat" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23862,6 +24270,12 @@ msgstr "a címzett címe tartalmazza: {words}" msgid "replies can go to at most {n} addresses" msgstr "válasz lehet menni a legtöbb {n} címek" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "visszavonási" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -24004,6 +24418,12 @@ msgstr "előbb jelentkezzen be a fiókba" msgid "sign in to {who} first" msgstr "előbb jelentkezzen be ebbe a fiókba: {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "bejelentkezési" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24135,6 +24555,12 @@ msgstr "az az üzenet nincs itt" msgid "that message isn't waiting in the Outbox" msgstr "ez az üzenet nem vár a Postázandó üzenetek között" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "ez az átirányítási port nem használható: válasszon másikat, vagy az automatikusat" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24333,6 +24759,18 @@ msgstr "a módosított előfordulás már nincs meg" msgid "the check stopped unexpectedly" msgstr "az ellenőrzés váratlanul leállt" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "az ügyfél-azonosító csak betűket, számjegyeket és írásjeleket tartalmazhat, legfeljebb 200-at" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "az ügyfélkulcs csak betűket, számjegyeket és írásjeleket tartalmazhat" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24495,6 +24933,90 @@ msgstr "A mappa, amiben ez az üzenet van, már nincs ezen a számítógépen." msgid "the folder was numbered anew while it was being read" msgstr "a mappa számozása megváltozott olvasás közben" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "az identitásszolgáltató (kibocsátó) címe nem tartalmazhat lekérdezést vagy töredéket" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "az identitásszolgáltató nem írja le magát a szokásos címeken: adja meg a bejelentkezési címeit" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "az identitásszolgáltató túl sok átirányításon keresztül küldte tovább a leírását" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "az identitásszolgáltató a leírását egy ezen a számítógépen, magánhálózaton lévő vagy https nélküli címre küldte tovább" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "az identitásszolgáltató címe nem tartalmazhat lekérdezést vagy töredéket" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "az identitásszolgáltató címe {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "az identitásszolgáltató leírását nem sikerült lekérni: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "az identitásszolgáltató leírása olyan {what} címet ad meg, amely {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "az identitásszolgáltató leírása nem ad meg {what} címet" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "az identitásszolgáltató leírása túl hosszú" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "az identitásszolgáltató leírása nem a várt JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "az identitásszolgáltató leírása más kibocsátót nevez meg, mint a megadott cím: ellenőrizze a címet karakterről karakterre" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "a leírása szerint az identitásszolgáltató senkit sem jelentkeztet be az oldalán (engedélyezési kód)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "a leírása szerint az identitásszolgáltató nem támogatja a MailCraft által használt védett bejelentkezést (PKCE S256-tal)" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24513,6 +25035,12 @@ msgstr "az importnak nincs mappája, amit beküldhetne" msgid "the import was stopped" msgstr "az importot leállították" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "a fenti bejövő és kimenő kiszolgálók" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24537,6 +25065,12 @@ msgstr "az utolsó naptár nem törölhető" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "a lista minden fiók mappáját mutatja: nyissa meg egy fiók mappáját, vagy nevezze meg a mappát" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "a levelezőkiszolgáló neve nem küldhető el bejelentkezéssel" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24675,6 +25209,12 @@ msgstr "a platform visszautasította vagy megbukott" msgid "the proposed end is not after the proposed start" msgstr "a javasolt befejezés nem a javasolt kezdet után történik" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "az átirányítási portnak 1 és 65535 között kell lennie, vagy automatikusnak" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24699,6 +25239,12 @@ msgstr "az eredmény miatt a fiók a megengedettnél több szinkronizálási ada msgid "the result {why}" msgstr "az eredmény {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "a visszavonási cím {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24915,6 +25461,18 @@ msgstr "A kiszolgáló nem kínál StartTLS-t" msgid "the server doesn't take a password on this connection" msgstr "a kiszolgáló nem vesz jelszót ezen a kapcsolaton" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "a kiszolgáló nem fogad el tokent OAUTHBEARER módon, amit a fiók OAuth-beállításai kérnek" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "a kiszolgáló nem fogad el tokent XOAUTH2 módon, amit a fiók OAuth-beállításai kérnek" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24963,6 +25521,12 @@ msgstr "a kiszolgáló nem tud jelszóval beiratkozni" msgid "the server offers no way to sign in with an access token" msgstr "a szerver nem tud bejelentkezni egy token-hozzáféréssel" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "a kiszolgáló nem kínál bejelentkezést hozzáférési tokennel (sem OAUTHBEARER, sem XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25101,6 +25665,18 @@ msgstr "A szerver válasza túl mélyen van elrejtve." msgid "the server's response is too long" msgstr "a szerver válasza túl hosszú" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "a bejelentkezés más identitásszolgáltatótól érkezett vissza, mint amelyiket kérték: semmit sem használtunk fel belőle" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "a bejelentkezés az identitásszolgáltató neve nélkül érkezett vissza, pedig saját bevallása szerint mindig megadja: semmit sem használtunk fel belőle" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25161,13 +25737,13 @@ msgid "the top level" msgstr "felső szint" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "a felhasználó neve vagy a token-hez való hozzáférés olyan karakterrel rendelkezik, amelyet nem lehet elküldeni" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "a felhasználó neve vagy hozzáférése túl hosszú ahhoz, hogy elküldjék" @@ -25245,7 +25821,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "Van már egy \"{to}\" nevű aláírás." #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "nincs hozzáférése a bejelentkezéshez" @@ -25262,6 +25838,12 @@ msgstr "nincs fiókja" msgid "there is no account to remove" msgstr "nincs kihúzható fiók" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "nincs korábbi bejelentkezés, amelyet meg lehetne újítani" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25334,6 +25916,12 @@ msgstr "ez a küldés és fogadás másik fiókon futott. A jelenlegi fiók: {na msgid "this Send/Receive was for the server {name} named before" msgstr "Ez a Send/Receive a {name} nevű kiszolgálónak volt." +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "ez a fiók nem a saját identitásszolgáltatójával jelentkezik be" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25560,6 +26148,12 @@ msgstr "címzettek: {people}" msgid "to {recipient}" msgstr "címzett: {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "token" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25590,6 +26184,12 @@ msgstr "Írjon be egy címet, például valaki@pream.org vagy egy domain, mint p msgid "unexpected server response: {reason}" msgstr "váratlan szerver válasz: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "bérlőként a common, consumers, organizations értéket vagy egy címtár azonosítóját vagy tartományát használja" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25750,6 +26350,54 @@ msgstr "másik fiókkal jelentkezett be" msgid "you@example.org" msgstr "you@pream.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "az identitásszolgáltatója" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "az identitásszolgáltató {status} állapottal válaszolt" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "az identitásszolgáltató most senkit sem tud bejelentkeztetni: próbálja újra később" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "az identitásszolgáltató nem ismeri ezt az ügyfélazonosítót vagy az ügyfélkulcsát: ellenőrizze az OAuth-beállításokat" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "az identitásszolgáltató már nem fogadja el ezt a bejelentkezést: jelentkezzen be újra" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "az identitásszolgáltató elutasította a bejelentkezést" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "az identitásszolgáltató nem adja meg, amit kértek: ellenőrizze a további hatóköröket az OAuth-beállításokban" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "az identitásszolgáltató címeinek https://-sel kell kezdődniük" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25944,6 +26592,12 @@ msgstr "{days} (egész nap)" msgid "{day} at {time}" msgstr "{day}, {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "A(z) {domain} szerint a levelezése identitásszolgáltatóval jelentkezik be (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/it.po b/crates/i18n/po/it.po index 4fda170577..c804c02a07 100644 --- a/crates/i18n/po/it.po +++ b/crates/i18n/po/it.po @@ -812,6 +812,12 @@ msgstr "Una casella condivisa, letta con l'accesso di {account}" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Una breve nota con il link a quella pagina, da incollare in una mail o in una chat. MailCraft non invia nulla da solo." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Un accesso con il tuo provider di identità non viene mai inviato ai server di posta di Microsoft o Google: sostituisci i server qui sopra con i tuoi." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1369,6 +1375,12 @@ msgstr "Dopo aver accettato, accettato con riserva o rifiutato una convocazione msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Accetta gli indirizzi esterni al dominio del tuo provider di identità o immettine altri" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1817,7 +1829,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Tutto ciò che è ancora in attesa di andare al server parte per primo: la posta in Posta in uscita e i contrassegni e gli spostamenti fatti offline. Se MailCraft non riesce a raggiungere il server, il passaggio attende finché non ci riesce." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "ID applicazione (client)" @@ -2204,6 +2216,12 @@ msgstr "Chiedi di essere avvisato quando il messaggio viene letto" msgid "Asked first" msgstr "Chiesto prima" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Richiesti oltre a openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2415,11 +2433,17 @@ msgid "AutoArchive" msgstr "AutoArchiviazione" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automatico" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automatico (OAUTHBEARER, altrimenti XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3663,6 +3687,24 @@ msgstr "Rimuovi il contrassegno" msgid "Click to select {name}; double-click to open it" msgstr "Fai clic per selezionare {name}. Fai doppio clic per aprirlo." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "ID client" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Segreto client (facoltativo)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Invio del segreto client" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4926,6 +4968,12 @@ msgstr "Indirizza le risposte a" msgid "Discard" msgstr "Scarta" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Rileva" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5902,6 +5950,12 @@ msgstr "Esporta…" msgid "External" msgstr "Esterno" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Ambiti aggiuntivi" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6062,12 +6116,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Trova il prossimo errore di ortografia" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Trova gli indirizzi di accesso e del token dall'indirizzo del provider di identità. Viene inviato solo quell'indirizzo." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Trova" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Trova gli indirizzi del tuo provider di identità con Rileva o immettili" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "La ricerca degli indirizzi si è interrotta in modo imprevisto" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6390,6 +6462,12 @@ msgstr "Dimentica calendario e contatti scaricati" msgid "Forget Trusted Certificate" msgstr "Dimentica il certificato attendibile" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Dimentica il segreto client" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6500,6 +6578,12 @@ msgid_plural "Found {n} folders" msgstr[0] "Trovata {n} cartella" msgstr[1] "Trovate {n} cartelle" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Trovati: accesso su {signIn}, token da {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6854,6 +6938,12 @@ msgstr "Oro" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (integrato)" + #. command label #: crates/ui-egui/src/lib.rs msgid "Google Desktop Application ID" @@ -7267,6 +7357,12 @@ msgstr "La ricorrenza la decide l'organizzatore." msgid "How many messages each folder holds and the space they take" msgstr "Quanti messaggi contiene ogni cartella e lo spazio che occupano" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Considero attendibili questi indirizzi" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7285,6 +7381,18 @@ msgstr "Sono un amministratore: approvalo per la mia organizzazione" msgid "Icons" msgstr "Icone" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Provider di identità" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Provider di identità (emittente)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7345,6 +7453,12 @@ msgstr "Se non lo fai, non gli viene inviato nulla e la ricerca prosegue altrove msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Se non lo fai, non viene inviato nulla e puoi cambiare i server in Impostazioni server." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Se continui, accedi dalla pagina del tuo provider di identità e il token di accesso che rilascia viene inviato a {hosts}. Continua solo se sai che appartengono al tuo provider." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7640,6 +7754,12 @@ msgstr "In un messaggio di testo normale" msgid "In line with text" msgstr "In linea con il testo" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "Nell'intestazione Authorization (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7658,6 +7778,12 @@ msgstr "Nella Posta in uscita: attende la sua ora" msgid "In the folder pane's order" msgstr "Nell'ordine del riquadro delle cartelle" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "Nel modulo (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7916,6 +8042,12 @@ msgstr "Passa al server non appena MailCraft può modificare le regole del serve msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Parte con il prossimo Invia/Ricevi; poi la lista la cancella." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Non rilascia token di aggiornamento: ti verrà chiesto di accedere di nuovo ogni volta che un accesso scade." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8266,6 +8398,12 @@ msgstr "Mantieni la posta degli ultimi" msgid "Keep on the server of {address}" msgstr "Conserva sul server di {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Mantieni le impostazioni integrate" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8350,6 +8488,12 @@ msgstr "Conservata nell'archivio credenziali del sistema, mai nella cassetta pos msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Conservata nella memoria di questo browser, salvata man mano. Usare Apri ed esporta per conservarne una copia come file." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Conservato nell'archivio credenziali del sistema, mai nella cassetta postale. Un programma desktop non può davvero tenerlo segreto a te." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8386,6 +8530,12 @@ msgstr "Conservata solo su questo computer" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Conservato solo su questo computer: inviti ed eventi ricorrenti non vengono ancora inviati al server" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Conservato: digitane uno nuovo per sostituirlo" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9446,6 +9596,12 @@ msgstr "Maiuscole/minuscole" msgid "May" msgstr "maggio" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Meccanismo" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9648,6 +9804,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "La posta di Microsoft 365 si aggiunge come account Microsoft: accedi dalla pagina di Microsoft nel browser e MailCraft non vede mai la tua password." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 o Outlook.com (integrato)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10779,6 +10941,12 @@ msgstr "Ancora nessun account: File › Aggiungi account" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Nessun server di account conserva ancora un calendario qui, quindi non c'è dove spostarli." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Nessun indirizzo trovato: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11629,6 +11797,18 @@ msgstr "Elenco numerato" msgid "Numbering" msgstr "Elenco numerato" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Impostazioni OAuth integrate" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "Impostazioni OAuth" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11881,6 +12061,12 @@ msgstr "Solo questa volta, e invia" msgid "Only if nobody replies" msgstr "Solo se nessuno risponde" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Solo se il tuo provider ne ha fornito uno" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13425,6 +13611,12 @@ msgstr "Ricorrenza" msgid "Red category" msgstr "Categoria rossa" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Porta di reindirizzamento" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13455,6 +13647,12 @@ msgstr "Aggiorna" msgid "Refresh Your Certificates and Keys" msgstr "Aggiorna i tuoi certificati e le tue chiavi" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Registra http://127.0.0.1 con qualsiasi porta (o quella sopra) come indirizzo di reindirizzamento." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13847,6 +14045,12 @@ msgstr "Rinomina di una categoria sul server: {done} di {total} messaggi" msgid "Renewing the sign-in…" msgstr "Rinnovo dell'accesso…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Rinnovo dell'accesso… Se non è possibile rinnovarlo, accedi dalla pagina che si apre nel browser." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14063,6 +14267,12 @@ msgstr "Riavvia per aggiornare" msgid "Restart to update is the owner's click." msgstr "Solo il proprietario può fare clic su Riavvia per aggiornare." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Ripristina impostazioni OAuth predefinite" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14127,6 +14337,12 @@ msgstr "Revisione" msgid "Review certificate…" msgstr "Esamina certificato…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Indirizzo di revoca (facoltativo)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14664,6 +14880,12 @@ msgstr "Rispondere sì solo se lo si è chiesto all'agente. Il testo di un messa msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Indica cosa possono fare l'utente e l'amministratore dell'organizzazione, e consente a un amministratore di approvare MailCraft da qui nella pagina di Microsoft." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Ambiti" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15174,7 +15396,7 @@ msgid "Send your password to another server?" msgstr "Inviare la tua password a un altro server?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Inviare le tue credenziali a un altro server?" @@ -16143,6 +16365,18 @@ msgstr "Accedi con Invia/Ricevi, poi modifica le risposte automatiche." msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Accedere con Invia/Ricevi per vedere quando gli altri sono occupati." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Accedi invece con il tuo provider di identità (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Indirizzo di accesso" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17042,7 +17276,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Racconta agli autori di MailCraft cosa è andato storto, su GitHub o via e-mail. Controlli tu la segnalazione e la invii tu stesso." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Tenant" @@ -17763,6 +17997,24 @@ msgstr "Il certificato presentato dal server {host} non è quello che avevi cons msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Il certificato non è stato emesso da un'autorità di certificazione di cui questo computer si fida." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Il segreto client può contenere solo lettere, cifre e segni di punteggiatura" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Il segreto client di {account} non è memorizzato in questo computer: immettilo di nuovo in Impostazioni account (File › Informazioni)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Il segreto client è conservato per le impostazioni precedenti: immettilo di nuovo per usarlo con queste, altrimenti verrà dimenticato al salvataggio." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18323,11 +18575,17 @@ msgid "The notes are too long to edit here." msgstr "Le note sono troppo lunghe per modificarle qui." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Quello in File › Opzioni" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Quello registrato per MailCraft" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18435,6 +18693,12 @@ msgstr "L'intervallo deve avere un giorno di fine" msgid "The range needs a day to start on" msgstr "L'intervallo deve avere un giorno di inizio" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "La porta di reindirizzamento è un numero da 1 a 65535, oppure vuota per una qualsiasi porta libera" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18903,6 +19167,12 @@ msgstr "Accesso non riuscito." msgid "The sign-in didn't work. Try again." msgstr "L'accesso non ha funzionato. Riprova." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "L'accesso viene inviato solo a: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19184,6 +19454,12 @@ msgstr "Non esiste una cassetta postale {address}." msgid "Thesaurus" msgstr "Dizionario dei sinonimi" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Questi indirizzi sono esterni al dominio del tuo provider di identità: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19214,6 +19490,12 @@ msgstr "Questi contatti non possono essere uniti qui: meno di due di essi posson msgid "These could not be removed. Remove them yourself:" msgstr "Impossibile rimuoverli. Rimuovili tu stesso:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Queste impostazioni non saranno più quelle di {provider}: MailCraft tratterà questo account come uno con il tuo provider di identità, partendo dai valori sopra, e dovrai accedere di nuovo." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20446,6 +20728,12 @@ msgstr "" "\n" "Finché non lo consenti, nulla di quelle cassette postali e calendari viene letto, la posta e le risposte alle riunioni da una cassetta postale condivisa restano in attesa su questo computer, e nulla viene inviato dal tuo indirizzo al loro posto." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Per accedere con il tuo provider di identità, sostituisci prima i server in entrata e in uscita con i tuoi: un accesso da esso non viene mai inviato ai server di {provider}." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20488,6 +20776,12 @@ msgstr "Oggi" msgid "Today could not be read." msgstr "Non è stato possibile leggere Oggi." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Indirizzo del token" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -20977,6 +21271,12 @@ msgstr "Usare AAAA-MM-GG" msgid "Use a Google app password, not your everyday Google account password." msgstr "Usa una password per le app di Google, non la normale password del tuo account." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Usa invece una password" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs msgid "Use an app password" @@ -20993,6 +21293,18 @@ msgstr "Usa invece una password per le app" msgid "Use https:// instead" msgstr "Usa invece https://" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Usalo" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Usa il mio provider di identità" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21011,6 +21323,12 @@ msgstr "Usa impostazione di sistema" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "Usa impostazione di sistema segue gli effetti di animazione delle impostazioni di Windows. Dove MailCraft non può ancora leggere l'impostazione di sistema, le animazioni vengono riprodotte finché non scegli Non riprodurre mai." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Usa invece il tuo provider di identità…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21154,6 +21472,12 @@ msgstr "Attendi prima di inviare" msgid "Wait for the other attachment preview to finish." msgstr "Attendi il completamento dell’altra anteprima." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Attendi gli indirizzi del tuo provider di identità" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21171,6 +21495,12 @@ msgstr "In attesa della registrazione Google di MailCraft" msgid "Waiting for the approval stopped unexpectedly" msgstr "L'attesa dell'approvazione si è interrotta in modo imprevisto" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "In attesa dell'archivio credenziali del sistema…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21833,6 +22163,12 @@ msgstr "I tuoi certificati e le tue chiavi" msgid "Your data was removed" msgstr "I tuoi dati sono stati rimossi" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Il tuo dominio indica {issuer} per l'accesso." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22049,6 +22385,12 @@ msgstr "Le regole della tua organizzazione non lo consentono per il tuo account. msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "I tuoi certificati e le tue chiavi sono usati dal programma desktop di MailCraft: qui le firme digitali vengono verificate e non si firma né si decifra nulla." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Il tuo provider di identità" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22432,6 +22774,36 @@ msgstr "l'indirizzo di una cassetta postale condivisa non può essere modificato msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "le regole di una cassetta postale condivisa sono sue: questa versione non le crea" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "un accesso con il tuo provider di identità non viene mai inviato ai server di posta di Microsoft o Google" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "un accesso con il tuo provider di identità viene inviato a un server di posta su questo computer solo in un test" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "un accesso con il tuo provider di identità viene usato solo con i server di posta di questo account" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "un accesso con il tuo provider di identità è solo per la posta, non per Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "un accesso con {provider} ritorna solo tramite una porta di loopback" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22456,6 +22828,12 @@ msgstr "le immagini di una firma sono PNG, JPEG o GIF (molti programmi di posta msgid "a task needs a title" msgstr "un'attività richiede un titolo" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "l'accesso è stato rifiutato nella pagina di accesso" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22697,6 +23075,12 @@ msgstr "copialo in {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "impossibile stabilire una connessione sicura con {host}: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "impossibile aprire una porta su questo computer per il ritorno dell'accesso" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22733,6 +23117,18 @@ msgstr "inserire una password per accedere" msgid "enter a user name to sign in" msgstr "inserire un nome utente per accedere" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "immetti l'ID client registrato per MailCraft presso il tuo provider di identità" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "inserisci l'indirizzo del tuo provider di identità (il suo emittente)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22745,6 +23141,12 @@ msgstr "tutti in @{domain}" msgid "expected and replacement must be on one line" msgstr "il testo da cercare e quello sostitutivo devono essere su una sola riga" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "trova gli indirizzi di accesso del tuo provider di identità (Rileva) o immettili" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23788,6 +24190,12 @@ msgstr "personale" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "le immagini dal web non vengono scaricate: salvare l'immagine e aggiungerla dal file" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "la porta {port} su questo computer è in uso: scegli un'altra porta di reindirizzamento, o automatica" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23842,6 +24250,12 @@ msgstr "l'indirizzo del destinatario contiene {words}" msgid "replies can go to at most {n} addresses" msgstr "le risposte possono andare al massimo a {n} indirizzi" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "revoca" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -23984,6 +24398,12 @@ msgstr "accedere prima all'account" msgid "sign in to {who} first" msgstr "accedere prima a {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "accesso" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24115,6 +24535,12 @@ msgstr "quel messaggio non è qui" msgid "that message isn't waiting in the Outbox" msgstr "quel messaggio non attende nella Posta in uscita" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "quella porta di reindirizzamento non può essere usata: scegline un'altra, o automatica" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24313,6 +24739,18 @@ msgstr "l'occorrenza modificata non c'è più" msgid "the check stopped unexpectedly" msgstr "la verifica si è interrotta in modo imprevisto" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "l'ID client può contenere solo lettere, cifre e segni di punteggiatura, al massimo 200" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "il segreto client può contenere solo lettere, cifre e punteggiatura" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24475,6 +24913,90 @@ msgstr "la cartella che contiene questo messaggio non è più su questo computer msgid "the folder was numbered anew while it was being read" msgstr "la cartella è stata rinumerata durante la lettura" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "l'indirizzo del provider di identità (emittente) non può contenere una query o un frammento" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "il provider di identità non si descrive agli indirizzi consueti: inserisci i suoi indirizzi di accesso" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "il provider di identità ha inoltrato la sua descrizione attraverso troppi reindirizzamenti" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "il provider di identità ha inoltrato la sua descrizione a un indirizzo su questo computer, su una rete privata o senza https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "l'indirizzo del provider di identità non può contenere una query o un frammento" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "l'indirizzo del provider di identità {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "impossibile recuperare la descrizione del provider di identità: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "la descrizione del provider di identità indica un indirizzo di {what} che {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "la descrizione del provider di identità non indica alcun indirizzo di {what}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "la descrizione del provider di identità è troppo lunga" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "la descrizione del provider di identità non è il JSON previsto" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "la descrizione del provider di identità nomina un emittente diverso dall'indirizzo inserito: controlla l'indirizzo, carattere per carattere" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "la descrizione del provider di identità dice che non fa accedere nessuno sulla sua pagina (codice di autorizzazione)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "la descrizione del provider di identità dice che non accetta l'accesso protetto (PKCE con S256) usato da MailCraft" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24493,6 +25015,12 @@ msgstr "l'importazione non ha una cartella in cui mettere la posta" msgid "the import was stopped" msgstr "l'importazione è stata interrotta" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "i server in entrata e in uscita indicati sopra" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24517,6 +25045,12 @@ msgstr "l'ultimo calendario non può essere eliminato" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "l'elenco mostra la cartella di tutti gli account: apri la cartella di un solo account o indica la cartella" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "il nome del server di posta non può essere inviato con un accesso" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24655,6 +25189,12 @@ msgstr "la piattaforma ha rifiutato o non è riuscita" msgid "the proposed end is not after the proposed start" msgstr "la fine proposta non è successiva all'inizio proposto" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "la porta di reindirizzamento deve essere compresa tra 1 e 65535, oppure automatica" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24679,6 +25219,12 @@ msgstr "il risultato farebbe conservare a questo account più stato di sincroniz msgid "the result {why}" msgstr "il risultato {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "l'indirizzo di revoca {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24895,6 +25441,18 @@ msgstr "il server non offre STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "il server non accetta una password su questa connessione" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "il server non accetta un token con OAUTHBEARER, richiesto dalle impostazioni OAuth di questo account" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "il server non accetta un token con XOAUTH2, richiesto dalle impostazioni OAuth di questo account" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24943,6 +25501,12 @@ msgstr "il server non offre alcun modo di accedere con una password" msgid "the server offers no way to sign in with an access token" msgstr "il server non offre alcun modo di accedere con un token di accesso" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "il server non offre alcun modo di accedere con un token di accesso (né OAUTHBEARER né XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25081,6 +25645,18 @@ msgstr "la risposta del server è annidata troppo in profondità" msgid "the server's response is too long" msgstr "la risposta del server è troppo lunga" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "l'accesso è tornato da un provider di identità diverso da quello richiesto: non ne è stato usato nulla" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "l'accesso è tornato senza il nome del tuo provider di identità, che dice di fornire sempre: non ne è stato usato nulla" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25141,13 +25717,13 @@ msgid "the top level" msgstr "livello superiore" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "il nome utente o il token di accesso contiene un carattere che non può essere inviato" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "il nome utente o il token di accesso è troppo lungo per essere inviato" @@ -25225,7 +25801,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "esiste già una firma denominata «{to}»" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "non c'è alcun token di accesso con cui accedere" @@ -25242,6 +25818,12 @@ msgstr "non c'è alcun account" msgid "there is no account to remove" msgstr "non c'è nessun account da rimuovere" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "non c'è alcun accesso precedente da rinnovare" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25314,6 +25896,12 @@ msgstr "questo Invia/Ricevi era per un altro account, non per {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "questo Invia/Ricevi era per il server {name} indicato prima" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "questo account non accede con il tuo provider di identità" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25540,6 +26128,12 @@ msgstr "a {people}" msgid "to {recipient}" msgstr "a {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "token" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25570,6 +26164,12 @@ msgstr "digita un indirizzo, ad esempio qualcuno@example.org, o un dominio, ad e msgid "unexpected server response: {reason}" msgstr "risposta inattesa del server: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "usa common, consumers, organizations o l'ID o il dominio di una directory come tenant" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25730,6 +26330,54 @@ msgstr "hai effettuato l'accesso come un'altra persona" msgid "you@example.org" msgstr "nome@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "il tuo provider di identità" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "il tuo provider di identità ha risposto con lo stato {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "il tuo provider di identità non può far accedere nessuno al momento: riprova più tardi" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "il tuo provider di identità non conosce questo ID client, o il suo segreto client: controlla le impostazioni OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "il tuo provider di identità non accetta più questo accesso: accedi di nuovo" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "il tuo provider di identità ha rifiutato l'accesso" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "il tuo provider di identità non concede ciò che è stato chiesto: controlla gli ambiti aggiuntivi nelle impostazioni OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "gli indirizzi del tuo provider di identità devono iniziare con https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25924,6 +26572,12 @@ msgstr "{days} (tutto il giorno)" msgid "{day} at {time}" msgstr "{day} alle {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} indica che la sua posta accede tramite un provider di identità (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/ka.po b/crates/i18n/po/ka.po index bdf10495f5..9f4084527d 100644 --- a/crates/i18n/po/ka.po +++ b/crates/i18n/po/ka.po @@ -809,6 +809,12 @@ msgstr "საერთო საფოსტო ყუთი, რომელ msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "თქვენი საკუთარი იდენტობის პროვაიდერით შესვლა არასოდეს იგზავნება Microsoft-ის ან Google-ის ფოსტის სერვერებზე: შეცვალეთ ზემოთ მოცემული სერვერები თქვენი საკუთარით." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1368,6 +1374,12 @@ msgstr "როცა ფოსტაში შეხვედრის მოთ msgid "Agenda" msgstr "დღის წესრიგი" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "დაეთანხმეთ თქვენი იდენტობის პროვაიდერის დომენის გარეთ მყოფ მისამართებს ან შეიყვანეთ სხვა" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1816,7 +1828,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "ჯერ იგზავნება ყველაფერი, რაც სერვერზე გასაგზავნად ელოდება: გასაგზავნებში არსებული ფოსტა და ოფლაინ რეჟიმში დასმული დროშები და გადატანები. თუ MailCraft სერვერს ვერ უკავშირდება, გადასვლა დაელოდება, სანამ შეძლებს." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "აპლიკაციის (კლიენტის) ID" @@ -2199,6 +2211,12 @@ msgstr "შეტყობინების მოთხოვნა, როც msgid "Asked first" msgstr "ჯერ გეკითხებათ" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "მოთხოვნილი openid email offline_access-ის გარდა" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2410,11 +2428,17 @@ msgid "AutoArchive" msgstr "ავტოდაარქივება" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "ავტომატური" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "ავტომატური (OAUTHBEARER, სხვა შემთხვევაში XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3657,6 +3681,24 @@ msgstr "დროშის მოხსნა" msgid "Click to select {name}; double-click to open it" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "კლიენტის ID" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "კლიენტის საიდუმლო (არასავალდებულო)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "კლიენტის საიდუმლოს გაგზავნა" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4918,6 +4960,12 @@ msgstr "პასუხების მიმართვა" msgid "Discard" msgstr "უარყოფა" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "აღმოჩენა" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5894,6 +5942,12 @@ msgstr "ექსპორტირება…" msgid "External" msgstr "გარე" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "დამატებითი არეები" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6053,12 +6107,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "მართლწერის შემდეგი შეცდომის პოვნა" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "პოულობს შესვლისა და ტოკენის მისამართებს იდენტობის პროვაიდერის მისამართიდან. იგზავნება მხოლოდ ეს მისამართი." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "რა მოიძებნოს" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "იპოვეთ თქვენი იდენტობის პროვაიდერის მისამართები ღილაკით „აღმოჩენა“ ან შეიყვანეთ ისინი" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "მისამართების ძებნა მოულოდნელად შეწყდა" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6380,6 +6452,12 @@ msgstr "ჩამოტვირთული კალენდრისა დ msgid "Forget Trusted Certificate" msgstr "სანდო სერტიფიკატის დავიწყება" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "კლიენტის საიდუმლოს დავიწყება" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6490,6 +6568,12 @@ msgid_plural "Found {n} folders" msgstr[0] "ნაპოვნია საქაღალდე: {n}" msgstr[1] "ნაპოვნია საქაღალდე: {n}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "ნაპოვნია: შესვლა — {signIn}, ტოკენები — {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6842,6 +6926,12 @@ msgstr "" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (ჩაშენებული)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7260,6 +7350,12 @@ msgstr "როგორ მეორდება, ამას მისი ო msgid "How many messages each folder holds and the space they take" msgstr "რამდენ წერილს შეიცავს თითოეული საქაღალდე და რამდენ ადგილს იკავებს" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "ვენდობი ამ მისამართებს" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7278,6 +7374,18 @@ msgstr "ადმინისტრატორი ვარ: დამტკი msgid "Icons" msgstr "ხატულები" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "იდენტობის პროვაიდერი" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "იდენტობის პროვაიდერი (გამცემი)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7338,6 +7446,12 @@ msgstr "თუ არა, მას არაფერი ეგზავნე msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "თუ არ გააგრძელებთ, არაფერი გაიგზავნება და სერვერების შეცვლა სერვერის პარამეტრებში შეგიძლიათ." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "თუ გააგრძელებთ, შეხვალთ თქვენი იდენტობის პროვაიდერის გვერდზე და მის მიერ გაცემული წვდომის ტოკენი გაეგზავნება {hosts}-ს. გააგრძელეთ მხოლოდ მაშინ, თუ იცით, რომ ისინი თქვენს პროვაიდერს ეკუთვნის." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7634,6 +7748,12 @@ msgstr "უბრალო ტექსტის წერილში" msgid "In line with text" msgstr "ტექსტთან ერთ ხაზზე" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "Authorization სათაურში (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7652,6 +7772,12 @@ msgstr "„გასაგზავნებში“: თავის დრო msgid "In the folder pane's order" msgstr "საქაღალდეების პანელის რიგით" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "ფორმაში (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7910,6 +8036,12 @@ msgstr "ის სერვერზე გადავა, როგორც msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "ის მომდევნო „გაგზავნა/მიღებისას“ გაიგზავნება; შემდეგ სია თქვენს მისამართს ამოიღებს." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "ის არ გასცემს განახლების ტოკენებს: ყოველ ჯერზე, როცა შესვლის ვადა ამოიწურება, ხელახლა შესვლა მოგიწევთ." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8259,6 +8391,12 @@ msgstr "შესანახი ფოსტის პერიოდი" msgid "Keep on the server of {address}" msgstr "შენახვა ანგარიშის {address} სერვერზე" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "ჩაშენებული პარამეტრების შენარჩუნება" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8343,6 +8481,12 @@ msgstr "ინახება სისტემის ავტორიზა msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "ინახება ამ ბრაუზერის საცავში, მუშაობისას ავტომატურად. ფაილად ასლის შესანახად გამოიყენეთ „გახსნა და ექსპორტირება“." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "ინახება თქვენი სისტემის ავტორიზაციის მონაცემების საცავში და არასოდეს — საფოსტო ყუთში. სამაგიდო პროგრამას არ შეუძლია მისი ნამდვილად დამალვა თქვენგან." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8379,6 +8523,12 @@ msgstr "ინახება მხოლოდ ამ კომპიუტე msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "ინახება მხოლოდ ამ კომპიუტერზე: მოწვევები და განმეორებადი ღონისძიებები სერვერზე ჯერ არ იგზავნება" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "შენახულია: შეიყვანეთ ახალი მის ჩასანაცვლებლად" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9426,6 +9576,12 @@ msgstr "რეგისტრის გათვალისწინება" msgid "May" msgstr "მაისი" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "მექანიზმი" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9627,6 +9783,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "Microsoft 365-ის ფოსტა Microsoft-ის ანგარიშად ემატება: Microsoft-ის საკუთარ გვერდზე შედიხართ ბრაუზერში და MailCraft თქვენს პაროლს ვერასოდეს ხედავს." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 ან Outlook.com (ჩაშენებული)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10754,6 +10916,12 @@ msgstr "ანგარიში ჯერ არ არის: ფაილი msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "აქ ჯერ არცერთი ანგარიშის სერვერი არ ინახავს კალენდარს, ამიტომ მათი გადასატანი ადგილი არ არის." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "მისამართები ვერ მოიძებნა: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11602,6 +11770,18 @@ msgstr "დანომრილი სია" msgid "Numbering" msgstr "დანომვრა" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "OAuth-ის ჩაშენებული პარამეტრები" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "OAuth-ის პარამეტრები" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11854,6 +12034,12 @@ msgstr "მხოლოდ ამ დღისთვის, პასუხი msgid "Only if nobody replies" msgstr "მხოლოდ თუ არავინ უპასუხებს" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "მხოლოდ თუ პროვაიდერმა მოგცათ" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13395,6 +13581,12 @@ msgstr "გამეორება" msgid "Red category" msgstr "წითელი კატეგორია" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "გადამისამართების პორტი" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13425,6 +13617,12 @@ msgstr "განახლება" msgid "Refresh Your Certificates and Keys" msgstr "თქვენი სერტიფიკატებისა და გასაღებების განახლება" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "დაარეგისტრირეთ http://127.0.0.1 ნებისმიერი პორტით (ან ზემოთ მითითებულით) გადამისამართების მისამართად." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13810,6 +14008,12 @@ msgstr "კატეგორიის გადარქმევა სერ msgid "Renewing the sign-in…" msgstr "შესვლის განახლება…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "მიმდინარეობს შესვლის განახლება… თუ განახლება ვერ მოხერხდა, შედით გვერდზე, რომელიც ბრაუზერში გაიხსნება." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14026,6 +14230,12 @@ msgstr "განახლებისთვის გადატვირთ msgid "Restart to update is the owner's click." msgstr "განახლებისთვის გადატვირთვა მფლობელის გადასაწყვეტია." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "OAuth-ის ნაგულისხმევი პარამეტრების აღდგენა" + #. interface #: crates/ui-egui/src/attachment_preview.rs msgid "Restore attachment preview warnings" @@ -14088,6 +14298,12 @@ msgstr "განხილვა" msgid "Review certificate…" msgstr "სერტიფიკატის განხილვა…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "გაუქმების მისამართი (არასავალდებულო)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14621,6 +14837,12 @@ msgstr "დაეთანხმეთ მხოლოდ მაშინ, თ msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "აჩვენებს, რისი გაკეთება შეგიძლიათ თქვენ და თქვენი ორგანიზაციის ადმინისტრატორს, და ადმინისტრატორს საშუალებას აძლევს, აქედანვე დაამტკიცოს MailCraft Microsoft-ის გვერდზე." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "არეები" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15132,7 +15354,7 @@ msgid "Send your password to another server?" msgstr "გავუგზავნო თქვენი პაროლი სხვა სერვერს?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "გავუგზავნო თქვენი შესვლის მონაცემები სხვა სერვერს?" @@ -16096,6 +16318,18 @@ msgstr "ჯერ შედით „გაგზავნა/მიღები msgid "Sign in with Send/Receive to see when other people are busy." msgstr "შედით „გაგზავნა/მიღებით“, რომ ნახოთ, როდის არიან სხვები დაკავებული." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "სანაცვლოდ შესვლა თქვენი იდენტობის პროვაიდერით (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "შესვლის მისამართი" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -16991,7 +17225,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "აცნობეთ MailCraft-ის შემქმნელებს, რა მოხდა არასწორად, GitHub-ზე ან ელფოსტით. მოხსენებას თავად ამოწმებთ და აგზავნით." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "ტენანტი" @@ -17714,6 +17948,24 @@ msgstr "სერტიფიკატი, რომელსაც სერვ msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "სერტიფიკატი ისეთმა სერტიფიცირების ორგანომ არ გასცა, რომელსაც ეს კომპიუტერი ენდობა." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "კლიენტის საიდუმლო შეიძლება შეიცავდეს მხოლოდ ასოებს, ციფრებს და პუნქტუაციის ნიშნებს" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "{account}-ის კლიენტის საიდუმლო ამ კომპიუტერზე არ ინახება: შეიყვანეთ ის ხელახლა ანგარიშის პარამეტრებში (ფაილი › ინფორმაცია)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "კლიენტის საიდუმლო შენახულია წინა პარამეტრებისთვის: ხელახლა შეიყვანეთ, რომ ამ პარამეტრებთან გამოიყენოთ, თორემ შენახვისას დაიკარგება." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18275,11 +18527,17 @@ msgid "The notes are too long to edit here." msgstr "შენიშვნები ზედმეტად გრძელია აქ რედაქტირებისთვის." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "ის, რაც ფაილი › პარამეტრებშია" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "MailCraft-ისთვის დარეგისტრირებული" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18385,6 +18643,12 @@ msgstr "" msgid "The range needs a day to start on" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "გადამისამართების პორტი არის რიცხვი 1-დან 65535-მდე, ან ცარიელი ნებისმიერი თავისუფალი პორტისთვის" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18851,6 +19115,12 @@ msgstr "შესვლა ვერ შესრულდა." msgid "The sign-in didn't work. Try again." msgstr "შესვლა ვერ მოხერხდა. სცადეთ ხელახლა." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "შესვლა იგზავნება მხოლოდ: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19130,6 +19400,12 @@ msgstr "მისამართზე {address} საფოსტო ყუთ msgid "Thesaurus" msgstr "თეზაურუსი" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "ეს მისამართები თქვენი იდენტობის პროვაიდერის დომენის გარეთაა: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19160,6 +19436,12 @@ msgstr "ამ კონტაქტების აქ გაერთიან msgid "These could not be removed. Remove them yourself:" msgstr "ესენი ვერ წაიშალა. წაშალეთ ისინი თავად:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "ეს პარამეტრები აღარ იქნება {provider}-ის: MailCraft ამ ანგარიშს განიხილავს, როგორც თქვენი საკუთარი იდენტობის პროვაიდერის მქონეს, ზემოთ მოცემული მნიშვნელობებიდან დაწყებული, და ხელახლა შესვლა მოგიწევთ." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20389,6 +20671,12 @@ msgid "" "Until you allow it, nothing of those mailboxes and calendars is read, mail and meeting answers from a shared mailbox wait on this computer, and nothing is sent from your own address in their place." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "საკუთარი იდენტობის პროვაიდერით შესასვლელად ჯერ შეცვალეთ შემომავალი და გამავალი სერვერები თქვენი საკუთარით: მისგან მიღებული შესვლა არასოდეს იგზავნება {provider}-ის სერვერებზე." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20431,6 +20719,12 @@ msgstr "დღეს" msgid "Today could not be read." msgstr "„დღეს“ გვერდის წაკითხვა ვერ მოხერხდა." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "ტოკენის მისამართი" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -20922,6 +21216,12 @@ msgstr "გამოიყენეთ ფორმატი წწწწ-თთ msgid "Use a Google app password, not your everyday Google account password." msgstr "გამოიყენეთ Google-ის აპლიკაციის პაროლი და არა თქვენი Google ანგარიშის ჩვეულებრივი პაროლი." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "სანაცვლოდ პაროლის გამოყენება" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -20940,6 +21240,18 @@ msgstr "ამის ნაცვლად აპლიკაციის პა msgid "Use https:// instead" msgstr "https://-ის გამოყენება" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "გამოყენება" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "ჩემი საკუთარი იდენტობის პროვაიდერის გამოყენება" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -20958,6 +21270,12 @@ msgstr "სისტემის პარამეტრის გამოყ msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "„სისტემის პარამეტრის გამოყენება“ Windows-ის პარამეტრებში „ანიმაციის ეფექტებს“ მიჰყვება. სადაც MailCraft სისტემის პარამეტრს ჯერ ვერ კითხულობს, ანიმაციები ეშვება, სანამ „არასოდეს გაშვებას“ არ აირჩევთ." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "სანაცვლოდ თქვენი საკუთარი იდენტობის პროვაიდერის გამოყენება…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21102,6 +21420,12 @@ msgstr "გაგზავნამდე მოცდა" msgid "Wait for the other attachment preview to finish." msgstr "დაელოდეთ, სანამ სხვა დანართის წინასწარი ნახვა დასრულდება." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "დაელოდეთ თქვენი იდენტობის პროვაიდერის მისამართებს" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21120,6 +21444,12 @@ msgstr "MailCraft-ის Google-ში რეგისტრაციის მ msgid "Waiting for the approval stopped unexpectedly" msgstr "დამტკიცების მოლოდინი მოულოდნელად შეწყდა" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "სისტემის ავტორიზაციის მონაცემების საცავის მოლოდინი…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21781,6 +22111,12 @@ msgstr "თქვენი სერტიფიკატები და გა msgid "Your data was removed" msgstr "თქვენი მონაცემები წაიშალა" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "თქვენი დომენი შესასვლელად {issuer}-ს ასახელებს." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -21995,6 +22331,12 @@ msgstr "თქვენი ორგანიზაციის წესებ msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "თქვენს საკუთარ სერტიფიკატებსა და გასაღებებს MailCraft-ის სამაგიდო პროგრამა იყენებს: აქ ციფრული ხელმოწერები მოწმდება, ხელმოწერა ან გაშიფვრა კი არ ხდება." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "თქვენი საკუთარი იდენტობის პროვაიდერი" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22375,6 +22717,36 @@ msgstr "საერთო საფოსტო ყუთის მისამ msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "საერთო საფოსტო ყუთის წესები მისი საკუთარია: ეს ვერსია მათ არ ქმნის" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "იდენტობის პროვაიდერით შესვლა არასოდეს იგზავნება Microsoft-ის ან Google-ის საფოსტო სერვერებზე" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "იდენტობის პროვაიდერით შესვლა ამ კომპიუტერის საფოსტო სერვერზე მხოლოდ ტესტისას იგზავნება" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "იდენტობის პროვაიდერით შესვლა გამოიყენება მხოლოდ ამ ანგარიშის საკუთარ საფოსტო სერვერებთან" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "საკუთარი იდენტობის პროვაიდერით შესვლა მხოლოდ ფოსტისთვისაა და არა Microsoft Graph-ისთვის" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "{provider}-ით შესვლა ბრუნდება მხოლოდ loopback პორტით" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22399,6 +22771,12 @@ msgstr "ხელმოწერის სურათები არის PNG msgid "a task needs a title" msgstr "დავალებას სათაური სჭირდება" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "შესვლის გვერდზე წვდომა უარყოფილ იქნა" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22640,6 +23018,12 @@ msgstr "დაკოპირება: {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "სერვერთან {host} უსაფრთხო კავშირი ვერ დამყარდა: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "ამ კომპიუტერზე ვერ გაიხსნა პორტი, რომელზეც შესვლა დაბრუნდება" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22676,6 +23060,18 @@ msgstr "შესასვლელად შეიყვანეთ პარ msgid "enter a user name to sign in" msgstr "შესასვლელად შეიყვანეთ მომხმარებლის სახელი" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "შეიყვანეთ კლიენტის ID, რომელიც თქვენს იდენტობის პროვაიდერთან MailCraft-ისთვისაა დარეგისტრირებული" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "შეიყვანეთ თქვენი იდენტობის პროვაიდერის მისამართი (მისი გამცემი)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22688,6 +23084,12 @@ msgstr "ყველა დომენიდან @{domain}" msgid "expected and replacement must be on one line" msgstr "მოსალოდნელი და ჩამნაცვლებელი ტექსტი ერთ ხაზზე უნდა იყოს" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "იპოვეთ თქვენი იდენტობის პროვაიდერის შესვლის მისამართები („აღმოჩენა“) ან შეიყვანეთ ისინი" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23732,6 +24134,12 @@ msgstr "პირადი" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "ინტერნეტიდან სურათები არ ჩამოიტვირთება: შეინახეთ სურათი და დაამატეთ ფაილიდან" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "ამ კომპიუტერზე პორტი {port} დაკავებულია: აირჩიეთ სხვა გადამისამართების პორტი ან ავტომატური" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23786,6 +24194,12 @@ msgstr "ადრესატის მისამართი შეიცა msgid "replies can go to at most {n} addresses" msgstr "პასუხი მაქსიმუმ {n} მისამართზე შეიძლება გაიგზავნოს" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "გაუქმების" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -23928,6 +24342,12 @@ msgstr "ჯერ შედით ანგარიშში" msgid "sign in to {who} first" msgstr "ჯერ შედით ანგარიშში {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "შესვლის" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24059,6 +24479,12 @@ msgstr "ეს წერილი აქ არ არის" msgid "that message isn't waiting in the Outbox" msgstr "ეს წერილი „გასაგზავნებში“ არ ელოდება" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "ამ გადამისამართების პორტის გამოყენება შეუძლებელია: აირჩიეთ სხვა ან ავტომატური" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24257,6 +24683,18 @@ msgstr "შეცვლილი შემთხვევა აღარ არ msgid "the check stopped unexpectedly" msgstr "შემოწმება მოულოდნელად შეწყდა" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "კლიენტის ID შეიძლება შეიცავდეს მხოლოდ ასოებს, ციფრებს და პუნქტუაციის ნიშნებს, არაუმეტეს 200-ისა" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "კლიენტის საიდუმლო შეიძლება შეიცავდეს მხოლოდ ასოებს, ციფრებს და პუნქტუაციას" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24417,6 +24855,90 @@ msgstr "საქაღალდე, რომელშიც ეს წერ msgid "the folder was numbered anew while it was being read" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "იდენტობის პროვაიდერის (გამცემის) მისამართი არ შეიძლება შეიცავდეს მოთხოვნას ან ფრაგმენტს" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "იდენტობის პროვაიდერი ჩვეულ მისამართებზე თავს არ აღწერს: შეიყვანეთ მისი შესვლის მისამართები" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "იდენტობის პროვაიდერმა თავისი აღწერა ზედმეტად ბევრი გადამისამართებით გადააგზავნა" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "იდენტობის პროვაიდერმა თავისი აღწერა გადააგზავნა ამ კომპიუტერზე, პირად ქსელში ან https-ის გარეშე მდებარე მისამართზე" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "იდენტობის პროვაიდერის მისამართი არ შეიძლება შეიცავდეს მოთხოვნას ან ფრაგმენტს" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "იდენტობის პროვაიდერის მისამართი {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "იდენტობის პროვაიდერის აღწერის მიღება ვერ მოხერხდა: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "იდენტობის პროვაიდერის აღწერა ასახელებს {what} მისამართს, რომელიც {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "იდენტობის პროვაიდერის აღწერა არ ასახელებს {what} მისამართს" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "იდენტობის პროვაიდერის აღწერა ზედმეტად გრძელია" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "იდენტობის პროვაიდერის აღწერა არ არის მოსალოდნელი JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "იდენტობის პროვაიდერის აღწერა ასახელებს სხვა გამცემს, ვიდრე შეყვანილი მისამართია: შეამოწმეთ მისამართი სიმბოლო სიმბოლოდ" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "იდენტობის პროვაიდერის აღწერის მიხედვით, ის თავის გვერდზე არავის არ ასვლევინებს (ავტორიზაციის კოდი)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "იდენტობის პროვაიდერის აღწერის მიხედვით, ის არ იღებს დაცულ შესვლას (PKCE S256-ით), რომელსაც MailCraft იყენებს" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24435,6 +24957,12 @@ msgstr "იმპორტს ფოსტის ჩასადები სა msgid "the import was stopped" msgstr "იმპორტი შეწყდა" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "ზემოთ მითითებული შემომავალი და გამავალი სერვერები" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24459,6 +24987,12 @@ msgstr "ბოლო კალენდრის წაშლა შეუძლ msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "სია აჩვენებს ყველა ანგარიშის საქაღალდეს: გახსენით ერთი ანგარიშის საქაღალდე ან დაასახელეთ საქაღალდე" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "საფოსტო სერვერის სახელის გაგზავნა შესვლასთან ერთად შეუძლებელია" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24597,6 +25131,12 @@ msgstr "პლატფორმამ უარი თქვა ან შე msgid "the proposed end is not after the proposed start" msgstr "შემოთავაზებული დასასრული შემოთავაზებული დასაწყისის შემდეგ არ არის" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "გადამისამართების პორტი უნდა იყოს 1-სა და 65535-ს შორის, ან ავტომატური" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24621,6 +25161,12 @@ msgstr "შედეგის გამო ეს ანგარიში ი msgid "the result {why}" msgstr "შედეგი {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "გაუქმების მისამართი {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24837,6 +25383,18 @@ msgstr "სერვერი STARTTLS-ს არ გვთავაზობს msgid "the server doesn't take a password on this connection" msgstr "სერვერი ამ კავშირზე პაროლს არ იღებს" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "სერვერი არ იღებს ტოკენს OAUTHBEARER-ით, რასაც ამ ანგარიშის OAuth-ის პარამეტრები ითხოვს" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "სერვერი არ იღებს ტოკენს XOAUTH2-ით, რასაც ამ ანგარიშის OAuth-ის პარამეტრები ითხოვს" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24885,6 +25443,12 @@ msgstr "სერვერი პაროლით შესვლის სა msgid "the server offers no way to sign in with an access token" msgstr "სერვერი წვდომის ტოკენით შესვლის საშუალებას არ გვთავაზობს" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "სერვერი არ გვთავაზობს წვდომის ტოკენით შესვლის საშუალებას (არც OAUTHBEARER, არც XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25023,6 +25587,18 @@ msgstr "სერვერის პასუხი ზედმეტად ღ msgid "the server's response is too long" msgstr "სერვერის პასუხი ზედმეტად გრძელია" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "შესვლა დაბრუნდა სხვა იდენტობის პროვაიდერისგან, ვიდრე მოთხოვნილი იყო: მისგან არაფერი იქნა გამოყენებული" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "შესვლა დაბრუნდა თქვენი იდენტობის პროვაიდერის სახელის გარეშე, რომელსაც, მისივე თქმით, ყოველთვის აძლევს: მისგან არაფერი იქნა გამოყენებული" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25083,13 +25659,13 @@ msgid "the top level" msgstr "ზედა დონე" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "მომხმარებლის სახელში ან წვდომის ტოკენში ისეთი სიმბოლოა, რომლის გაგზავნაც შეუძლებელია" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "მომხმარებლის სახელი ან წვდომის ტოკენი გასაგზავნად ზედმეტად გრძელია" @@ -25167,7 +25743,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "ხელმოწერა სახელით „{to}“ უკვე არსებობს" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "შესასვლელად წვდომის ტოკენი არ არის" @@ -25184,6 +25760,12 @@ msgstr "ანგარიში არ არის" msgid "there is no account to remove" msgstr "წასაშლელი ანგარიში არ არის" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "განსაახლებელი წინა შესვლა არ არსებობს" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25256,6 +25838,12 @@ msgstr "ეს „გაგზავნა/მიღება“ სხვა msgid "this Send/Receive was for the server {name} named before" msgstr "ეს „გაგზავნა/მიღება“ იყო სერვერისთვის, რომელსაც {name} ადრე ასახელებდა" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "ეს ანგარიში არ შედის თქვენი საკუთარი იდენტობის პროვაიდერით" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25478,6 +26066,12 @@ msgstr "ადრესატები: {people}" msgid "to {recipient}" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "ტოკენის" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25508,6 +26102,12 @@ msgstr "აკრიფეთ მისამართი, მაგალით msgid "unexpected server response: {reason}" msgstr "სერვერის მოულოდნელი პასუხი: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "ტენანტად გამოიყენეთ common, consumers, organizations, ან დირექტორიის ID ან დომენი" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25667,6 +26267,54 @@ msgstr "სხვა მომხმარებლით შეხვედი msgid "you@example.org" msgstr "you@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "თქვენი იდენტობის პროვაიდერი" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "თქვენმა იდენტობის პროვაიდერმა უპასუხა სტატუსით {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "თქვენს იდენტობის პროვაიდერს ახლა ვერავის შეყვანა არ შეუძლია: სცადეთ მოგვიანებით" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "თქვენმა იდენტობის პროვაიდერმა არ იცის ეს კლიენტის ID ან მისი საიდუმლო: შეამოწმეთ OAuth-ის პარამეტრები" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "თქვენი იდენტობის პროვაიდერი ამ შესვლას აღარ იღებს: შედით ხელახლა" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "თქვენმა იდენტობის პროვაიდერმა შესვლა უარყო" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "თქვენი იდენტობის პროვაიდერი არ იძლევა მოთხოვნილს: შეამოწმეთ დამატებითი არეები OAuth-ის პარამეტრებში" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "თქვენი იდენტობის პროვაიდერის მისამართები უნდა იწყებოდეს https://-ით" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25861,6 +26509,12 @@ msgstr "{days} (მთელი დღე)" msgid "{day} at {time}" msgstr "{day}, {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} აცხადებს, რომ მისი ფოსტა იდენტობის პროვაიდერით შედის (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/messages.pot b/crates/i18n/po/messages.pot index 0e57e5e429..0ff7fc69de 100644 --- a/crates/i18n/po/messages.pot +++ b/crates/i18n/po/messages.pot @@ -678,6 +678,11 @@ msgstr "" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs msgid "A web address, an email address, a phone number (tel:) or another address such as ms-settings:network-vpn. With nothing selected, the address is put in as it is." @@ -1138,6 +1143,11 @@ msgstr "" msgid "Agenda" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1513,7 +1523,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "" #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs msgid "Application (client) ID" msgstr "" @@ -1834,6 +1844,11 @@ msgstr "" msgid "Asked first" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Asked for besides openid email offline_access" +msgstr "" + #. interface #: crates/ui-egui/src/scheduling.rs msgid "Asking about other people's time stopped unexpectedly" @@ -2009,10 +2024,15 @@ msgid "AutoArchive" msgstr "" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs msgid "Automatic" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "" + #. interface #: crates/ui-egui/src/backstage.rs msgid "Automatic (the language's)" @@ -3049,6 +3069,21 @@ msgstr "" msgid "Click to select {name}; double-click to open it" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Client ID" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Client secret (optional)" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Client secret sent" +msgstr "" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs msgid "Clipboard" @@ -4099,6 +4134,11 @@ msgstr "" msgid "Discard" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Discover" +msgstr "" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs msgid "Dismiss" @@ -4907,6 +4947,11 @@ msgstr "" msgid "External" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Extra scopes" +msgstr "" + #. interface #: crates/ui-egui/src/calendar_sync.rs msgid "FAILED" @@ -5039,11 +5084,26 @@ msgstr "" msgid "Find next spelling error" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "" + #. interface #: crates/ui-egui/src/find_replace.rs msgid "Find what" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Finding the addresses stopped unexpectedly" +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "Finding your account settings…" @@ -5310,6 +5370,11 @@ msgstr "" msgid "Forget Trusted Certificate" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Forget the client secret" +msgstr "" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs msgid "Forget the pictures that are kept; they are downloaded again when you ask." @@ -5401,6 +5466,11 @@ msgid_plural "Found {n} folders" msgstr[0] "" msgstr[1] "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "" + #. name #: crates/model/src/calendar.rs msgid "Free" @@ -5694,6 +5764,11 @@ msgstr "" msgid "Google" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Google (built in)" +msgstr "" + #. command label #: crates/ui-egui/src/lib.rs msgid "Google Desktop Application ID" @@ -6032,6 +6107,11 @@ msgstr "" msgid "How many messages each folder holds and the space they take" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "I trust these addresses" +msgstr "" + #. command label #: crates/ui-egui/src/lib.rs msgid "I'm an Administrator: Approve MailCraft for My Organisation" @@ -6047,6 +6127,16 @@ msgstr "" msgid "Icons" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Identity provider" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Identity provider (issuer)" +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/help.rs msgid "If Google says the app is in testing, ask the developer to add your email as a test user. If your organization blocks MailCraft, ask its Workspace administrator. Those pages may not return here: cancel, then retry when access is granted or use an app password if allowed." @@ -6097,6 +6187,11 @@ msgstr "" msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup.rs +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "If you go on, your user name and password are sent to {hosts}. Go on only if you know it is your provider's." @@ -6344,6 +6439,11 @@ msgstr "" msgid "In line with text" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "In the Authorization header (client_secret_basic)" +msgstr "" + #. interface #: crates/ui-egui/src/lib.rs msgid "In the Outbox: it is on its way" @@ -6359,6 +6459,11 @@ msgstr "" msgid "In the folder pane's order" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "In the form (client_secret_post)" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs msgid "In the message" @@ -6574,6 +6679,11 @@ msgstr "" msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "It is an identifier, not a secret. MailCraft keeps it in its settings (File › Options)." @@ -6866,6 +6976,11 @@ msgstr "" msgid "Keep on the server of {address}" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Keep the built-in settings" +msgstr "" + #. interface #: crates/ui-egui/src/import_pst.rs msgid "Keep the notes and journal entries" @@ -6936,6 +7051,11 @@ msgstr "" msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "" + #. interface #: crates/ui-egui/src/backstage.rs msgid "Kept in {path}, saved as you go." @@ -6966,6 +7086,11 @@ msgstr "" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Kept: type a new one to replace it" +msgstr "" + #. interface #: crates/ui-egui/src/reading/signature.rs msgid "Key made:" @@ -7847,6 +7972,11 @@ msgstr "" msgid "May" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Mechanism" +msgstr "" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs msgid "Meeting" @@ -8013,6 +8143,11 @@ msgstr "" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "" + #. command label #: crates/ui-egui/src/lib.rs msgid "Microsoft Application ID" @@ -8945,6 +9080,11 @@ msgstr "" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "No addresses found: {reason}" +msgstr "" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs msgid "No app on this phone can open that file." @@ -9655,6 +9795,16 @@ msgstr "" msgid "Numbering" msgstr "" +#. command label +#: crates/engine/src/cmd/account.rs +msgid "OAuth Built-in Settings" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "OAuth settings" +msgstr "" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs msgid "OK" @@ -9865,6 +10015,11 @@ msgstr "" msgid "Only if nobody replies" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Only if your provider gave one" +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "Only keep your custom-domain address if both addresses are aliases of the same Microsoft mailbox." @@ -11155,6 +11310,11 @@ msgstr "" msgid "Red category" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Redirect port" +msgstr "" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs msgid "Redo" @@ -11180,6 +11340,11 @@ msgstr "" msgid "Refresh Your Certificates and Keys" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "" + #. ribbon #: crates/ui-egui/src/ribbon.rs msgid "Related" @@ -11500,6 +11665,11 @@ msgstr "" msgid "Renewing the sign-in…" msgstr "" +#. interface +#: crates/ui-egui/src/lib.rs +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs msgid "Repeats" @@ -11676,6 +11846,11 @@ msgstr "" msgid "Restart to update is the owner's click." msgstr "" +#. command label +#: crates/engine/src/cmd/account.rs +msgid "Restore Default OAuth Settings" +msgstr "" + #. interface #: crates/ui-egui/src/attachment_preview.rs msgid "Restore attachment preview warnings" @@ -11728,6 +11903,11 @@ msgstr "" msgid "Review certificate…" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Revocation address (optional)" +msgstr "" + #. interface #: crates/ui-egui/src/reading/signature.rs msgid "Revocation not checked." @@ -12172,6 +12352,11 @@ msgstr "" msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Scopes" +msgstr "" + #. ribbon #: crates/ui-egui/src/ribbon.rs msgid "Screenshot" @@ -12594,7 +12779,7 @@ msgid "Send your password to another server?" msgstr "" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs msgid "Send your sign-in to another server?" msgstr "" @@ -13401,6 +13586,16 @@ msgstr "" msgid "Sign in with Send/Receive to see when other people are busy." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup.rs +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Sign-in address" +msgstr "" + #. interface #: crates/ui-egui/src/lib.rs msgid "Sign-in cancelled" @@ -14152,7 +14347,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "" #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs msgid "Tenant" msgstr "" @@ -14751,6 +14946,21 @@ msgstr "" msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "The client secret can only be letters, digits and punctuation" +msgstr "" + +#. interface +#: crates/ui-egui/src/lib.rs +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "The connection test only checks that this server answers. If it does want a sign-in, the first message you send says so." @@ -15219,10 +15429,15 @@ msgid "The notes are too long to edit here." msgstr "" #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs msgid "The one in File › Options" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "The one registered for MailCraft" +msgstr "" + #. interface #: crates/ui-egui/src/backstage.rs msgid "The one this build came with" @@ -15313,6 +15528,11 @@ msgstr "" msgid "The range needs a day to start on" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "" + #. interface #: crates/ui-egui/src/report_problem.rs msgid "The report service couldn't be reached. Check that you're online and try again, or open it on GitHub." @@ -15705,6 +15925,11 @@ msgstr "" msgid "The sign-in didn't work. Try again." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "The sign-in is only sent to: {servers}" +msgstr "" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs msgid "The sign-in of the account this shared mailbox is opened through was refused: sign in again with Send/Receive" @@ -15940,6 +16165,11 @@ msgstr "" msgid "Thesaurus" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "" + #. interface #: crates/ui-egui/src/dialogs.rs msgid "These are meetings somebody else organizes; you are invited to them. Deleting them takes them out of your calendar only, and the organizer is not told that you won't come. Declining them tells the organizer, if you choose." @@ -15965,6 +16195,11 @@ msgstr "" msgid "These could not be removed. Remove them yourself:" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "" + #. interface #: crates/ui-egui/src/task_sync.rs msgid "These tasks exist only on this computer. Choose the Microsoft account whose To Do gets them. Until you choose, they stay here and nothing of them is sent." @@ -16982,6 +17217,11 @@ msgid "" "Until you allow it, nothing of those mailboxes and calendars is read, mail and meeting answers from a shared mailbox wait on this computer, and nothing is sent from your own address in their place." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "To switch, first save Google's standard IMAP and SMTP servers and an email-matching user name." @@ -17017,6 +17257,11 @@ msgstr "" msgid "Today could not be read." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Token address" +msgstr "" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs msgid "Tomorrow" @@ -17427,6 +17672,11 @@ msgstr "" msgid "Use a Google app password, not your everyday Google account password." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup.rs +msgid "Use a password instead" +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs msgid "Use an app password" @@ -17442,6 +17692,16 @@ msgstr "" msgid "Use https:// instead" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Use it" +msgstr "" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Use my own identity provider" +msgstr "" + #. interface #: crates/ui-egui/src/calendar_view.rs msgid "Use my own working hours" @@ -17457,6 +17717,11 @@ msgstr "" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Use your own identity provider instead…" +msgstr "" + #. interface #: crates/ui-egui/src/account_setup.rs msgid "Use {address}" @@ -17577,6 +17842,11 @@ msgstr "" msgid "Wait for the other attachment preview to finish." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Wait for your identity provider's addresses" +msgstr "" + #. interface #: crates/ui-egui/src/sync_panel.rs msgid "Waiting" @@ -17592,6 +17862,11 @@ msgstr "" msgid "Waiting for the approval stopped unexpectedly" msgstr "" +#. interface +#: crates/ui-egui/src/lib.rs +msgid "Waiting for the system's credential store…" +msgstr "" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs msgid "Waiting for your permission to change this account's contacts on its server: File › Info › Ask again" @@ -18140,6 +18415,11 @@ msgstr "" msgid "Your data was removed" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Your domain names {issuer} for signing in." +msgstr "" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs msgid "Your domain's DNS couldn't be asked. Check the network connection and search again." @@ -18320,6 +18600,11 @@ msgstr "" msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "Your own identity provider" +msgstr "" + #. interface #: crates/ui-egui/src/security.rs msgid "Your own key is removed only by you, in the window" @@ -18640,6 +18925,31 @@ msgstr "" msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "" + #. why a command can't run #: crates/engine/src/cmd/picture.rs msgid "a signature is open: add its pictures with signature.picture.add" @@ -18660,6 +18970,11 @@ msgstr "" msgid "a task needs a title" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "access was refused on the sign-in page" +msgstr "" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs msgid "add an Exchange server account first: its organisation's address list is searched" @@ -18862,6 +19177,11 @@ msgstr "" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "" + #. why a mail server couldn't be used #: crates/net/src/lib.rs msgid "couldn't reach {host}: {reason}" @@ -18892,6 +19212,16 @@ msgstr "" msgid "enter a user name to sign in" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "enter your identity provider's address (its issuer)" +msgstr "" + #. interface #: crates/ui-egui/src/reading/remote.rs msgid "everybody at @{domain}" @@ -18902,6 +19232,11 @@ msgstr "" msgid "expected and replacement must be on one line" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "" + #. interface #: crates/ui-egui/src/forms.rs msgid "flag it" @@ -19775,6 +20110,11 @@ msgstr "" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "" + #. interface #: crates/ui-egui/src/forms.rs msgid "private" @@ -19820,6 +20160,11 @@ msgstr "" msgid "replies can go to at most {n} addresses" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "revocation" +msgstr "" + #. name #: crates/engine/src/agent.rs msgid "safe" @@ -19939,6 +20284,11 @@ msgstr "" msgid "sign in to {who} first" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "sign-in" +msgstr "" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs msgid "sign-in failed: {reason}" @@ -20049,6 +20399,11 @@ msgstr "" msgid "that message isn't waiting in the Outbox" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs msgid "that series has no day to select" @@ -20214,6 +20569,16 @@ msgstr "" msgid "the check stopped unexpectedly" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "the client secret can only be letters, digits and punctuation" +msgstr "" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs msgid "the command was refused" @@ -20349,6 +20714,76 @@ msgstr "" msgid "the folder was numbered anew while it was being read" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider sent its description on through too many redirects" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's address can't have a query or a fragment" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's address {why}" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description has no {what} address" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description is too long" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description isn't the JSON it should be" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "" + #. what a command says #: crates/engine/src/import_pst.rs msgid "the import couldn't account for every item of {path}" @@ -20364,6 +20799,11 @@ msgstr "" msgid "the import was stopped" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +msgid "the incoming and outgoing servers above" +msgstr "" + #. what a command says #: crates/engine/src/cmd/keys.rs msgid "the key is larger than a contact's card keeps one" @@ -20384,6 +20824,11 @@ msgstr "" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +msgid "the mail server's name can't be sent with a sign-in" +msgstr "" + #. what a command says #: crates/engine/src/cmd/file.rs msgid "the mailbox couldn't be saved first, so it stays open ({e})" @@ -20499,6 +20944,11 @@ msgstr "" msgid "the proposed end is not after the proposed start" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "" + #. what a command says #: crates/model/src/mailbox_followup.rs msgid "the reminder time must be in the future" @@ -20519,6 +20969,11 @@ msgstr "" msgid "the result {why}" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "the revocation address {why}" +msgstr "" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs msgid "the same calendar item is named twice; nothing was changed" @@ -20699,6 +21154,16 @@ msgstr "" msgid "the server doesn't take a password on this connection" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs msgid "the server ended the command early" @@ -20739,6 +21204,11 @@ msgstr "" msgid "the server offers no way to sign in with an access token" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "" + #. why a mail server couldn't be used #: crates/net/src/transport.rs msgid "the server offers only older encryption (CBC suites) that MailCraft doesn't use; its administrator can turn on the AES-GCM suites" @@ -20854,6 +21324,16 @@ msgstr "" msgid "the server's response is too long" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "" + #. what a command says #: crates/engine/src/cmd/signature.rs msgid "the signature has changes: save it, or close it with discard" @@ -20905,12 +21385,12 @@ msgid "the top level" msgstr "" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs msgid "the user name or access token has a character that can't be sent" msgstr "" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs msgid "the user name or access token is too long to be sent" msgstr "" @@ -20975,7 +21455,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs msgid "there is no access token to sign in with" msgstr "" @@ -20989,6 +21469,11 @@ msgstr "" msgid "there is no account to remove" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "there is no earlier sign-in to renew" +msgstr "" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs msgid "there is no free name for a local folder" @@ -21049,6 +21534,11 @@ msgstr "" msgid "this Send/Receive was for the server {name} named before" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "this account doesn't sign in with your own identity provider" +msgstr "" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs msgid "this account has no Drafts folder" @@ -21238,6 +21728,11 @@ msgstr "" msgid "to {recipient}" msgstr "" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +msgid "token" +msgstr "" + #. what a command says #: crates/engine/src/cmd/tasks.rs msgid "too many deletions are waiting to be sent to Microsoft To Do; wait for them to go first" @@ -21263,6 +21758,11 @@ msgstr "" msgid "unexpected server response: {reason}" msgstr "" +#. what a command says +#: crates/model/src/oauth.rs +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "" + #. interface #: crates/ui-egui/src/security.rs msgid "valid until {date}" @@ -21398,6 +21898,46 @@ msgstr "" msgid "you@example.org" msgstr "" +#. name +#: crates/model/src/mailbox.rs +msgid "your identity provider" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider answered with status {status}" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider refused the sign-in" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +msgid "your identity provider's addresses must start with https://" +msgstr "" + #. interface #: crates/ui-egui/src/graph_switch.rs msgid "{account} couldn't switch to Microsoft Graph: {why}" @@ -21560,6 +22100,11 @@ msgstr "" msgid "{day} at {time}" msgstr "" +#. interface +#: crates/ui-egui/src/account_setup.rs +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "" + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs msgid "{done} of {total}" diff --git a/crates/i18n/po/nl.po b/crates/i18n/po/nl.po index d4ba4463d5..2076c180cb 100644 --- a/crates/i18n/po/nl.po +++ b/crates/i18n/po/nl.po @@ -810,6 +810,12 @@ msgstr "Een gedeelde postbus, gelezen met de aanmelding van {account}" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Een korte notitie met de link naar die pagina, om in e-mail of chat te plakken. MailCraft verstuurt zelf niets." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Een aanmelding bij uw eigen identiteitsprovider wordt nooit naar de mailservers van Microsoft of Google gestuurd: vervang de servers hierboven door uw eigen servers." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1341,6 +1347,12 @@ msgstr "Nadat u een vergaderverzoek in de e-mail hebt geaccepteerd, voorlopig he msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Ga akkoord met de adressen buiten het domein van uw identiteitsprovider, of voer andere in" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1778,7 +1790,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Alles wat nog naar de server moet, gaat eerst: e-mail in Postvak UIT, en markeringen en verplaatsingen die u hebt gemaakt terwijl u offline was. Als MailCraft de server niet kan bereiken, wacht de overstap tot dat wel kan." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "Toepassings-id (client)" @@ -2135,6 +2147,12 @@ msgstr "Laten weten wanneer het bericht is gelezen" msgid "Asked first" msgstr "Eerst gevraagd" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Aangevraagd naast openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2339,11 +2357,17 @@ msgid "AutoArchive" msgstr "AutoArchive" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automatisch" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automatisch (OAUTHBEARER, anders XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3554,6 +3578,24 @@ msgstr "Markering wissen" msgid "Click to select {name}; double-click to open it" msgstr "Klik om {name} te selecteren; dubbelklik om het te openen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "Client-id" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Clientgeheim (optioneel)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Verzending van clientgeheim" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs msgid "Clipboard" @@ -4763,6 +4805,12 @@ msgstr "Antwoorden rechtstreeks naar" msgid "Discard" msgstr "Verwerpen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Detecteren" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5696,6 +5744,12 @@ msgstr "Exporteren…" msgid "External" msgstr "Extern" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Extra bereiken" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -5844,12 +5898,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Volgende spelfout zoeken" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Zoekt de aanmeld- en tokenadressen op aan de hand van het adres van de identiteitsprovider. Alleen dat adres wordt verzonden." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Zoeken naar" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Zoek de adressen van uw identiteitsprovider op met Detecteren, of voer ze in" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "Het zoeken naar de adressen is onverwacht gestopt" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6154,6 +6226,12 @@ msgstr "Gedownloade agenda en contactpersonen vergeten" msgid "Forget Trusted Certificate" msgstr "Vertrouwd certificaat vergeten" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Clientgeheim vergeten" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6254,6 +6332,12 @@ msgid_plural "Found {n} folders" msgstr[0] "{n} map gevonden" msgstr[1] "{n} mappen gevonden" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Gevonden: aanmelden bij {signIn}, tokens van {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6594,6 +6678,12 @@ msgstr "Goud" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (ingebouwd)" + #. command label #: crates/ui-egui/src/lib.rs msgid "Google Desktop Application ID" @@ -6999,6 +7089,12 @@ msgstr "Hoe het terugkeert, is aan de organisator." msgid "How many messages each folder holds and the space they take" msgstr "Hoeveel berichten elke map bevat en hoeveel ruimte ze innemen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Ik vertrouw deze adressen" + #. command label #: crates/ui-egui/src/lib.rs msgid "I'm an Administrator: Approve MailCraft for My Organisation" @@ -7015,6 +7111,18 @@ msgstr "Ik ben beheerder: het voor mijn organisatie goedkeuren" msgid "Icons" msgstr "Pictogrammen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Identiteitsprovider" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Identiteitsprovider (uitgever)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7075,6 +7183,12 @@ msgstr "Als u dat niet doet, wordt er niets naartoe verzonden, en het zoeken gaa msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Als u dat niet doet, wordt er niets verzonden en kunt u de servers wijzigen in Serverinstellingen." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Als u doorgaat, meldt u zich aan op de pagina van uw identiteitsprovider en wordt het toegangstoken dat deze uitgeeft naar {hosts} verzonden. Ga alleen door als u weet dat dit van uw provider is." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7367,6 +7481,12 @@ msgstr "In een bericht met tekst zonder opmaak" msgid "In line with text" msgstr "In de tekstregel" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "In de Authorization-header (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7385,6 +7505,12 @@ msgstr "In het Postvak UIT: het wacht op zijn tijd" msgid "In the folder pane's order" msgstr "In de volgorde van het mappenvenster" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "In het formulier (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7631,6 +7757,12 @@ msgstr "Hij gaat naar de server zodra MailCraft de regels van de server mag wijz msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Het gaat mee met de volgende Verzenden/ontvangen; daarna haalt de lijst u eraf." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Deze geeft geen vernieuwingstokens uit: u wordt telkens opnieuw gevraagd zich aan te melden wanneer een aanmelding verloopt." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7973,6 +8105,12 @@ msgstr "E-mail van de afgelopen bewaren" msgid "Keep on the server of {address}" msgstr "Op de server van {address} bewaren" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Ingebouwde instellingen behouden" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8057,6 +8195,12 @@ msgstr "Bewaard in de referentieopslag van het systeem, nooit in het postvak of msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Bewaard in de opslag van deze browser, opgeslagen terwijl u werkt. Gebruik Openen & exporteren om een kopie als bestand te bewaren." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Bewaard in de referentieopslag van uw systeem, nooit in het postvak. Een desktopprogramma kan het niet echt voor u geheimhouden." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8093,6 +8237,12 @@ msgstr "Alleen op deze computer bewaard" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Alleen op deze computer bewaard: uitnodigingen en terugkerende gebeurtenissen worden nog niet naar de server verzonden" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Bewaard: typ een nieuw om het te vervangen" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9122,6 +9272,12 @@ msgstr "Identieke hoofdletters/kleine letters" msgid "May" msgstr "mei" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mechanisme" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs msgid "Meeting" @@ -9313,6 +9469,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "E-mail van Microsoft 365 wordt toegevoegd als een Microsoft-account: u meldt zich aan op de eigen pagina van Microsoft in uw browser, en MailCraft ziet uw wachtwoord nooit." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 of Outlook.com (ingebouwd)" + #. command label #: crates/ui-egui/src/lib.rs msgid "Microsoft Application ID" @@ -10401,6 +10563,12 @@ msgstr "Nog geen account: Bestand › Account toevoegen" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Nog geen server van een account bewaart hier een agenda, dus er is nergens om deze naartoe te verplaatsen." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Geen adressen gevonden: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11247,6 +11415,18 @@ msgstr "Genummerde lijst" msgid "Numbering" msgstr "Nummering" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Ingebouwde OAuth-instellingen" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "OAuth-instellingen" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11497,6 +11677,12 @@ msgstr "Alleen deze keer, en verzenden" msgid "Only if nobody replies" msgstr "Alleen als niemand antwoordt" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Alleen als uw provider er een heeft gegeven" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13006,6 +13192,12 @@ msgstr "Terugkeerpatroon" msgid "Red category" msgstr "Rode categorie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Omleidingspoort" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs msgid "Redo" @@ -13034,6 +13226,12 @@ msgstr "Vernieuwen" msgid "Refresh Your Certificates and Keys" msgstr "Uw certificaten en sleutels vernieuwen" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Registreer http://127.0.0.1 met een willekeurige poort (of de poort hierboven) als omleidingsadres." + #. ribbon #: crates/ui-egui/src/ribbon.rs msgid "Related" @@ -13404,6 +13602,12 @@ msgstr "Categorie wordt hernoemd op de server: {done} van {total} berichten" msgid "Renewing the sign-in…" msgstr "Bezig met vernieuwen van de aanmelding…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "De aanmelding wordt vernieuwd… Als dat niet lukt, meldt u zich aan op de pagina die in uw browser wordt geopend." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -13604,6 +13808,12 @@ msgstr "Opnieuw starten om bij te werken" msgid "Restart to update is the owner's click." msgstr "Opnieuw starten om bij te werken is de klik van de eigenaar." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Standaard-OAuth-instellingen herstellen" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -13665,6 +13875,12 @@ msgstr "Controleren" msgid "Review certificate…" msgstr "Certificaat controleren…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Intrekkingsadres (optioneel)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14184,6 +14400,12 @@ msgstr "Zeg alleen ja als u de agent hierom hebt gevraagd. Tekst in een bericht msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Geeft aan wat u en de beheerder van uw organisatie kunnen doen, en laat een beheerder MailCraft vanaf hier goedkeuren op de pagina van Microsoft." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Bereiken" + #. ribbon #: crates/ui-egui/src/ribbon.rs msgid "Screenshot" @@ -14673,7 +14895,7 @@ msgid "Send your password to another server?" msgstr "Uw wachtwoord naar een andere server verzenden?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Uw aanmelding naar een andere server verzenden?" @@ -15618,6 +15840,18 @@ msgstr "Meld u eerst aan met Verzenden/ontvangen en wijzig daarna uw automatisch msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Meld u aan met Verzenden/ontvangen om te zien wanneer andere personen bezet zijn." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "In plaats daarvan aanmelden met uw identiteitsprovider (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Aanmeldadres" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -16497,7 +16731,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Vertel de makers van MailCraft wat er misging, op GitHub of per e-mail. U controleert het rapport en verzendt het zelf." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Tenant" @@ -17215,6 +17449,24 @@ msgstr "Het certificaat dat de server op {host} toont, is niet het certificaat d msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Het certificaat werd niet uitgegeven door een certificeringsautoriteit die deze computer vertrouwt." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Het clientgeheim mag alleen letters, cijfers en leestekens bevatten" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Het clientgeheim voor {account} is niet op deze computer opgeslagen: voer het opnieuw in bij Accountinstellingen (Bestand › Info)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Het clientgeheim is bewaard voor de instellingen zoals ze waren: voer het opnieuw in om het met deze te gebruiken, anders wordt het bij opslaan vergeten." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -17774,11 +18026,17 @@ msgid "The notes are too long to edit here." msgstr "De notities zijn te lang om hier te bewerken." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Die in Bestand › Opties" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Het id dat voor MailCraft is geregistreerd" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -17887,6 +18145,12 @@ msgstr "Het bereik heeft een einddag nodig" msgid "The range needs a day to start on" msgstr "Het bereik heeft een startdag nodig" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "De omleidingspoort is een getal van 1 tot 65535, of leeg voor een willekeurige vrije poort" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18353,6 +18617,12 @@ msgstr "De aanmelding is niet gelukt." msgid "The sign-in didn't work. Try again." msgstr "De aanmelding werkte niet. Probeer het opnieuw." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "De aanmelding wordt alleen verzonden naar: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -18632,6 +18902,12 @@ msgstr "Er is geen postvak op {address}." msgid "Thesaurus" msgstr "Synoniemenlijst" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Deze adressen liggen buiten het domein van uw identiteitsprovider: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -18662,6 +18938,12 @@ msgstr "Deze contactpersonen kunnen hier niet worden samengevoegd: minder dan tw msgid "These could not be removed. Remove them yourself:" msgstr "Deze konden niet worden verwijderd. Verwijder ze zelf:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Deze instellingen zijn dan niet meer die van {provider}: MailCraft behandelt dit account als een account met uw eigen identiteitsprovider, uitgaande van de bovenstaande waarden, en u meldt zich opnieuw aan." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -19885,6 +20167,12 @@ msgstr "" "\n" "Totdat u het toestaat, wordt er niets van die postvakken en agenda's gelezen, wachten e-mail en antwoorden op vergaderingen uit een gedeeld postvak op deze computer, en wordt er in hun plaats niets vanaf uw eigen adres verzonden." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Om u aan te melden bij uw eigen identiteitsprovider, vervangt u eerst de inkomende en uitgaande server door uw eigen servers: een aanmelding daarvan wordt nooit naar de servers van {provider} gestuurd." + #. interface #: crates/ui-egui/src/account_setup.rs msgid "To switch, first save Google's standard IMAP and SMTP servers and an email-matching user name." @@ -19924,6 +20212,12 @@ msgstr "Vandaag" msgid "Today could not be read." msgstr "Vandaag kon niet worden gelezen." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Tokenadres" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs msgid "Tomorrow" @@ -20405,6 +20699,12 @@ msgstr "YYYY-MM-DD gebruiken" msgid "Use a Google app password, not your everyday Google account password." msgstr "Gebruik een app-wachtwoord van Google, niet uw gebruikelijke wachtwoord van uw Google-account." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "In plaats daarvan een wachtwoord gebruiken" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -20423,6 +20723,18 @@ msgstr "Gebruik in plaats daarvan een app-wachtwoord" msgid "Use https:// instead" msgstr "In plaats daarvan https:// gebruiken" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Gebruiken" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Mijn eigen identiteitsprovider gebruiken" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -20440,6 +20752,12 @@ msgstr "Systeeminstelling gebruiken" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "De systeeminstelling volgt de animatie-instellingen van Windows. In gevallen waar MailCraft de systeeminstelling nog niet kan lezen, worden animaties afgespeeld tot u Nooit afspelen kiest." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "In plaats daarvan uw eigen identiteitsprovider gebruiken…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20581,6 +20899,12 @@ msgstr "Wachten voor verzenden" msgid "Wait for the other attachment preview to finish." msgstr "Wacht tot het andere voorbeeld van een bijlage klaar is." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Wacht op de adressen van uw identiteitsprovider" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -20599,6 +20923,12 @@ msgstr "Wacht op de registratie van MailCraft bij Google" msgid "Waiting for the approval stopped unexpectedly" msgstr "Het wachten op de goedkeuring is onverwacht gestopt" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Wachten op de referentieopslag van het systeem…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21244,6 +21574,12 @@ msgstr "Uw certificaten en sleutels" msgid "Your data was removed" msgstr "Je gegevens zijn verwijderd" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Uw domein noemt {issuer} voor het aanmelden." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs msgid "Your domain's DNS couldn't be asked. Check the network connection and search again." @@ -21457,6 +21793,12 @@ msgstr "De regels van uw organisatie staan dit niet toe voor uw account. Dit is msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "Uw eigen certificaten en sleutels worden gebruikt door het desktopprogramma van MailCraft: hier worden digitale handtekeningen gecontroleerd en wordt niets ondertekend of ontsleuteld." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Uw eigen identiteitsprovider" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -21837,6 +22179,36 @@ msgstr "het adres van een gedeeld postvak kan niet worden gewijzigd: verwijder h msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "de regels van een gedeeld postvak zijn van dat postvak: deze versie maakt ze niet" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "een aanmelding bij uw identiteitsprovider wordt nooit naar de mailservers van Microsoft of Google verzonden" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "een aanmelding bij uw identiteitsprovider wordt alleen in een test naar een mailserver op deze computer verzonden" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "een aanmelding bij uw identiteitsprovider wordt alleen gebruikt met de eigen mailservers van dit account" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "een aanmelding bij uw eigen identiteitsprovider is alleen voor e-mail, niet voor Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "een aanmelding bij {provider} komt alleen terug via een loopbackpoort" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -21861,6 +22233,12 @@ msgstr "de afbeeldingen van een handtekening zijn PNG, JPEG of GIF (veel e-mailp msgid "a task needs a title" msgstr "een taak heeft een titel nodig" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "de toegang is geweigerd op de aanmeldpagina" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22102,6 +22480,12 @@ msgstr "kopiëren naar {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "er kon geen beveiligde verbinding met {host} worden gemaakt: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "kan geen poort op deze computer openen waarop de aanmelding kan terugkomen" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22138,6 +22522,18 @@ msgstr "voer een wachtwoord in om u aan te melden" msgid "enter a user name to sign in" msgstr "voer een gebruikersnaam in om u aan te melden" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "voer de client-id in die bij uw identiteitsprovider voor MailCraft is geregistreerd" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "voer het adres van uw identiteitsprovider in (de uitgever)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22150,6 +22546,12 @@ msgstr "iedereen bij @{domain}" msgid "expected and replacement must be on one line" msgstr "de te zoeken en de vervangende tekst moeten op één regel staan" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "zoek de aanmeldadressen van uw identiteitsprovider op (Detecteren), of voer ze in" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23194,6 +23596,12 @@ msgstr "persoonlijk" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "afbeeldingen van het web worden niet gedownload: sla de afbeelding op en voeg die toe vanuit het bestand" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "poort {port} op deze computer is in gebruik: kies een andere omleidingspoort, of automatisch" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23248,6 +23656,12 @@ msgstr "het adres van de ontvanger bevat {words}" msgid "replies can go to at most {n} addresses" msgstr "antwoorden kunnen naar hoogstens {n} adressen gaan" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "intrekkings" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -23390,6 +23804,12 @@ msgstr "meld u eerst aan bij het account" msgid "sign in to {who} first" msgstr "meld u eerst aan bij {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "aanmeld" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -23520,6 +23940,12 @@ msgstr "dat bericht is hier niet" msgid "that message isn't waiting in the Outbox" msgstr "dat bericht wacht niet in het Postvak UIT" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "die omleidingspoort kan niet worden gebruikt: kies een andere, of automatisch" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -23717,6 +24143,18 @@ msgstr "het gewijzigde exemplaar is er niet meer" msgid "the check stopped unexpectedly" msgstr "de controle is onverwacht gestopt" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "de client-id mag alleen letters, cijfers en leestekens bevatten, maximaal 200" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "het clientgeheim mag alleen letters, cijfers en leestekens bevatten" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -23879,6 +24317,90 @@ msgstr "de map waarin dit bericht staat, is niet meer op deze computer" msgid "the folder was numbered anew while it was being read" msgstr "de map is tijdens het lezen opnieuw genummerd" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "het adres van de identiteitsprovider (uitgever) mag geen query of fragment bevatten" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "de identiteitsprovider beschrijft zichzelf niet op de gebruikelijke adressen: voer de aanmeldadressen in" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "de identiteitsprovider heeft zijn beschrijving via te veel omleidingen doorgestuurd" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "de identiteitsprovider heeft zijn beschrijving doorgestuurd naar een adres op deze computer, in een privénetwerk of zonder https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "het adres van de identiteitsprovider mag geen query of fragment bevatten" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "het adres van de identiteitsprovider {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "de beschrijving van de identiteitsprovider kon niet worden opgehaald: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "de beschrijving van de identiteitsprovider geeft een {what}adres dat {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "de beschrijving van de identiteitsprovider geeft geen {what}adres" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "de beschrijving van de identiteitsprovider is te lang" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "de beschrijving van de identiteitsprovider is niet de verwachte JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "de beschrijving van de identiteitsprovider noemt een andere uitgever dan het ingevoerde adres: controleer het adres, teken voor teken" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "volgens de beschrijving meldt de identiteitsprovider niemand aan op zijn pagina (autorisatiecode)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "volgens de beschrijving ondersteunt de identiteitsprovider de beveiligde aanmelding (PKCE met S256) die MailCraft gebruikt niet" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -23897,6 +24419,12 @@ msgstr "de import heeft geen map om e-mail in te zetten" msgid "the import was stopped" msgstr "de import werd gestopt" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "de inkomende en uitgaande servers hierboven" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -23921,6 +24449,12 @@ msgstr "de laatste agenda kan niet worden verwijderd" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "de lijst toont de map van elk account: open de map van één account, of noem de map" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "de naam van de mailserver kan niet met een aanmelding worden verzonden" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24055,6 +24589,12 @@ msgstr "het platform weigerde of is mislukt" msgid "the proposed end is not after the proposed start" msgstr "het voorgestelde einde ligt niet na het voorgestelde begin" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "de omleidingspoort moet tussen 1 en 65535 liggen, of automatisch zijn" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24079,6 +24619,12 @@ msgstr "het resultaat zou dit account meer status om bij te houden laten bewaren msgid "the result {why}" msgstr "het resultaat {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "het intrekkingsadres {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24295,6 +24841,18 @@ msgstr "de server biedt geen STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "de server accepteert geen wachtwoord via deze verbinding" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "de server accepteert geen token met OAUTHBEARER, waar de OAuth-instellingen van dit account om vragen" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "de server accepteert geen token met XOAUTH2, waar de OAuth-instellingen van dit account om vragen" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24342,6 +24900,12 @@ msgstr "de server biedt geen manier om met een wachtwoord aan te melden" msgid "the server offers no way to sign in with an access token" msgstr "de server biedt geen manier om met een toegangstoken aan te melden" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "de server biedt geen manier om aan te melden met een toegangstoken (OAUTHBEARER noch XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -24480,6 +25044,18 @@ msgstr "het antwoord van de server is te diep genest" msgid "the server's response is too long" msgstr "het antwoord van de server is te lang" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "de aanmelding kwam terug van een andere identiteitsprovider dan gevraagd: er is niets van gebruikt" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "de aanmelding kwam terug zonder de naam van uw identiteitsprovider, die hij naar eigen zeggen altijd meestuurt: er is niets van gebruikt" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -24541,13 +25117,13 @@ msgid "the top level" msgstr "het bovenste niveau" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "de gebruikersnaam of het toegangstoken bevat een teken dat niet kan worden verzonden" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "de gebruikersnaam of het toegangstoken is te lang om te worden verzonden" @@ -24625,7 +25201,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "er is al een handtekening met de naam „{to}”" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "er is geen toegangstoken om mee aan te melden" @@ -24642,6 +25218,12 @@ msgstr "er is geen account" msgid "there is no account to remove" msgstr "er is geen account om te verwijderen" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "er is geen eerdere aanmelding om te vernieuwen" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -24714,6 +25296,12 @@ msgstr "deze Verzenden/ontvangen was voor een ander account, niet voor {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "deze Verzenden/ontvangen was voor de eerder genoemde server {name}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "dit account meldt zich niet aan bij uw eigen identiteitsprovider" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -24940,6 +25528,12 @@ msgstr "aan {people}" msgid "to {recipient}" msgstr "aan {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "token" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -24970,6 +25564,12 @@ msgstr "typ een adres, zoals naam@example.org, of een domein, zoals @example.org msgid "unexpected server response: {reason}" msgstr "onverwacht antwoord van de server: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "gebruik common, consumers, organizations, of de id of het domein van een directory als tenant" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25130,6 +25730,54 @@ msgstr "u hebt zich aangemeld als iemand anders" msgid "you@example.org" msgstr "naam@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "uw identiteitsprovider" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "uw identiteitsprovider antwoordde met status {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "uw identiteitsprovider kan op dit moment niemand aanmelden: probeer het later opnieuw" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "uw identiteitsprovider kent deze client-id of het clientgeheim niet: controleer de OAuth-instellingen" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "uw identiteitsprovider accepteert deze aanmelding niet meer: meld u opnieuw aan" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "uw identiteitsprovider heeft de aanmelding geweigerd" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "uw identiteitsprovider geeft niet wat is gevraagd: controleer de extra bereiken in de OAuth-instellingen" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "de adressen van uw identiteitsprovider moeten beginnen met https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25324,6 +25972,12 @@ msgstr "{days} (hele dag)" msgid "{day} at {time}" msgstr "{day} om {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} geeft aan dat de e-mail daar aanmeldt via een identiteitsprovider (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/pl.po b/crates/i18n/po/pl.po index f9c21f08ac..f24b20a48f 100644 --- a/crates/i18n/po/pl.po +++ b/crates/i18n/po/pl.po @@ -813,6 +813,12 @@ msgstr "Udostępniona skrzynka pocztowa, odczytywana z użyciem logowania konta msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "Krótka notatka z łączem do tej strony, do wklejenia w wiadomości e-mail lub czacie. MailCraft sam niczego nie wysyła." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "Logowanie przez własnego dostawcę tożsamości nigdy nie jest wysyłane do serwerów poczty Microsoft ani Google: zmień powyższe serwery na własne." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1372,6 +1378,12 @@ msgstr "Po zaakceptowaniu, wstępnym zaakceptowaniu lub odrzuceniu zaproszenia n msgid "Agenda" msgstr "Agenda" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Zaakceptuj adresy spoza domeny dostawcy tożsamości lub wprowadź inne" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1822,7 +1834,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Najpierw wysyłane jest wszystko, co nadal czeka na serwer: poczta w Skrzynce nadawczej oraz flagi i przeniesienia wykonane w trybie offline. Jeśli MailCraft nie może połączyć się z serwerem, przełączenie czeka, aż będzie to możliwe." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "Identyfikator aplikacji (klienta)" @@ -2209,6 +2221,12 @@ msgstr "Poproś o powiadomienie o przeczytaniu wiadomości" msgid "Asked first" msgstr "Najpierw pytanie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Żądane oprócz openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2421,11 +2439,17 @@ msgid "AutoArchive" msgstr "Archiwizacja automatyczna" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automatycznie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automatycznie (OAUTHBEARER, w przeciwnym razie XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3674,6 +3698,24 @@ msgstr "Usuń flagę" msgid "Click to select {name}; double-click to open it" msgstr "Kliknij, aby zaznaczyć {name}; kliknij dwukrotnie, aby otworzyć" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "Identyfikator klienta" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Klucz tajny klienta (opcjonalnie)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Wysyłanie klucza tajnego klienta" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4939,6 +4981,12 @@ msgstr "Kieruj odpowiedzi do" msgid "Discard" msgstr "Odrzuć" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Wykryj" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5923,6 +5971,12 @@ msgstr "Eksportuj…" msgid "External" msgstr "Zewnętrzne" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Dodatkowe zakresy" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6083,12 +6137,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Znajdź następny błąd pisowni" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Znajduje adresy logowania i tokenów na podstawie adresu dostawcy tożsamości. Wysyłany jest tylko ten adres." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "Znajdź" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Znajdź adresy dostawcy tożsamości za pomocą przycisku Wykryj lub je wprowadź" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "Wyszukiwanie adresów nieoczekiwanie się zatrzymało" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6413,6 +6485,12 @@ msgstr "Zapomnij pobrany kalendarz i kontakty" msgid "Forget Trusted Certificate" msgstr "Zapomnij zaufany certyfikat" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Zapomnij klucz tajny klienta" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6525,6 +6603,12 @@ msgstr[0] "Znaleziono {n} folder" msgstr[1] "Znaleziono {n} foldery" msgstr[2] "Znaleziono {n} folderów" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Znaleziono: logowanie pod adresem {signIn}, tokeny z {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6881,6 +6965,12 @@ msgstr "Złoty" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (wbudowane)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7301,6 +7391,12 @@ msgstr "O sposobie powtarzania decyduje jego organizator." msgid "How many messages each folder holds and the space they take" msgstr "Ile wiadomości zawiera każdy folder i ile miejsca zajmują" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Ufam tym adresom" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7319,6 +7415,18 @@ msgstr "Jestem administratorem: zatwierdź go dla mojej organizacji" msgid "Icons" msgstr "Ikony" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Dostawca tożsamości" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Dostawca tożsamości (wystawca)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7379,6 +7487,12 @@ msgstr "Jeśli się nie zgodzisz, nic tam nie zostanie wysłane, a wyszukiwanie msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Jeśli się nie zgodzisz, nic nie zostanie wysłane, a serwery możesz zmienić w ustawieniach serwera." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Jeśli przejdziesz dalej, zalogujesz się na stronie dostawcy tożsamości, a wydany przez niego token dostępu zostanie wysłany do {hosts}. Kontynuuj tylko wtedy, gdy wiesz, że należą one do Twojego dostawcy." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7676,6 +7790,12 @@ msgstr "W wiadomości zwykłego tekstu" msgid "In line with text" msgstr "W tekście" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "W nagłówku Authorization (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7694,6 +7814,12 @@ msgstr "W Skrzynce nadawczej: czeka na swój czas" msgid "In the folder pane's order" msgstr "W kolejności okienka folderów" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "W formularzu (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7952,6 +8078,12 @@ msgstr "Trafi na serwer, gdy MailCraft będzie mógł zmieniać reguły serwera msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Zostanie wysłane przy następnym Wyślij/Odbierz; lista wypisze wtedy Twój adres." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Nie wydaje tokenów odświeżania: za każdym razem, gdy logowanie wygaśnie, zostaniesz poproszony o ponowne zalogowanie." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8303,6 +8435,12 @@ msgstr "Przechowuj pocztę z ostatnich" msgid "Keep on the server of {address}" msgstr "Zachowaj na serwerze: {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Zachowaj wbudowane ustawienia" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8387,6 +8525,12 @@ msgstr "Przechowywane w magazynie poświadczeń systemu, nigdy w skrzynce poczto msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Przechowywane w pamięci tej przeglądarki, zapisywane na bieżąco. Użyj Otwórz i eksportuj, aby zachować kopię jako plik." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Przechowywany w magazynie poświadczeń systemu, nigdy w skrzynce pocztowej. Program komputerowy nie jest w stanie naprawdę ukryć go przed Tobą." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8423,6 +8567,12 @@ msgstr "Przechowywane tylko na tym komputerze" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Przechowywane tylko na tym komputerze: zaproszenia i wydarzenia cykliczne nie są jeszcze wysyłane na serwer" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Zachowany: wpisz nowy, aby go zastąpić" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9484,6 +9634,12 @@ msgstr "Uwzględnij wielkość liter" msgid "May" msgstr "maja" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mechanizm" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9687,6 +9843,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "Poczta Microsoft 365 jest dodawana jako konto Microsoft: logujesz się na własnej stronie Microsoft w przeglądarce, a MailCraft nigdy nie widzi Twojego hasła." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 lub Outlook.com (wbudowane)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10821,6 +10983,12 @@ msgstr "Brak konta: Plik › Dodaj konto" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Serwer żadnego konta nie przechowuje tu jeszcze kalendarza, więc nie ma dokąd ich przenieść." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Nie znaleziono adresów: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11673,6 +11841,18 @@ msgstr "Lista numerowana" msgid "Numbering" msgstr "Numerowanie" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Wbudowane ustawienia OAuth" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "Ustawienia OAuth" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11925,6 +12105,12 @@ msgstr "Tylko tym razem i wyślij" msgid "Only if nobody replies" msgstr "Tylko jeśli nikt nie odpowie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Tylko jeśli dostawca go podał" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13479,6 +13665,12 @@ msgstr "Cykliczność" msgid "Red category" msgstr "Kategoria czerwona" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Port przekierowania" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13509,6 +13701,12 @@ msgstr "Odśwież" msgid "Refresh Your Certificates and Keys" msgstr "Odśwież certyfikaty i klucze" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Zarejestruj http://127.0.0.1 z dowolnym portem (lub podanym powyżej) jako adres przekierowania." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13901,6 +14099,12 @@ msgstr "Zmiana nazwy kategorii na serwerze: {done} z {total} wiadomości" msgid "Renewing the sign-in…" msgstr "Odnawianie logowania…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Odnawianie logowania… Jeśli nie można go odnowić, zaloguj się na stronie, która otworzy się w przeglądarce." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14117,6 +14321,12 @@ msgstr "Uruchom ponownie, aby zaktualizować" msgid "Restart to update is the owner's click." msgstr "Uruchomienie ponownie w celu aktualizacji należy do właściciela." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Przywróć domyślne ustawienia OAuth" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14181,6 +14391,12 @@ msgstr "Recenzja" msgid "Review certificate…" msgstr "Przejrzyj certyfikat…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Adres odwołania (opcjonalnie)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14722,6 +14938,12 @@ msgstr "Potwierdź tylko wtedy, gdy sam o to poprosiłeś agenta. Tekst w wiadom msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Wyjaśnia, co możesz zrobić Ty i administrator Twojej organizacji, i pozwala administratorowi zatwierdzić MailCraft na stronie Microsoft stąd." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Zakresy" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15233,7 +15455,7 @@ msgid "Send your password to another server?" msgstr "Wysłać hasło do innego serwera?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Wysłać dane logowania do innego serwera?" @@ -16210,6 +16432,18 @@ msgstr "Najpierw zaloguj się przez Wyślij/Odbierz, a potem zmień automatyczne msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Zaloguj się przez Wyślij/Odbierz, aby zobaczyć, kiedy inni są zajęci." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Zamiast tego zaloguj się przez dostawcę tożsamości (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Adres logowania" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17111,7 +17345,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Powiedz twórcom MailCraft, co poszło nie tak, na GitHubie lub e-mailem. Raport sprawdzasz i wysyłasz samodzielnie." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Dzierżawa" @@ -17836,6 +18070,24 @@ msgstr "Certyfikat przedstawiony przez serwer {host} nie jest tym, któremu zauf msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Certyfikat nie został wystawiony przez urząd certyfikacji, któremu ufa ten komputer." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Klucz tajny klienta może zawierać tylko litery, cyfry i znaki interpunkcyjne" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Klucz tajny klienta dla konta {account} nie jest przechowywany na tym komputerze: wprowadź go ponownie w Ustawieniach konta (Plik › Informacje)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Klucz tajny klienta jest zachowany dla poprzednich ustawień: wpisz go ponownie, aby użyć go z tymi, w przeciwnym razie zostanie zapomniany przy zapisywaniu." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18398,11 +18650,17 @@ msgid "The notes are too long to edit here." msgstr "Notatki są zbyt długie, aby edytować je tutaj." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Ten z Plik › Opcje" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Zarejestrowany dla programu MailCraft" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18511,6 +18769,12 @@ msgstr "Zakres wymaga dnia zakończenia" msgid "The range needs a day to start on" msgstr "Zakres wymaga dnia rozpoczęcia" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "Port przekierowania to liczba od 1 do 65535 lub puste pole dla dowolnego wolnego portu" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18985,6 +19249,12 @@ msgstr "Logowanie nie powiodło się." msgid "The sign-in didn't work. Try again." msgstr "Logowanie nie powiodło się. Spróbuj ponownie." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "Logowanie jest wysyłane tylko do: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19266,6 +19536,12 @@ msgstr "Pod adresem {address} nie ma skrzynki pocztowej." msgid "Thesaurus" msgstr "Słownik synonimów" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Te adresy są poza domeną dostawcy tożsamości: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19296,6 +19572,12 @@ msgstr "Tych kontaktów nie można tutaj scalić: mniej niż dwa z nich można z msgid "These could not be removed. Remove them yourself:" msgstr "Nie można tego usunąć. Usuń to samodzielnie:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Te ustawienia nie będą już ustawieniami {provider}: MailCraft będzie traktować to konto jako konto z własnym dostawcą tożsamości, zaczynając od powyższych wartości, a Ty zalogujesz się ponownie." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20540,6 +20822,12 @@ msgstr "" "\n" "Dopóki na to nie pozwolisz, nic z tych skrzynek i kalendarzy nie jest czytane, poczta i odpowiedzi na spotkania ze skrzynki udostępnionej czekają na tym komputerze, a nic nie jest wysyłane w ich miejsce z Twojego własnego adresu." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Aby logować się przez własnego dostawcę tożsamości, najpierw zmień serwery poczty przychodzącej i wychodzącej na własne: logowanie od niego nigdy nie jest wysyłane do serwerów {provider}." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20582,6 +20870,12 @@ msgstr "Dzisiaj" msgid "Today could not be read." msgstr "Nie udało się odczytać widoku Dzisiaj." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Adres tokenów" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -21078,6 +21372,12 @@ msgstr "Użyj RRRR-MM-DD" msgid "Use a Google app password, not your everyday Google account password." msgstr "Użyj hasła aplikacji Google, a nie codziennego hasła do konta Google." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Zamiast tego użyj hasła" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -21096,6 +21396,18 @@ msgstr "Użyj zamiast tego hasła aplikacji" msgid "Use https:// instead" msgstr "Użyj zamiast tego https://" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Użyj" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Użyj własnego dostawcy tożsamości" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21114,6 +21426,12 @@ msgstr "Użyj ustawienia systemu" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "Użyj ustawienia systemu zgodnie z opcją Efekty animacji w ustawieniach systemu Windows. Gdy MailCraft nie może jeszcze odczytać ustawienia systemu, animacje są odtwarzane, dopóki nie wybierzesz Nigdy nie odtwarzaj." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Zamiast tego użyj własnego dostawcy tożsamości…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21258,6 +21576,12 @@ msgstr "Poczekaj przed wysłaniem" msgid "Wait for the other attachment preview to finish." msgstr "Poczekaj, aż skończy się drugi podgląd załącznika." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Poczekaj na adresy dostawcy tożsamości" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21276,6 +21600,12 @@ msgstr "Oczekiwanie na rejestrację MailCraft w Google" msgid "Waiting for the approval stopped unexpectedly" msgstr "Oczekiwanie na zatwierdzenie nieoczekiwanie się zakończyło" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Oczekiwanie na magazyn poświadczeń systemu…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21940,6 +22270,12 @@ msgstr "Twoje certyfikaty i klucze" msgid "Your data was removed" msgstr "Twoje dane zostały usunięte" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Twoja domena wskazuje {issuer} do logowania." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22156,6 +22492,12 @@ msgstr "Zasady Twojej organizacji nie pozwalają na to dla Twojego konta. To pol msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "Twoje własne certyfikaty i klucze są używane przez program komputerowy MailCraft: tutaj sprawdzane są podpisy cyfrowe, a nic nie jest podpisywane ani odszyfrowywane." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Własny dostawca tożsamości" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22540,6 +22882,36 @@ msgstr "adresu udostępnionej skrzynki pocztowej nie można zmienić: usuń ją msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "reguły udostępnionej skrzynki pocztowej są jej własne: ta wersja ich nie tworzy" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "logowanie przez dostawcę tożsamości nigdy nie jest wysyłane do serwerów poczty Microsoft ani Google" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "logowanie przez dostawcę tożsamości jest wysyłane do serwera poczty na tym komputerze tylko podczas testu" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "logowanie przez dostawcę tożsamości jest używane tylko z własnymi serwerami poczty tego konta" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "logowanie przez własnego dostawcę tożsamości służy tylko do poczty, nie do Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "logowanie przez {provider} wraca tylko przez port pętli zwrotnej" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22564,6 +22936,12 @@ msgstr "obrazy w podpisie to PNG, JPEG lub GIF (wiele programów pocztowych nie msgid "a task needs a title" msgstr "zadanie wymaga tytułu" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "odmówiono dostępu na stronie logowania" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22808,6 +23186,12 @@ msgstr "skopiuj do {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "nie udało się nawiązać bezpiecznego połączenia z {host}: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "nie można otworzyć na tym komputerze portu, na który wróci logowanie" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22844,6 +23228,18 @@ msgstr "wpisz hasło, aby się zalogować" msgid "enter a user name to sign in" msgstr "wpisz nazwę użytkownika, aby się zalogować" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "wprowadź identyfikator klienta zarejestrowany dla programu MailCraft u dostawcy tożsamości" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "wpisz adres swojego dostawcy tożsamości (jego wystawcę)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22856,6 +23252,12 @@ msgstr "wszyscy z @{domain}" msgid "expected and replacement must be on one line" msgstr "szukany i zastępujący tekst muszą być w jednym wierszu" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "znajdź adresy logowania dostawcy tożsamości (Wykryj) lub je wprowadź" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23900,6 +24302,12 @@ msgstr "osobiste" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "obrazy z sieci nie są pobierane: zapisz obraz i dodaj go z pliku" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "port {port} na tym komputerze jest zajęty: wybierz inny port przekierowania lub automatyczny" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23954,6 +24362,12 @@ msgstr "adres odbiorcy zawiera {words}" msgid "replies can go to at most {n} addresses" msgstr "odpowiedzi mogą trafiać najwyżej na {n} adresów" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "odwołania" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -24096,6 +24510,12 @@ msgstr "najpierw zaloguj się do konta" msgid "sign in to {who} first" msgstr "najpierw zaloguj się do {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "logowania" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24227,6 +24647,12 @@ msgstr "tej wiadomości tu nie ma" msgid "that message isn't waiting in the Outbox" msgstr "ta wiadomość nie czeka w Skrzynce nadawczej" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "tego portu przekierowania nie można użyć: wybierz inny lub automatyczny" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24425,6 +24851,18 @@ msgstr "zmienione wystąpienie już nie istnieje" msgid "the check stopped unexpectedly" msgstr "sprawdzanie zatrzymało się nieoczekiwanie" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "identyfikator klienta może zawierać tylko litery, cyfry i znaki interpunkcyjne, maksymalnie 200" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "klucz tajny klienta może zawierać tylko litery, cyfry i znaki interpunkcyjne" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24587,6 +25025,90 @@ msgstr "folderu, w którym jest ta wiadomość, nie ma już na tym komputerze" msgid "the folder was numbered anew while it was being read" msgstr "folder został ponumerowany od nowa podczas odczytu" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "adres dostawcy tożsamości (wystawcy) nie może zawierać zapytania ani fragmentu" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "dostawca tożsamości nie opisuje się pod zwykłymi adresami: wpisz jego adresy logowania" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "dostawca tożsamości przekazał swój opis przez zbyt wiele przekierowań" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "dostawca tożsamości przekazał swój opis na adres na tym komputerze, w sieci prywatnej lub bez https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "adres dostawcy tożsamości nie może zawierać zapytania ani fragmentu" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "adres dostawcy tożsamości {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "nie można pobrać opisu dostawcy tożsamości: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "opis dostawcy tożsamości podaje adres {what}, który {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "opis dostawcy tożsamości nie podaje adresu {what}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "opis dostawcy tożsamości jest za długi" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "opis dostawcy tożsamości nie jest oczekiwanym JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "opis dostawcy tożsamości podaje innego wystawcę niż wpisany adres: sprawdź adres znak po znaku" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "według opisu dostawca tożsamości nikogo nie loguje na swojej stronie (kod autoryzacji)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "według opisu dostawca tożsamości nie obsługuje chronionego logowania (PKCE z S256), którego używa MailCraft" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24605,6 +25127,12 @@ msgstr "import nie ma folderu, do którego można włożyć pocztę" msgid "the import was stopped" msgstr "import został zatrzymany" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "serwery poczty przychodzącej i wychodzącej podane powyżej" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24629,6 +25157,12 @@ msgstr "nie można usunąć ostatniego kalendarza" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "lista pokazuje folder każdego konta: otwórz folder jednego konta lub wskaż folder" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "nazwy serwera poczty nie można wysłać z logowaniem" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24767,6 +25301,12 @@ msgstr "platforma odmówiła lub zawiodła" msgid "the proposed end is not after the proposed start" msgstr "proponowany koniec nie jest po proponowanym początku" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "port przekierowania musi mieścić się w zakresie od 1 do 65535 lub być automatyczny" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24791,6 +25331,12 @@ msgstr "w wyniku to konto przechowywałoby więcej stanu synchronizacji, niż mo msgid "the result {why}" msgstr "wynik {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "adres odwołania {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -25007,6 +25553,18 @@ msgstr "serwer nie oferuje STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "serwer nie przyjmuje hasła w tym połączeniu" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "serwer nie przyjmuje tokenu przez OAUTHBEARER, którego wymagają ustawienia OAuth tego konta" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "serwer nie przyjmuje tokenu przez XOAUTH2, którego wymagają ustawienia OAuth tego konta" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -25055,6 +25613,12 @@ msgstr "serwer nie oferuje logowania hasłem" msgid "the server offers no way to sign in with an access token" msgstr "serwer nie oferuje logowania tokenem dostępu" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "serwer nie oferuje logowania tokenem dostępu (ani przez OAUTHBEARER, ani przez XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25193,6 +25757,18 @@ msgstr "odpowiedź serwera jest zagnieżdżona zbyt głęboko" msgid "the server's response is too long" msgstr "odpowiedź serwera jest zbyt długa" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "logowanie wróciło od innego dostawcy tożsamości niż ten, o który poproszono: nic z niego nie zostało użyte" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "logowanie wróciło bez nazwy twojego dostawcy tożsamości, którą według niego zawsze podaje: nic z niego nie zostało użyte" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25253,13 +25829,13 @@ msgid "the top level" msgstr "najwyższy poziom" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "nazwa użytkownika lub token dostępu zawiera znak, którego nie można wysłać" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "nazwa użytkownika lub token dostępu są zbyt długie, by je wysłać" @@ -25337,7 +25913,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "podpis o nazwie „{to}” już istnieje" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "brak tokenu dostępu do logowania" @@ -25354,6 +25930,12 @@ msgstr "nie ma konta" msgid "there is no account to remove" msgstr "nie ma konta do usunięcia" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "nie ma wcześniejszego logowania do odnowienia" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25426,6 +26008,12 @@ msgstr "to Wyślij/Odbierz dotyczyło innego konta, a nie konta {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "to Wyślij/Odbierz dotyczyło serwera {name} podanego wcześniej" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "to konto nie loguje się przez twojego własnego dostawcę tożsamości" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25654,6 +26242,12 @@ msgstr "do {people}" msgid "to {recipient}" msgstr "do: {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "tokenu" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25684,6 +26278,12 @@ msgstr "wpisz adres, na przykład ktos@example.org, lub domenę, na przykład @e msgid "unexpected server response: {reason}" msgstr "nieoczekiwana odpowiedź serwera: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "jako dzierżawy użyj common, consumers, organizations albo identyfikatora lub domeny katalogu" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25844,6 +26444,54 @@ msgstr "zalogowano jako ktoś inny" msgid "you@example.org" msgstr "ty@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "Twój dostawca tożsamości" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "twój dostawca tożsamości odpowiedział stanem {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "twój dostawca tożsamości nie może teraz nikogo zalogować: spróbuj później" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "twój dostawca tożsamości nie zna tego identyfikatora klienta lub jego klucza tajnego: sprawdź ustawienia OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "twój dostawca tożsamości nie przyjmuje już tego logowania: zaloguj się ponownie" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "twój dostawca tożsamości odrzucił logowanie" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "twój dostawca tożsamości nie daje tego, o co poproszono: sprawdź dodatkowe zakresy w ustawieniach OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "adresy twojego dostawcy tożsamości muszą zaczynać się od https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -26039,6 +26687,12 @@ msgstr "{days} (cały dzień)" msgid "{day} at {time}" msgstr "{day} o {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} informuje, że jej poczta loguje się przez dostawcę tożsamości (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/ro.po b/crates/i18n/po/ro.po index 5b9c5172f6..ffa2b09665 100644 --- a/crates/i18n/po/ro.po +++ b/crates/i18n/po/ro.po @@ -813,6 +813,12 @@ msgstr "O cutie poștală partajată, citită cu autentificarea contului {accoun msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "O scurtă notă cu linkul către acea pagină, de lipit într-un e-mail sau într-un chat. MailCraft nu trimite nimic singur." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "O autentificare cu propriul furnizor de identitate nu este trimisă niciodată către serverele de e-mail Microsoft sau Google: înlocuiți serverele de mai sus cu ale dumneavoastră." + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1370,6 +1376,12 @@ msgstr "După ce acceptați, acceptați provizoriu sau refuzați o invitație la msgid "Agenda" msgstr "Agendă" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "Acceptați adresele din afara domeniului furnizorului de identitate sau introduceți altele" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1820,7 +1832,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "Tot ce încă așteaptă să ajungă pe server pleacă primul: e-mailurile din Mesaje de trimis și marcajele și mutările făcute cât ați fost offline. Dacă MailCraft nu poate contacta serverul, schimbarea așteaptă până poate." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "ID aplicație (client)" @@ -2207,6 +2219,12 @@ msgstr "Cereți să fiți anunțat când mesajul este citit" msgid "Asked first" msgstr "Întrebat mai întâi" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "Solicitate pe lângă openid email offline_access" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2419,11 +2437,17 @@ msgid "AutoArchive" msgstr "Arhivare automată" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "Automat" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "Automat (OAUTHBEARER, altfel XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3672,6 +3696,24 @@ msgstr "Ștergere marcaj" msgid "Click to select {name}; double-click to open it" msgstr "Faceți clic pentru a selecta {name}; faceți dublu clic pentru a-l deschide" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "ID client" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "Secret client (opțional)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "Trimiterea secretului clientului" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4937,6 +4979,12 @@ msgstr "Răspunsurile să meargă la" msgid "Discard" msgstr "Renunțare" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "Descoperire" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5921,6 +5969,12 @@ msgstr "Export…" msgid "External" msgstr "Extern" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "Domenii suplimentare" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6081,12 +6135,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "Găsește următoarea greșeală de ortografie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "Găsește adresele de conectare și de token din adresa furnizorului de identitate. Se trimite doar acea adresă." + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "De găsit" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "Găsiți adresele furnizorului de identitate cu Descoperire sau introduceți-le" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "Căutarea adreselor s-a oprit neașteptat" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6409,6 +6481,12 @@ msgstr "Uitare calendar și contacte descărcate" msgid "Forget Trusted Certificate" msgstr "Uitare certificat de încredere" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "Uitați secretul clientului" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6521,6 +6599,12 @@ msgstr[0] "S-a găsit {n} dosar" msgstr[1] "S-au găsit {n} dosare" msgstr[2] "S-au găsit {n} de dosare" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "Găsit: conectare la {signIn}, tokenuri de la {token}." + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6877,6 +6961,12 @@ msgstr "Auriu" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google (încorporat)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7297,6 +7387,12 @@ msgstr "Felul în care se repetă îl stabilește organizatorul." msgid "How many messages each folder holds and the space they take" msgstr "Câte mesaje are fiecare dosar și cât spațiu ocupă" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "Am încredere în aceste adrese" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7315,6 +7411,18 @@ msgstr "Sunt administrator: îl aprob pentru organizația mea" msgid "Icons" msgstr "Pictograme" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "Furnizor de identitate" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "Furnizor de identitate (emitent)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7375,6 +7483,12 @@ msgstr "Dacă nu, nu i se trimite nimic, iar căutarea continuă în altă parte msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "Dacă nu, nu se trimite nimic, iar serverele pot fi modificate în Setări server." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "Dacă continuați, vă conectați pe pagina furnizorului de identitate, iar tokenul de acces pe care îl emite este trimis la {hosts}. Continuați doar dacă știți că aparțin furnizorului dvs." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7672,6 +7786,12 @@ msgstr "Într-un mesaj text simplu" msgid "In line with text" msgstr "În linie cu textul" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "În antetul Authorization (client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7690,6 +7810,12 @@ msgstr "În Mesaje de trimis: așteaptă ora lui" msgid "In the folder pane's order" msgstr "În ordinea din panoul de dosare" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "În formular (client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7948,6 +8074,12 @@ msgstr "Ajunge pe server după ce MailCraft are voie să modifice regulile serve msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "Pleacă la următoarea Trimitere/primire; apoi lista vă scoate." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "Nu emite tokenuri de reîmprospătare: vi se va cere să vă conectați din nou de fiecare dată când o conectare expiră." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8299,6 +8431,12 @@ msgstr "Păstrează e-mailurile din ultimele" msgid "Keep on the server of {address}" msgstr "Păstrare pe serverul lui {address}" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "Păstrați setările încorporate" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8383,6 +8521,12 @@ msgstr "Păstrată în depozitul de acreditări al sistemului, niciodată în cu msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "Păstrat în spațiul de stocare al acestui browser, salvat pe parcurs. Folosiți Deschidere și export ca să păstrați o copie ca fișier." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "Păstrat în depozitul de acreditări al sistemului, niciodată în cutia poștală. Un program desktop nu îl poate ține cu adevărat secret față de dvs." + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8419,6 +8563,12 @@ msgstr "Păstrată doar pe acest computer" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "Păstrat doar pe acest computer: invitațiile și evenimentele recurente nu sunt încă trimise serverului" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "Păstrat: tastați unul nou pentru a-l înlocui" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9480,6 +9630,12 @@ msgstr "Potrivire litere mari și mici" msgid "May" msgstr "mai" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "Mecanism" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9683,6 +9839,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "E-mailul Microsoft 365 se adaugă drept cont Microsoft: vă conectați pe pagina Microsoft din browser, iar MailCraft nu vă vede niciodată parola." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 sau Outlook.com (încorporat)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10817,6 +10979,12 @@ msgstr "Încă niciun cont: Fișier › Adăugare cont" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "Încă niciun server de cont nu păstrează un calendar aici, deci nu există unde să le mutați." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "Nu s-au găsit adrese: {reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11669,6 +11837,18 @@ msgstr "Listă numerotată" msgid "Numbering" msgstr "Numerotare" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "Setări OAuth încorporate" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "Setări OAuth" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11921,6 +12101,12 @@ msgstr "Doar de data aceasta, și trimite-l" msgid "Only if nobody replies" msgstr "Doar dacă nu răspunde nimeni" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "Doar dacă furnizorul v-a dat unul" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13475,6 +13661,12 @@ msgstr "Recurență" msgid "Red category" msgstr "Categoria roșie" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "Port de redirecționare" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13505,6 +13697,12 @@ msgstr "Reîmprospătare" msgid "Refresh Your Certificates and Keys" msgstr "Reîmprospătare certificate și chei" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "Înregistrați http://127.0.0.1 cu orice port (sau cu cel de mai sus) ca adresă de redirecționare." + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13897,6 +14095,12 @@ msgstr "Redenumirea unei categorii pe server: {done} din {total} mesaje" msgid "Renewing the sign-in…" msgstr "Se reînnoiește conectarea…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "Se reînnoiește conectarea… Dacă nu poate fi reînnoită, conectați-vă pe pagina care se deschide în browser." + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14113,6 +14317,12 @@ msgstr "Repornire pentru actualizare" msgid "Restart to update is the owner's click." msgstr "Repornirea pentru actualizare e decizia proprietarului." +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "Restabiliți setările OAuth implicite" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14177,6 +14387,12 @@ msgstr "Revizuire" msgid "Review certificate…" msgstr "Examinare certificat…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "Adresă de revocare (opțional)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14718,6 +14934,12 @@ msgstr "Spuneți da doar dacă i-ați cerut agentului asta. Textul dintr-un mesa msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "Arată ce puteți face dvs. și administratorul organizației și îi permite unui administrator să aprobe MailCraft de aici, pe pagina Microsoft." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "Domenii" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15229,7 +15451,7 @@ msgid "Send your password to another server?" msgstr "Trimiteți parola către un alt server?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "Trimiteți conectarea dvs. altui server?" @@ -16206,6 +16428,18 @@ msgstr "Conectați-vă întâi cu Trimitere/primire, apoi modificați răspunsur msgid "Sign in with Send/Receive to see when other people are busy." msgstr "Conectați-vă cu Trimitere/primire ca să vedeți când sunt ocupate alte persoane." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "Conectați-vă în schimb cu furnizorul de identitate (OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "Adresă de conectare" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17107,7 +17341,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "Spuneți-le autorilor MailCraft ce nu a mers, pe GitHub sau prin e-mail. Verificați raportul și îl trimiteți chiar dvs." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "Tenant" @@ -17832,6 +18066,24 @@ msgstr "Certificatul pe care îl arată serverul de la {host} nu este cel în ca msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "Certificatul nu a fost emis de o autoritate de certificare în care are încredere acest computer." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "Secretul clientului poate conține doar litere, cifre și semne de punctuație" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "Secretul clientului pentru {account} nu este stocat pe acest computer: introduceți-l din nou în Setări cont (Fișier › Informații)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "Secretul clientului este păstrat pentru setările de dinainte: introduceți-l din nou pentru a-l folosi cu acestea, altfel va fi uitat la salvare." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18394,11 +18646,17 @@ msgid "The notes are too long to edit here." msgstr "Notele sunt prea lungi pentru a fi editate aici." #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "Cel din Fișier › Opțiuni" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "Cel înregistrat pentru MailCraft" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18507,6 +18765,12 @@ msgstr "Intervalul are nevoie de o zi de încheiere" msgid "The range needs a day to start on" msgstr "Intervalul are nevoie de o zi de început" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "Portul de redirecționare este un număr de la 1 la 65535 sau gol pentru oricare port liber" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18981,6 +19245,12 @@ msgstr "Autentificarea nu a reușit." msgid "The sign-in didn't work. Try again." msgstr "Autentificarea nu a funcționat. Încercați din nou." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "Conectarea este trimisă doar la: {servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19262,6 +19532,12 @@ msgstr "Nu există o cutie poștală la {address}." msgid "Thesaurus" msgstr "Tezaur" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "Aceste adrese sunt în afara domeniului furnizorului de identitate: {hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19292,6 +19568,12 @@ msgstr "Aceste contacte nu pot fi îmbinate aici: mai puțin de două dintre ele msgid "These could not be removed. Remove them yourself:" msgstr "Acestea nu au putut fi eliminate. Eliminați-le chiar dvs.:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "Aceste setări nu vor mai fi ale {provider}: MailCraft va trata acest cont ca pe unul cu propriul furnizor de identitate, pornind de la valorile de mai sus, și vă veți conecta din nou." + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20536,6 +20818,12 @@ msgstr "" "\n" "Până nu permiți, nimic din acele cutii poștale și calendare nu este citit, mesajele și răspunsurile la întâlniri dintr-o cutie poștală partajată așteaptă pe acest computer și nimic nu este trimis în locul lor de la propria ta adresă." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "Pentru a vă autentifica cu propriul furnizor de identitate, înlocuiți mai întâi serverele de intrare și de ieșire cu ale dumneavoastră: o autentificare de la acesta nu este trimisă niciodată către serverele {provider}." + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20578,6 +20866,12 @@ msgstr "Azi" msgid "Today could not be read." msgstr "Azi nu a putut fi citit." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "Adresă token" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -21074,6 +21368,12 @@ msgstr "Folosiți AAAA-LL-ZZ" msgid "Use a Google app password, not your everyday Google account password." msgstr "Folosiți o parolă de aplicație Google, nu parola obișnuită a contului Google." +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "Utilizați în schimb o parolă" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -21092,6 +21392,18 @@ msgstr "Folosiți în schimb o parolă de aplicație" msgid "Use https:// instead" msgstr "Folosiți https:// în schimb" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "Utilizați-l" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "Utilizați propriul meu furnizor de identitate" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21110,6 +21422,12 @@ msgstr "Folosiți setarea sistemului" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "„Folosiți setarea sistemului” urmează efectele de animație din setările Windows. Acolo unde MailCraft nu poate citi încă setarea sistemului, animațiile se redau până când alegeți „Nu redați niciodată”." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "Utilizați în schimb propriul furnizor de identitate…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21254,6 +21572,12 @@ msgstr "Așteaptă înainte de trimitere" msgid "Wait for the other attachment preview to finish." msgstr "Așteptați să se termine cealaltă previzualizare de atașament." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "Așteptați adresele furnizorului de identitate" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21272,6 +21596,12 @@ msgstr "Se așteaptă înregistrarea Google a MailCraft" msgid "Waiting for the approval stopped unexpectedly" msgstr "Așteptarea aprobării s-a oprit neașteptat" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "Se așteaptă depozitul de acreditări al sistemului…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21934,6 +22264,12 @@ msgstr "Certificatele și cheile dvs." msgid "Your data was removed" msgstr "Datele dvs. au fost eliminate" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "Domeniul dvs. indică {issuer} pentru conectare." + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22150,6 +22486,12 @@ msgstr "Regulile organizației dvs. nu permit aceasta pentru contul dvs. Aceasta msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "Certificatele și cheile dvs. sunt folosite de programul desktop MailCraft: aici se verifică semnăturile digitale și nu se semnează sau decriptează nimic." +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "Propriul furnizor de identitate" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22534,6 +22876,36 @@ msgstr "adresa unei cutii poștale partajate nu poate fi schimbată: eliminați- msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "regulile unei cutii poștale partajate sunt ale ei: această versiune nu le creează" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "o conectare cu furnizorul de identitate nu este trimisă niciodată la serverele de e-mail Microsoft sau Google" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "o conectare cu furnizorul de identitate este trimisă la un server de e-mail de pe acest computer doar într-un test" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "o conectare cu furnizorul de identitate este utilizată doar cu serverele de e-mail proprii ale acestui cont" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "o conectare cu propriul furnizor de identitate este doar pentru e-mail, nu pentru Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "o conectare cu {provider} revine doar printr-un port de loopback" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22558,6 +22930,12 @@ msgstr "imaginile unei semnături sunt PNG, JPEG sau GIF (multe programe de e-ma msgid "a task needs a title" msgstr "o sarcină are nevoie de un titlu" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "accesul a fost refuzat pe pagina de conectare" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22802,6 +23180,12 @@ msgstr "copiază în {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "nu s-a putut stabili o conexiune securizată cu {host}: {reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "nu s-a putut deschide un port pe acest computer la care să revină conectarea" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22838,6 +23222,18 @@ msgstr "introduceți o parolă pentru conectare" msgid "enter a user name to sign in" msgstr "introduceți un nume de utilizator pentru conectare" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "introduceți ID-ul client înregistrat pentru MailCraft la furnizorul de identitate" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "introduceți adresa furnizorului de identitate (emitentul său)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22850,6 +23246,12 @@ msgstr "toți cei de la @{domain}" msgid "expected and replacement must be on one line" msgstr "textul căutat și cel înlocuitor trebuie să fie pe o singură linie" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "găsiți adresele de conectare ale furnizorului de identitate (Descoperire) sau introduceți-le" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23893,6 +24295,12 @@ msgstr "personal" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "imaginile de pe web nu se descarcă: salvați imaginea și adăugați-o din fișier" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "portul {port} de pe acest computer este ocupat: alegeți alt port de redirecționare sau automat" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23947,6 +24355,12 @@ msgstr "adresa destinatarului conține {words}" msgid "replies can go to at most {n} addresses" msgstr "răspunsurile pot merge la cel mult {n} adrese" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "revocare" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -24089,6 +24503,12 @@ msgstr "conectați-vă întâi la cont" msgid "sign in to {who} first" msgstr "conectați-vă întâi la {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "conectare" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24220,6 +24640,12 @@ msgstr "acel mesaj nu este aici" msgid "that message isn't waiting in the Outbox" msgstr "acel mesaj nu așteaptă în Mesaje de trimis" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "acel port de redirecționare nu poate fi folosit: alegeți altul sau automat" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24418,6 +24844,18 @@ msgstr "apariția modificată nu mai există" msgid "the check stopped unexpectedly" msgstr "verificarea s-a oprit neașteptat" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "ID-ul client poate conține doar litere, cifre și semne de punctuație, cel mult 200" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "secretul clientului poate conține doar litere, cifre și semne de punctuație" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24580,6 +25018,90 @@ msgstr "dosarul în care este acest mesaj nu mai este pe acest computer" msgid "the folder was numbered anew while it was being read" msgstr "dosarul a fost renumerotat în timpul citirii" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "adresa furnizorului de identitate (emitent) nu poate avea o interogare sau un fragment" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "furnizorul de identitate nu se descrie la adresele obișnuite: introduceți adresele sale de conectare" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "furnizorul de identitate și-a trimis descrierea mai departe prin prea multe redirecționări" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "furnizorul de identitate și-a trimis descrierea mai departe la o adresă de pe acest computer, dintr-o rețea privată sau fără https" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "adresa furnizorului de identitate nu poate avea o interogare sau un fragment" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "adresa furnizorului de identitate {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "descrierea furnizorului de identitate nu a putut fi obținută: {other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "descrierea furnizorului de identitate dă o adresă de {what} care {why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "descrierea furnizorului de identitate nu dă nicio adresă de {what}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "descrierea furnizorului de identitate este prea lungă" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "descrierea furnizorului de identitate nu este JSON-ul așteptat" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "descrierea furnizorului de identitate numește alt emitent decât adresa introdusă: verificați adresa, caracter cu caracter" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "descrierea furnizorului de identitate spune că nu conectează pe nimeni pe pagina sa (cod de autorizare)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "descrierea furnizorului de identitate spune că nu acceptă conectarea protejată (PKCE cu S256) pe care o folosește MailCraft" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24598,6 +25120,12 @@ msgstr "importul nu are un dosar în care să pună e-mailurile" msgid "the import was stopped" msgstr "importul a fost oprit" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "serverele de intrare și de ieșire de mai sus" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24622,6 +25150,12 @@ msgstr "ultimul calendar nu poate fi șters" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "lista arată dosarul fiecărui cont: deschideți dosarul unui singur cont sau numiți dosarul" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "numele serverului de e-mail nu poate fi trimis cu o conectare" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24760,6 +25294,12 @@ msgstr "platforma a refuzat sau a eșuat" msgid "the proposed end is not after the proposed start" msgstr "sfârșitul propus nu este după începutul propus" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "portul de redirecționare trebuie să fie între 1 și 65535 sau automat" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24784,6 +25324,12 @@ msgstr "rezultatul ar face ca acest cont să păstreze mai multă stare de sincr msgid "the result {why}" msgstr "rezultatul {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "adresa de revocare {why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -25000,6 +25546,18 @@ msgstr "serverul nu oferă STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "serverul nu acceptă o parolă pe această conexiune" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "serverul nu acceptă un token cu OAUTHBEARER, pe care îl cer setările OAuth ale acestui cont" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "serverul nu acceptă un token cu XOAUTH2, pe care îl cer setările OAuth ale acestui cont" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -25048,6 +25606,12 @@ msgstr "serverul nu oferă nicio metodă de conectare cu parolă" msgid "the server offers no way to sign in with an access token" msgstr "serverul nu oferă nicio metodă de conectare cu token de acces" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "serverul nu oferă nicio modalitate de conectare cu un token de acces (nici OAUTHBEARER, nici XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25186,6 +25750,18 @@ msgstr "răspunsul serverului este imbricat prea adânc" msgid "the server's response is too long" msgstr "răspunsul serverului este prea lung" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "conectarea a revenit de la alt furnizor de identitate decât cel solicitat: nu s-a folosit nimic din ea" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "conectarea a revenit fără numele furnizorului de identitate, pe care spune că îl dă mereu: nu s-a folosit nimic din ea" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25246,13 +25822,13 @@ msgid "the top level" msgstr "nivelul superior" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "numele de utilizator sau tokenul de acces conține un caracter care nu poate fi trimis" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "numele de utilizator sau tokenul de acces este prea lung pentru a fi trimis" @@ -25330,7 +25906,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "există deja o semnătură numită „{to}”" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "nu există un token de acces cu care să vă conectați" @@ -25347,6 +25923,12 @@ msgstr "nu există niciun cont" msgid "there is no account to remove" msgstr "nu există niciun cont de eliminat" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "nu există o conectare anterioară de reînnoit" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25419,6 +26001,12 @@ msgstr "această Trimitere/primire era pentru alt cont, nu pentru {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "această Trimitere/primire era pentru serverul pe care {name} îl numea înainte" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "acest cont nu se conectează cu propriul furnizor de identitate" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25647,6 +26235,12 @@ msgstr "către {people}" msgid "to {recipient}" msgstr "către {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "token" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25677,6 +26271,12 @@ msgstr "scrieți o adresă, de exemplu cineva@example.org, sau un domeniu, de ex msgid "unexpected server response: {reason}" msgstr "răspuns neașteptat de la server: {reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "utilizați common, consumers, organizations sau ID-ul ori domeniul unui director ca locatar" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25837,6 +26437,54 @@ msgstr "v-ați conectat ca altcineva" msgid "you@example.org" msgstr "dvs@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "furnizorul dvs. de identitate" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "furnizorul de identitate a răspuns cu starea {status}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "furnizorul de identitate nu poate conecta pe nimeni acum: încercați mai târziu" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "furnizorul de identitate nu cunoaște acest ID de client sau secretul său: verificați setările OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "furnizorul de identitate nu mai acceptă această conectare: conectați-vă din nou" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "furnizorul de identitate a refuzat conectarea" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "furnizorul de identitate nu oferă ce s-a cerut: verificați domeniile suplimentare din setările OAuth" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "adresele furnizorului de identitate trebuie să înceapă cu https://" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -26032,6 +26680,12 @@ msgstr "{days} (toată ziua)" msgid "{day} at {time}" msgstr "{day} la {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} indică faptul că e-mailul său se conectează printr-un furnizor de identitate (OAuth 2.0)." + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/i18n/po/zh_CN.po b/crates/i18n/po/zh_CN.po index 769b407d03..674077c98e 100644 --- a/crates/i18n/po/zh_CN.po +++ b/crates/i18n/po/zh_CN.po @@ -813,6 +813,12 @@ msgstr "共享邮箱,使用 {account} 的登录信息读取" msgid "A short note with the link to that page, to paste into mail or chat. MailCraft sends nothing itself." msgstr "一段附有该页面链接的简短说明,可粘贴到邮件或聊天中。MailCraft 本身不会发送任何内容。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." +msgstr "使用你自己的身份提供方的登录绝不会发送到 Microsoft 或 Google 的邮件服务器:请把上面的服务器改成你自己的。" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -1370,6 +1376,12 @@ msgstr "在邮件中接受、暂定接受或拒绝会议请求,或从日历中 msgid "Agenda" msgstr "日程" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Agree to the addresses outside your identity provider's domain, or enter others" +msgstr "同意身份提供程序域之外的地址,或输入其他地址" + #. command label #: crates/engine/src/cmd/format.rs msgid "Align Text" @@ -1816,7 +1828,7 @@ msgid "Anything still waiting to go to the server goes first: mail in the Outbox msgstr "等待发送到服务器的内容将先被处理:发件箱中的邮件,以及您离线时的标记和移动。如果 MailCraft 无法连接服务器,切换将等待连接恢复。" #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Application (client) ID" msgstr "应用程序(客户端)ID" @@ -2203,6 +2215,12 @@ msgstr "请求在邮件被阅读时通知我" msgid "Asked first" msgstr "已先询问" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Asked for besides openid email offline_access" +msgstr "在 openid email offline_access 之外请求的" + #. interface #: crates/ui-egui/src/scheduling.rs #, fuzzy @@ -2413,11 +2431,17 @@ msgid "AutoArchive" msgstr "自动归档" #. interface -#: crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs crates/ui-egui/src/backstage.rs crates/ui-egui/src/calendar_view.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/spelling.rs #, fuzzy msgid "Automatic" msgstr "自动" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Automatic (OAUTHBEARER, else XOAUTH2)" +msgstr "自动(OAUTHBEARER,否则 XOAUTH2)" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -3666,6 +3690,24 @@ msgstr "清除标记" msgid "Click to select {name}; double-click to open it" msgstr "单击选择 {name},双击打开。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client ID" +msgstr "客户端 ID" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret (optional)" +msgstr "客户端密码(可选)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Client secret sent" +msgstr "客户端密码发送方式" + #. ribbon, ribbon location #: crates/engine/src/cmd/edit.rs crates/engine/src/cmd/format.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -4930,6 +4972,12 @@ msgstr "将回复发送至" msgid "Discard" msgstr "丢弃" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Discover" +msgstr "发现" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ComposerScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/ReminderScheduler.kt crates/ui-egui/src/reading/warnings.rs crates/ui-egui/src/reminders.rs #, fuzzy @@ -5898,6 +5946,12 @@ msgstr "导出…" msgid "External" msgstr "外部" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Extra scopes" +msgstr "额外范围" + #. interface #: crates/ui-egui/src/calendar_sync.rs #, fuzzy @@ -6058,12 +6112,30 @@ msgstr "Find a font" msgid "Find next spelling error" msgstr "查找下一个拼写错误" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find the sign-in and token addresses from the identity provider's address. Only that address is sent." +msgstr "根据身份提供程序的地址查找登录地址和令牌地址。仅发送该地址。" + #. interface #: crates/ui-egui/src/find_replace.rs #, fuzzy msgid "Find what" msgstr "查找内容" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Find your identity provider's addresses with Discover, or enter them" +msgstr "使用“发现”查找身份提供程序的地址,或手动输入" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Finding the addresses stopped unexpectedly" +msgstr "查找地址意外停止" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -6386,6 +6458,12 @@ msgstr "清除已下载的日历和联系人" msgid "Forget Trusted Certificate" msgstr "取消信任证书" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Forget the client secret" +msgstr "忘记客户端密码" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/PicturesSettings.kt crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -6494,6 +6572,12 @@ msgid "Found {n} folder" msgid_plural "Found {n} folders" msgstr[0] "找到 {n} 个文件夹" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Found: sign-in at {signIn}, tokens from {token}." +msgstr "已找到:登录地址 {signIn},令牌来自 {token}。" + #. name #: crates/model/src/calendar.rs #, fuzzy @@ -6846,6 +6930,12 @@ msgstr "金色" msgid "Google" msgstr "Google" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Google (built in)" +msgstr "Google(内置)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7266,6 +7356,12 @@ msgstr "重复方式由组织者决定。" msgid "How many messages each folder holds and the space they take" msgstr "每个文件夹包含的邮件数量及其占用空间" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "I trust these addresses" +msgstr "我信任这些地址" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7284,6 +7380,18 @@ msgstr "我是管理员:为我的组织批准" msgid "Icons" msgstr "图标" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider" +msgstr "身份提供程序" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Identity provider (issuer)" +msgstr "身份提供程序(颁发者)" + #. interface #: crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -7344,6 +7452,12 @@ msgstr "如果您不同意,则不会向其发送任何内容,搜索会在其 msgid "If you don't, nothing is sent, and you can change the servers in Server settings." msgstr "如果不继续,则不会发送任何内容,您可以在“服务器设置”中更改服务器。" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." +msgstr "如果继续,你将在身份提供程序的页面上登录,它颁发的访问令牌将发送到 {hosts}。仅在你确定这些地址属于你的提供程序时才继续。" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -7639,6 +7753,12 @@ msgstr "在纯文本邮件中" msgid "In line with text" msgstr "嵌入文字" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the Authorization header (client_secret_basic)" +msgstr "在 Authorization 标头中(client_secret_basic)" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -7657,6 +7777,12 @@ msgstr "在发件箱中:等待其时间" msgid "In the folder pane's order" msgstr "按照文件夹窗格的顺序" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "In the form (client_secret_post)" +msgstr "在表单中(client_secret_post)" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -7915,6 +8041,12 @@ msgstr "获得更改服务器规则的权限后,规则将发送到服务器( msgid "It goes with the next Send/Receive; the list then takes you off it." msgstr "它会在下次发送/接收时发出,之后邮件列表会将你移除。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out." +msgstr "它不颁发刷新令牌:每次登录过期时,都会要求你重新登录。" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -8264,6 +8396,12 @@ msgstr "保留最近这段时间的邮件" msgid "Keep on the server of {address}" msgstr "保留在 {address} 的服务器上" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Keep the built-in settings" +msgstr "保留内置设置" + #. interface #: crates/ui-egui/src/import_pst.rs #, fuzzy @@ -8348,6 +8486,12 @@ msgstr "保存在系统凭据存储中,绝不会保存在邮箱或其设置中 msgid "Kept in this browser's storage, saved as you go. Use Open & Export to keep a copy as a file." msgstr "保存在此浏览器中,随操作自动保存。使用“打开和导出”可将副本保存为文件。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you." +msgstr "保存在系统的凭据存储中,绝不保存在邮箱中。桌面程序无法真正对你保密。" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -8384,6 +8528,12 @@ msgstr "仅保存在此计算机上" msgid "Kept on this computer only: invitations and repeating events aren't sent to the server yet" msgstr "仅保存在此计算机上:邀请和重复日程尚未发送到服务器" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Kept: type a new one to replace it" +msgstr "已保存:键入新的密码以替换" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -9443,6 +9593,12 @@ msgstr "区分大小写" msgid "May" msgstr "5月" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Mechanism" +msgstr "机制" + #. command label, interface, ribbon, ribbon location #: crates/engine/src/cmd/calendar.rs crates/engine/src/cmd/calendar/invitation.rs crates/engine/src/cmd/calendar/meeting.rs crates/engine/src/cmd/calendar/share.rs crates/engine/src/cmd/people.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/lib.rs crates/ui-egui/src/ribbon.rs #, fuzzy @@ -9644,6 +9800,12 @@ msgstr "Microsoft 365" msgid "Microsoft 365 mail is added as a Microsoft account: you sign in on Microsoft's own page in your browser, and MailCraft never sees your password." msgstr "Microsoft 365 邮箱会作为 Microsoft 账户添加:您在浏览器中登录 Microsoft 官方页面,MailCraft 不会看到您的密码。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Microsoft 365 or Outlook.com (built in)" +msgstr "Microsoft 365 或 Outlook.com(内置)" + #. command label #: crates/ui-egui/src/lib.rs #, fuzzy @@ -10774,6 +10936,12 @@ msgstr "尚无账户:文件 › 添加账户" msgid "No account's server keeps a calendar here yet, so there is nowhere to move these to." msgstr "当前没有账户的服务器在此处保存日历,因此无法将这些项目移过去。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "No addresses found: {reason}" +msgstr "未找到地址:{reason}" + #. android, what a command says #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AttachmentsView.kt crates/mobile/src/attachments.rs #, fuzzy @@ -11626,6 +11794,18 @@ msgstr "编号列表" msgid "Numbering" msgstr "编号" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "OAuth Built-in Settings" +msgstr "OAuth 内置设置" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "OAuth settings" +msgstr "OAuth 设置" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AboutPages.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/AccountDialogs.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarScreen.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/auto_replies.rs crates/ui-egui/src/calendar_sync.rs crates/ui-egui/src/check_names.rs crates/ui-egui/src/dialogs.rs crates/ui-egui/src/forms.rs crates/ui-egui/src/merge_contacts.rs crates/ui-egui/src/move_items.rs crates/ui-egui/src/reminder_dialog.rs crates/ui-egui/src/send_later.rs crates/ui-egui/src/settings_notice.rs crates/ui-egui/src/software.rs crates/ui-egui/src/updates.rs #, fuzzy @@ -11878,6 +12058,12 @@ msgstr "仅这一次,并发送" msgid "Only if nobody replies" msgstr "仅当无人回复时" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Only if your provider gave one" +msgstr "仅当提供程序提供了密码时" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -13430,6 +13616,12 @@ msgstr "重复" msgid "Red category" msgstr "红色类别" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Redirect port" +msgstr "重定向端口" + #. command label, name #: crates/engine/src/cmd/edit.rs crates/ui-egui/src/menubar.rs #, fuzzy @@ -13460,6 +13652,12 @@ msgstr "刷新" msgid "Refresh Your Certificates and Keys" msgstr "刷新您的证书和密钥" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Register http://127.0.0.1 with any port (or the one above) as the redirect address." +msgstr "将 http://127.0.0.1(任意端口或上面的端口)注册为重定向地址。" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -13852,6 +14050,12 @@ msgstr "正在服务器上重命名类别:{done}/{total} 封邮件" msgid "Renewing the sign-in…" msgstr "正在更新登录信息…" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser." +msgstr "正在续订登录… 如果无法续订,请在浏览器中打开的页面上登录。" + #. android, interface #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/CalendarEditor.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/meeting_dialogs/share.rs #, fuzzy @@ -14068,6 +14272,12 @@ msgstr "重新启动以更新" msgid "Restart to update is the owner's click." msgstr "“重新启动以更新”必须由用户亲自点击。" +#. command label +#: crates/engine/src/cmd/account.rs +#, fuzzy +msgid "Restore Default OAuth Settings" +msgstr "还原默认 OAuth 设置" + #. interface #: crates/ui-egui/src/attachment_preview.rs #, fuzzy @@ -14132,6 +14342,12 @@ msgstr "审阅" msgid "Review certificate…" msgstr "查看证书…" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Revocation address (optional)" +msgstr "吊销地址(可选)" + #. interface #: crates/ui-egui/src/reading/signature.rs #, fuzzy @@ -14669,6 +14885,12 @@ msgstr "只有在您确实要求智能体执行此操作时才选择“是”。 msgid "Says what you and your organisation's administrator can do, and lets an administrator approve MailCraft on Microsoft's page from here." msgstr "说明您和您组织的管理员可以执行的操作,并让管理员从此处在 Microsoft 页面上批准 MailCraft。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Scopes" +msgstr "范围" + #. ribbon #: crates/ui-egui/src/ribbon.rs #, fuzzy @@ -15180,7 +15402,7 @@ msgid "Send your password to another server?" msgstr "将您的密码发送到另一台服务器?" #. interface -#: crates/ui-egui/src/account_setup/exchange.rs +#: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/exchange.rs #, fuzzy msgid "Send your sign-in to another server?" msgstr "将您的登录信息发送到另一台服务器?" @@ -16149,6 +16371,18 @@ msgstr "首先使用“发送/接收”登录,然后更改您的自动回复 msgid "Sign in with Send/Receive to see when other people are busy." msgstr "使用“发送/接收”登录,以查看其他人的忙闲状态。" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Sign in with your identity provider (OAuth 2.0) instead" +msgstr "改为使用身份提供程序登录(OAuth 2.0)" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Sign-in address" +msgstr "登录地址" + #. interface #: crates/ui-egui/src/lib.rs #, fuzzy @@ -17050,7 +17284,7 @@ msgid "Tell MailCraft's makers what went wrong, on GitHub or by email. You check msgstr "通过 GitHub 或电子邮件向 MailCraft 开发者反馈问题。由您检查并亲自发送报告。" #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "Tenant" msgstr "租户" @@ -17771,6 +18005,24 @@ msgstr "{host} 服务器显示的证书不是您为此账户信任的证书, msgid "The certificate wasn't issued by a certification authority this computer trusts." msgstr "该证书不是由该计算机信任的证书颁发机构颁发的。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret can only be letters, digits and punctuation" +msgstr "客户端密码只能包含字母、数字和标点符号" + +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)" +msgstr "{account} 的客户端密码未存储在此计算机上:请在“账户设置”(文件 › 信息)中重新输入" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." +msgstr "客户端密钥是为原先的设置保存的:要在这些设置中使用,请重新输入,否则保存时会被忘记。" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -18331,11 +18583,17 @@ msgid "The notes are too long to edit here." msgstr "备注太长,无法在此编辑。" #. interface -#: crates/ui-egui/src/account_setup.rs +#: crates/ui-egui/src/account_setup/oauth_settings.rs #, fuzzy msgid "The one in File › Options" msgstr "“文件 › 选项”中的设置" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The one registered for MailCraft" +msgstr "为 MailCraft 注册的 ID" + #. interface #: crates/ui-egui/src/backstage.rs #, fuzzy @@ -18444,6 +18702,12 @@ msgstr "范围需要一个结束日期" msgid "The range needs a day to start on" msgstr "范围需要一个开始日期" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The redirect port is a number from 1 to 65535, or empty for any free one" +msgstr "重定向端口是 1 到 65535 之间的数字,留空则使用任意空闲端口" + #. interface #: crates/ui-egui/src/report_problem.rs #, fuzzy @@ -18906,6 +19170,12 @@ msgstr "登录未成功。" msgid "The sign-in didn't work. Try again." msgstr "登录未成功。请重试。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "The sign-in is only sent to: {servers}" +msgstr "登录信息仅发送到:{servers}" + #. interface, what a command says #: crates/engine/src/sync_driver/calendar_plan.rs crates/ui-egui/src/shared_mailboxes.rs #, fuzzy @@ -19187,6 +19457,12 @@ msgstr "{address} 没有邮箱。" msgid "Thesaurus" msgstr "同义词库" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These addresses are outside your identity provider's domain: {hosts}" +msgstr "以下地址位于身份提供程序的域之外:{hosts}" + #. interface #: crates/ui-egui/src/dialogs.rs #, fuzzy @@ -19217,6 +19493,12 @@ msgstr "这些联系人无法在此处合并:可以更改的联系人少于两 msgid "These could not be removed. Remove them yourself:" msgstr "无法移除以下项目,请自行移除:" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." +msgstr "这些设置将不再属于 {provider}:MailCraft 将把此账户视为使用你自己的身份提供程序的账户,以上面的值为起点,并且你需要重新登录。" + #. interface #: crates/ui-egui/src/task_sync.rs #, fuzzy @@ -20441,6 +20723,12 @@ msgstr "" "\n" "在你允许之前,不会读取这些邮箱和日历的任何内容,来自共享邮箱的邮件和会议答复会在这台电脑上等待,也不会改用你自己的地址发送任何内容。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." +msgstr "要使用你自己的身份提供方登录,请先把接收和发送服务器改成你自己的:来自它的登录绝不会发送到 {provider} 的服务器。" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -20483,6 +20771,12 @@ msgstr "今天" msgid "Today could not be read." msgstr "无法读取今天。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Token address" +msgstr "令牌地址" + #. android, interface, name, ribbon #: apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/DueDates.kt apps/mailcraft-android/app/src/main/kotlin/work/mailcraft/android/TaskEditorScreen.kt crates/ui-egui/src/forms.rs crates/ui-egui/src/ribbon.rs crates/ui-egui/src/tasks_view.rs #, fuzzy @@ -20971,6 +21265,12 @@ msgstr "使用 YYYY-MM-DD" msgid "Use a Google app password, not your everyday Google account password." msgstr "请使用 Google 应用密码,而不是平时的 Google 账户密码。" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "Use a password instead" +msgstr "改用密码" + #. interface #: crates/ui-egui/src/account_setup.rs crates/ui-egui/src/account_setup/help.rs #, fuzzy @@ -20989,6 +21289,18 @@ msgstr "改用应用密码" msgid "Use https:// instead" msgstr "改用 https://" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use it" +msgstr "使用" + +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use my own identity provider" +msgstr "使用我自己的身份提供程序" + #. interface #: crates/ui-egui/src/calendar_view.rs #, fuzzy @@ -21007,6 +21319,12 @@ msgstr "使用系统设置" msgid "Use system setting follows Animation effects in Windows' settings. Where MailCraft can't read the system's setting yet, animations play until you choose Never play." msgstr "“使用系统设置”遵循 Windows 设置中的“动画效果”。如果 MailCraft 暂时无法读取系统设置,动画会照常播放,直到您选择“从不播放”。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Use your own identity provider instead…" +msgstr "改用你自己的身份提供程序…" + #. interface #: crates/ui-egui/src/account_setup.rs #, fuzzy @@ -21151,6 +21469,12 @@ msgstr "发送前等待" msgid "Wait for the other attachment preview to finish." msgstr "请等待另一个附件预览完成。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Wait for your identity provider's addresses" +msgstr "请等待身份提供程序的地址" + #. interface #: crates/ui-egui/src/sync_panel.rs #, fuzzy @@ -21169,6 +21493,12 @@ msgstr "等待 MailCraft 的 Google 注册" msgid "Waiting for the approval stopped unexpectedly" msgstr "等待审批的过程意外停止" +#. interface +#: crates/ui-egui/src/lib.rs +#, fuzzy +msgid "Waiting for the system's credential store…" +msgstr "正在等待系统的凭据存储…" + #. what a command says #: crates/engine/src/cmd/contacts_remote.rs #, fuzzy @@ -21833,6 +22163,12 @@ msgstr "您的证书和密钥" msgid "Your data was removed" msgstr "您的数据已移除" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your domain names {issuer} for signing in." +msgstr "你的域指定 {issuer} 用于登录。" + #. interface #: crates/ui-egui/src/account_setup/exchange.rs #, fuzzy @@ -22049,6 +22385,12 @@ msgstr "您所在组织的规则不允许您的账户执行此操作。这是您 msgid "Your own certificates and keys are used by MailCraft's desktop program: here Digital signatures are checked, and nothing is signed or decrypted." msgstr "MailCraft 桌面程序使用您自己的证书和密钥;此处只检查数字签名,不会进行签名或解密。" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "Your own identity provider" +msgstr "你自己的身份提供程序" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -22433,6 +22775,36 @@ msgstr "共享邮箱地址无法更改:请移除原邮箱并添加新的邮箱 msgid "a shared mailbox's rules are its own: this version doesn't make them" msgstr "共享邮箱有自己的规则:此版本无法创建这些规则" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers" +msgstr "使用身份提供程序的登录信息绝不会发送到 Microsoft 或 Google 的邮件服务器" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only sent to a mail server on this computer in a test" +msgstr "使用身份提供程序的登录信息仅在测试中发送到此计算机上的邮件服务器" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "a sign-in with your identity provider is only used with this account's own mail servers" +msgstr "使用身份提供程序的登录信息仅用于此账户自己的邮件服务器" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with your own identity provider is for mail only, not Microsoft Graph" +msgstr "使用你自己的身份提供程序的登录仅用于邮件,不用于 Microsoft Graph" + +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "a sign-in with {provider} comes back through a loopback port only" +msgstr "使用 {provider} 的登录只通过环回端口返回" + #. why a command can't run #: crates/engine/src/cmd/picture.rs #, fuzzy @@ -22457,6 +22829,12 @@ msgstr "签名图片须为 PNG、JPEG 或 GIF(许多邮件程序无法显示 msgid "a task needs a title" msgstr "任务必须有标题" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "access was refused on the sign-in page" +msgstr "登录页面上拒绝了访问" + #. what a command says, why a command can't run #: crates/engine/src/cmd/people.rs #, fuzzy @@ -22695,6 +23073,12 @@ msgstr "复制到 {folder} - {who}" msgid "couldn't make a secure connection to {host}: {reason}" msgstr "无法与 {host} 建立安全连接:{reason}" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "couldn't open a port on this computer for the sign-in to come back to" +msgstr "无法在此计算机上打开供登录返回的端口" + #. why a mail server couldn't be used #: crates/net/src/lib.rs #, fuzzy @@ -22731,6 +23115,18 @@ msgstr "输入密码登录" msgid "enter a user name to sign in" msgstr "输入用户名以登录" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "enter the client id registered for MailCraft at your identity provider" +msgstr "输入在身份提供程序处为 MailCraft 注册的客户端 ID" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "enter your identity provider's address (its issuer)" +msgstr "请输入你的身份提供程序的地址(其颁发者)" + #. interface #: crates/ui-egui/src/reading/remote.rs #, fuzzy @@ -22743,6 +23139,12 @@ msgstr "@{domain} 的所有人" msgid "expected and replacement must be on one line" msgstr "要查找的文本和替换文本都必须各占一行" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "find your identity provider's sign-in addresses (Discover), or enter them" +msgstr "查找身份提供程序的登录地址(发现),或手动输入" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23787,6 +24189,12 @@ msgstr "个人" msgid "pictures from the web are not downloaded: save the picture and add it from the file" msgstr "无法下载网络图片:请先保存图片,再从文件添加" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "port {port} on this computer is in use: choose another redirect port, or automatic" +msgstr "此计算机上的端口 {port} 已被占用:请选择其他重定向端口,或选择自动" + #. interface #: crates/ui-egui/src/forms.rs #, fuzzy @@ -23841,6 +24249,12 @@ msgstr "收件人地址包含 {words}" msgid "replies can go to at most {n} addresses" msgstr "回复最多可发送到 {n} 个地址" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "revocation" +msgstr "吊销" + #. name #: crates/engine/src/agent.rs #, fuzzy @@ -23983,6 +24397,12 @@ msgstr "首先登录账户" msgid "sign in to {who} first" msgstr "请先登录 {who}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "sign-in" +msgstr "登录" + #. why a mail server couldn't be used #: crates/proto/src/lib.rs #, fuzzy @@ -24114,6 +24534,12 @@ msgstr "该邮件不在这里" msgid "that message isn't waiting in the Outbox" msgstr "该邮件未在发件箱中等待" +#. why a mail server couldn't be used +#: crates/net/src/oauth.rs +#, fuzzy +msgid "that redirect port can't be used: choose another, or automatic" +msgstr "无法使用该重定向端口:请选择其他端口,或选择自动" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24312,6 +24738,18 @@ msgstr "更改后的单次日程已不存在" msgid "the check stopped unexpectedly" msgstr "检查意外停止" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the client id can only be letters, digits and punctuation, at most 200 of them" +msgstr "客户端 ID 只能包含字母、数字和标点符号,最多 200 个" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the client secret can only be letters, digits and punctuation" +msgstr "客户端密码只能包含字母、数字和标点符号" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24474,6 +24912,90 @@ msgstr "此邮件所在的文件夹已不在此计算机上" msgid "the folder was numbered anew while it was being read" msgstr "文件夹在读取过程中被重新编号" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the identity provider (issuer) address can't have a query or a fragment" +msgstr "身份提供程序(颁发者)地址不能包含查询或片段" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses" +msgstr "身份提供程序未在常用地址上描述自身:请输入其登录地址" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on through too many redirects" +msgstr "身份提供程序经过太多次重定向转发了其描述" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider sent its description on to an address on this computer, a private network or without https" +msgstr "身份提供程序将其描述转发到了此计算机上、专用网络中或不使用 https 的地址" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address can't have a query or a fragment" +msgstr "身份提供程序地址不能包含查询或片段" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's address {why}" +msgstr "身份提供程序地址{why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description couldn't be fetched: {other}" +msgstr "无法获取身份提供程序的描述:{other}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description gives a {what} address that {why}" +msgstr "身份提供程序的描述给出的{what}地址{why}" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description has no {what} address" +msgstr "身份提供程序的描述未给出{what}地址" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description is too long" +msgstr "身份提供程序的描述太长" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description isn't the JSON it should be" +msgstr "身份提供程序的描述不是预期的 JSON" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description names another issuer than the address entered: check the address, character for character" +msgstr "身份提供程序的描述所列颁发者与输入的地址不同:请逐字符检查地址" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't sign people in on its page (authorization code)" +msgstr "身份提供程序的描述称它不在其页面上为任何人登录(授权码)" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses" +msgstr "身份提供程序的描述称它不支持 MailCraft 使用的受保护登录(使用 S256 的 PKCE)" + #. what a command says #: crates/engine/src/import_pst.rs #, fuzzy @@ -24492,6 +25014,12 @@ msgstr "没有可供导入邮件的目标文件夹" msgid "the import was stopped" msgstr "导入已停止" +#. interface +#: crates/ui-egui/src/account_setup/oauth_settings.rs +#, fuzzy +msgid "the incoming and outgoing servers above" +msgstr "上面的接收和发送服务器" + #. what a command says #: crates/engine/src/cmd/keys.rs #, fuzzy @@ -24516,6 +25044,12 @@ msgstr "最后一个日历无法删除" msgid "the list shows every account's folder: open one account's folder, or name the folder" msgstr "列表显示每个账户的文件夹:请打开某个账户的文件夹,或指定文件夹" +#. why a mail server couldn't be used +#: crates/proto/src/oauthbearer.rs +#, fuzzy +msgid "the mail server's name can't be sent with a sign-in" +msgstr "邮件服务器的名称不能随登录信息一起发送" + #. what a command says #: crates/engine/src/cmd/file.rs #, fuzzy @@ -24654,6 +25188,12 @@ msgstr "平台拒绝或失败" msgid "the proposed end is not after the proposed start" msgstr "建议的结束时间必须晚于建议的开始时间" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "the redirect port must be between 1 and 65535, or automatic" +msgstr "重定向端口必须介于 1 和 65535 之间,或为自动" + #. what a command says #: crates/model/src/mailbox_followup.rs #, fuzzy @@ -24678,6 +25218,12 @@ msgstr "处理此结果会使账户保存的同步状态超过允许的大小" msgid "the result {why}" msgstr "结果 {why}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the revocation address {why}" +msgstr "吊销地址{why}" + #. what a command says #: crates/engine/src/cmd/calendar/selection.rs #, fuzzy @@ -24894,6 +25440,18 @@ msgstr "服务器不提供 STARTTLS" msgid "the server doesn't take a password on this connection" msgstr "服务器不接受在此连接中使用密码" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" +msgstr "服务器不接受通过 OAUTHBEARER 提供的令牌,而此账户的 OAuth 设置要求使用它" + +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for" +msgstr "服务器不接受通过 XOAUTH2 提供的令牌,而此账户的 OAuth 设置要求使用它" + #. why a mail server couldn't be used #: crates/proto/src/imap/mod.rs #, fuzzy @@ -24942,6 +25500,12 @@ msgstr "服务器不支持使用密码登录" msgid "the server offers no way to sign in with an access token" msgstr "服务器不支持使用访问令牌登录" +#. why a mail server couldn't be used +#: crates/net/src/sync.rs +#, fuzzy +msgid "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" +msgstr "服务器不提供使用访问令牌登录的方式(既不支持 OAUTHBEARER,也不支持 XOAUTH2)" + #. why a mail server couldn't be used #: crates/net/src/transport.rs #, fuzzy @@ -25080,6 +25644,18 @@ msgstr "服务器的响应嵌套得太深" msgid "the server's response is too long" msgstr "服务器的响应太长" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back from another identity provider than the one asked: nothing of it was used" +msgstr "登录从与所请求的不同的身份提供程序返回:未使用其中任何内容" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used" +msgstr "登录返回时没有你的身份提供程序的名称,而它声称总会提供:未使用其中任何内容" + #. what a command says #: crates/engine/src/cmd/signature.rs #, fuzzy @@ -25140,13 +25716,13 @@ msgid "the top level" msgstr "顶层" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token has a character that can't be sent" msgstr "用户名或访问令牌包含无法发送的字符" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "the user name or access token is too long to be sent" msgstr "用户名或访问令牌太长而无法发送" @@ -25224,7 +25800,7 @@ msgid "there is already a signature named \"{to}\"" msgstr "已经有一个名为“{to}”的签名" #. why a mail server couldn't be used -#: crates/proto/src/lib.rs +#: crates/proto/src/lib.rs crates/proto/src/oauthbearer.rs #, fuzzy msgid "there is no access token to sign in with" msgstr "没有可供登录的访问令牌" @@ -25241,6 +25817,12 @@ msgstr "没有账户" msgid "there is no account to remove" msgstr "没有可删除的账户" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "there is no earlier sign-in to renew" +msgstr "没有可续订的先前登录" + #. what a command says #: crates/engine/src/cmd/graph_switch.rs #, fuzzy @@ -25313,6 +25895,12 @@ msgstr "此次发送/接收针对的是另一个账户,不是 {name}" msgid "this Send/Receive was for the server {name} named before" msgstr "此次发送/接收针对的是之前指定的服务器 {name}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "this account doesn't sign in with your own identity provider" +msgstr "此账户不使用你自己的身份提供程序登录" + #. what a command says #: crates/engine/src/cmd/compose.rs crates/engine/src/cmd/send_later.rs #, fuzzy @@ -25537,6 +26125,12 @@ msgstr "发给 {people}" msgid "to {recipient}" msgstr "发送给 {recipient}" +#. why a mail server couldn't be used +#: crates/net/src/oauth/discovery.rs +#, fuzzy +msgid "token" +msgstr "令牌" + #. what a command says #: crates/engine/src/cmd/tasks.rs #, fuzzy @@ -25567,6 +26161,12 @@ msgstr "输入地址,例如 someone@example.org;或输入域,例如 @examp msgid "unexpected server response: {reason}" msgstr "意外的服务器响应:{reason}" +#. what a command says +#: crates/model/src/oauth.rs +#, fuzzy +msgid "use common, consumers, organizations, or a directory's id or domain as the tenant" +msgstr "使用 common、consumers、organizations,或目录的 ID 或域作为租户" + #. interface #: crates/ui-egui/src/security.rs #, fuzzy @@ -25727,6 +26327,54 @@ msgstr "您以其他人的身份登录" msgid "you@example.org" msgstr "you@example.org" +#. name +#: crates/model/src/mailbox.rs +#, fuzzy +msgid "your identity provider" +msgstr "你的身份提供程序" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider answered with status {status}" +msgstr "你的身份提供程序以状态 {status} 应答" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider can't sign anybody in just now: try again later" +msgstr "你的身份提供程序目前无法为任何人登录:请稍后再试" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider doesn't know this client id, or its client secret: check the OAuth settings" +msgstr "你的身份提供程序不认识此客户端 ID 或其客户端密码:请检查 OAuth 设置" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider no longer takes this sign-in: sign in again" +msgstr "你的身份提供程序不再接受此登录:请重新登录" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider refused the sign-in" +msgstr "你的身份提供程序拒绝了登录" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider won't give what was asked for: check the extra scopes in the OAuth settings" +msgstr "你的身份提供程序不提供所请求的内容:请检查 OAuth 设置中的额外范围" + +#. why a mail server couldn't be used +#: crates/net/src/oauth/custom.rs +#, fuzzy +msgid "your identity provider's addresses must start with https://" +msgstr "你的身份提供程序的地址必须以 https:// 开头" + #. interface #: crates/ui-egui/src/graph_switch.rs #, fuzzy @@ -25920,6 +26568,12 @@ msgstr "{days}(全天)" msgid "{day} at {time}" msgstr "{day} {time}" +#. interface +#: crates/ui-egui/src/account_setup.rs +#, fuzzy +msgid "{domain} says its mail signs in with an identity provider (OAuth 2.0)." +msgstr "{domain} 表明其邮件通过身份提供程序登录(OAuth 2.0)。" + #. interface #: crates/ui-egui/src/import_pst.rs crates/ui-egui/src/sync_panel.rs #, fuzzy diff --git a/crates/mcp/src/framing_tests.rs b/crates/mcp/src/framing_tests.rs index 02e68f9357..594cc84455 100644 --- a/crates/mcp/src/framing_tests.rs +++ b/crates/mcp/src/framing_tests.rs @@ -921,6 +921,8 @@ const WRITTEN_PARAMS: &[&str] = &[ "token", "clientId", "tenant", + "scopes", + "baseScopes", "session", "remember", "showAs", diff --git a/crates/mcp/src/tools.rs b/crates/mcp/src/tools.rs index 0f22c1e467..35dae2408a 100644 --- a/crates/mcp/src/tools.rs +++ b/crates/mcp/src/tools.rs @@ -293,6 +293,12 @@ pub(crate) const NAMING_PARAMS: &[&str] = &[ "url", "mailto", "fingerprint", + // An own identity provider's addresses, as Discover or an autoconfig document found them. + "issuer", + "oauthIssuer", + "authorizeUrl", + "tokenUrl", + "revokeUrl", ]; /// `v` with every string under one of [`NAMING_PARAMS`] that is one whole frame, as diff --git a/crates/model/src/ews_server.rs b/crates/model/src/ews_server.rs index 1cdde3f8bf..44a85a91b5 100644 --- a/crates/model/src/ews_server.rs +++ b/crates/model/src/ews_server.rs @@ -172,6 +172,14 @@ pub fn is_google_host(host: &str) -> bool { GOOGLE.iter().any(|google| is_within(&host, google)) } +/// Whether `host` is Microsoft's ([`is_exchange_online`], every one of its clouds) or Google's +/// ([`is_google_host`]): mail servers whose sign-in comes from their own provider, so a token +/// from the owner's own identity provider is never sent there, and an account that signs in with +/// one never names them (#1844 review). +pub fn is_microsoft_or_google_host(host: &str) -> bool { + is_exchange_online(host.trim()) || is_google_host(host) +} + /// Whether `host` is `domain` or a name under it (`mail.example.org` is within `example.org`; /// `evil-example.org` is not). pub fn is_within(host: &str, domain: &str) -> bool { diff --git a/crates/model/src/ews_server_tests.rs b/crates/model/src/ews_server_tests.rs index b85cbeacb5..fdfec943d7 100644 --- a/crates/model/src/ews_server_tests.rs +++ b/crates/model/src/ews_server_tests.rs @@ -132,3 +132,23 @@ fn google_hosts_are_google_s_and_nothing_that_looks_like_them() { assert!(!is_google_host(host), "{host}"); } } + +/// The servers a sign-in with an own identity provider never names or goes to (#1844 review): +/// Microsoft's in every cloud, Google's, whatever the case, spaces and a dot at the end. +#[test] +fn microsofts_and_googles_mail_servers_are_told_apart_from_an_owners_own() { + for host in [ + "outlook.office365.com", + "smtp.office365.com", + "OUTLOOK.OFFICE365.US", + "partner.outlook.cn", + "imap.gmail.com.", + " smtp.gmail.com ", + "imap.googlemail.com", + ] { + assert!(is_microsoft_or_google_host(host), "{host}"); + } + for host in ["mail.example.org", "outlook.example.org", "gmail.com.example.org", "192.0.2.10", ""] { + assert!(!is_microsoft_or_google_host(host), "{host}"); + } +} diff --git a/crates/model/src/lib.rs b/crates/model/src/lib.rs index a17237573b..60ffab857d 100644 --- a/crates/model/src/lib.rs +++ b/crates/model/src/lib.rs @@ -37,6 +37,7 @@ pub mod messages; #[cfg(test)] mod messages_tests; mod note; +pub mod oauth; mod offline; pub mod outlook_colors; pub mod pictures; @@ -80,7 +81,7 @@ pub use contact::{Contact, ContactKey, KeyKind, Labeled, PostalAddress}; pub use dav_down::{DavAsk, DavAskCollection, DavCalendar, DavChange, DavDownload, DavKnown, DavListing, DavProblem, DavRead, DavReadState}; pub use dav_server::{DavCollectionState, DavServer, origin_of}; pub use device_limits::{DeviceLimits, PHONE_DEFAULTS, PHONE_DOWNLOAD, PHONE_KEEP, PHONE_STORAGE}; -pub use ews_server::{EwsServer, is_exchange_online, is_google_host, is_microsoft_domain, is_within}; +pub use ews_server::{EwsServer, is_exchange_online, is_google_host, is_microsoft_domain, is_microsoft_or_google_host, is_within}; pub use gmail::{GmailCategory, is_gmail_host}; pub use headers::{HeaderBlock, HeaderLine}; pub use jmap_server::{JmapServer, MAX_JMAP_ID, is_jmap_id}; @@ -102,6 +103,7 @@ pub use message::{ }; pub use messages::Messages; pub use note::{JournalEntry, Note}; +pub use oauth::{ClientAuth, OAuthDefaults, SaslChoice}; pub use offline::{KeepOffline, OfflineWindow}; pub use outlook_colors::preset_category_color; pub use remote::{AccountChoice, Origin}; diff --git a/crates/model/src/mailbox.rs b/crates/model/src/mailbox.rs index d846b9f925..96eeb34b38 100644 --- a/crates/model/src/mailbox.rs +++ b/crates/model/src/mailbox.rs @@ -18,6 +18,7 @@ mod followup; mod snooze; #[path = "category_sweep.rs"] mod sweep; +use crate::oauth::{ClientAuth, SaslChoice}; use crate::sync::{RemoteFlags, same_category}; use crate::{ Action, Answers, Calendar, Contact, DavServer, Event, EwsServer, Id, JmapServer, KeepOffline, Message, ModelError, Rgb, Rule, Signature, Task, @@ -681,7 +682,14 @@ struct Identity { fn read_accounts<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result, D::Error> { let written = crate::load_limit::capped_vec::<_, serde_json::Value>(deserializer)?; let mut accounts = Vec::with_capacity(written.len()); - for value in written { + for mut value in written { + // (An IMAP account that signs in with an own identity provider is written with a kind of + // its own, which earlier versions don't know and so keep whole: it is an IMAP account.) + if value.get("kind").and_then(serde_json::Value::as_str) == Some(crate::oauth::OWN_SIGN_IN_KIND) + && let Some(fields) = value.as_object_mut() + { + fields.insert("kind".into(), serde_json::Value::String("imap".into())); + } // (Only an object has a `kind`; one without says nothing, which is a local account.) let unknown = value.get("kind").is_some_and(|kind| AccountKind::deserialize(kind).unwrap_or(AccountKind::Unknown) == AccountKind::Unknown); if !unknown { @@ -720,6 +728,15 @@ fn write_accounts(accounts: &[Account], serializer: S) -> fields.insert("id".into(), account.id.into()); list.serialize_element(&fields)?; } + // (Only an IMAP account's: one of another kind a file named an unknown provider for + // keeps its kind, #1844 review.) + None if account.kind == AccountKind::Imap && account.signs_in_with_own_provider() => { + let mut value = serde_json::to_value(account).map_err(serde::ser::Error::custom)?; + if let Some(fields) = value.as_object_mut() { + fields.insert("kind".into(), serde_json::Value::String(crate::oauth::OWN_SIGN_IN_KIND.into())); + } + list.serialize_element(&value)?; + } None => list.serialize_element(account)?, } } @@ -885,6 +902,23 @@ impl Account { if user.is_empty() { self.email.trim() } else { user } } + /// Whether it signs in with an identity provider of the owner's own + /// ([`OAuthProvider::Custom`]). + pub fn signs_in_with_own_provider(&self) -> bool { + self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom) + } + + /// The account's incoming or outgoing server that is Microsoft's or Google's + /// ([`crate::is_microsoft_or_google_host`]): one a sign-in with an own identity provider is + /// never sent to, so such an account can't name it (#1844 review). + pub fn microsoft_or_google_server(&self) -> Option<&str> { + [self.incoming.as_ref(), self.outgoing.as_ref()] + .into_iter() + .flatten() + .map(|server| server.host.as_str()) + .find(|host| crate::is_microsoft_or_google_host(host)) + } + /// A Microsoft account (it signs in with Microsoft) that is still kept in step by IMAP and /// SMTP: one that can switch to Microsoft Graph (R3.7). pub fn on_imap_with_microsoft(&self) -> bool { @@ -901,6 +935,11 @@ pub enum OAuthProvider { Microsoft, /// Gmail and Google Workspace over IMAP/SMTP XOAUTH2. Google, + /// The owner's own identity provider (an OpenID Connect or OAuth 2.0 server such as Keycloak + /// or Authentik) in front of their own IMAP and SMTP servers: its addresses, the client id + /// registered there and the rest are the account's own settings ([`OAuth::issuer`] and on), + /// not built in. Only an IMAP account signs in with one. + Custom, } impl OAuth { @@ -924,6 +963,7 @@ impl OAuthProvider { match s.trim().to_ascii_lowercase().as_str() { "microsoft" | "outlook" | "office365" | "microsoft365" => Some(OAuthProvider::Microsoft), "google" | "gmail" | "googleworkspace" => Some(OAuthProvider::Google), + "custom" | "generic" | "oidc" | "own" => Some(OAuthProvider::Custom), _ => None, } } @@ -932,6 +972,7 @@ impl OAuthProvider { match self { OAuthProvider::Microsoft => "microsoft", OAuthProvider::Google => "google", + OAuthProvider::Custom => "custom", } } @@ -939,6 +980,7 @@ impl OAuthProvider { match self { OAuthProvider::Microsoft => "Microsoft", OAuthProvider::Google => "Google", + OAuthProvider::Custom => "your identity provider", } } } @@ -948,6 +990,10 @@ impl OAuthProvider { #[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(default, rename_all = "camelCase")] pub struct OAuth { + /// Who signs the owner in. A file that names one this version doesn't know reads as + /// [`OAuthProvider::Custom`] with no addresses, which signs in nowhere until it is set up + /// again: never as Microsoft, whose page and hosts it would otherwise be given. + #[serde(deserialize_with = "crate::oauth::provider_read")] pub provider: OAuthProvider, /// The application (client) id presented to the provider; empty means the build's own. #[serde(skip_serializing_if = "String::is_empty")] @@ -960,6 +1006,51 @@ pub struct OAuth { /// never the directory's id. #[serde(skip_serializing_if = "Directory::is_unknown", deserialize_with = "crate::sync::lenient_or_default")] pub directory: Directory, + /// [`OAuthProvider::Custom`]: the identity provider's own address (its issuer), from which + /// its sign-in and token addresses are found (OpenID Connect Discovery, RFC 8414). Empty when + /// the two addresses were typed by hand instead. + #[serde(skip_serializing_if = "String::is_empty", deserialize_with = "crate::sync::lenient_or_default")] + pub issuer: String, + /// [`OAuthProvider::Custom`]: the page the owner signs in on (the authorization endpoint), + /// as found from the issuer or typed. + #[serde(skip_serializing_if = "String::is_empty", deserialize_with = "crate::sync::lenient_or_default")] + pub authorize: String, + /// [`OAuthProvider::Custom`]: where a code or a refresh token is traded for tokens. + #[serde(skip_serializing_if = "String::is_empty", deserialize_with = "crate::sync::lenient_or_default")] + pub token: String, + /// [`OAuthProvider::Custom`]: where a refresh token is given back when the account is + /// removed (RFC 7009); empty for none. + #[serde(skip_serializing_if = "String::is_empty", deserialize_with = "crate::sync::lenient_or_default")] + pub revoke: String, + /// [`OAuthProvider::Custom`]: what the tokens are asked for on top of + /// [`crate::oauth::CUSTOM_SCOPE`], separated by spaces; empty for nothing more. + #[serde(skip_serializing_if = "String::is_empty", deserialize_with = "crate::sync::lenient_or_default")] + pub scopes: String, + /// [`OAuthProvider::Custom`]: which of [`crate::oauth::CUSTOM_SCOPE`] the tokens are asked + /// for, separated by spaces, when the provider's description lists the scopes it has and some + /// of those aren't among them (a server may refuse a scope it doesn't know, RFC 6749 §3.3); + /// `None` for all of them. + #[serde(skip_serializing_if = "Option::is_none", deserialize_with = "crate::sync::lenient")] + pub base_scopes: Option, + /// [`OAuthProvider::Custom`]: how the mail servers are given the token. + #[serde(skip_serializing_if = "SaslChoice::is_auto", deserialize_with = "crate::sync::lenient_or_default")] + pub mechanism: SaslChoice, + /// The port on this computer the provider's page sends the owner back to; `None` for any + /// free one (what a provider that follows RFC 8252 §7.3 allows). + #[serde(skip_serializing_if = "Option::is_none", deserialize_with = "crate::sync::lenient")] + pub redirect_port: Option, + /// [`OAuthProvider::Custom`]: whether a client secret for it is kept in the system's + /// credential store. Never the secret itself. + #[serde(skip_serializing_if = "std::ops::Not::not", deserialize_with = "crate::sync::lenient_or_default")] + pub has_secret: bool, + /// [`OAuthProvider::Custom`]: how the client secret is sent to the token and revocation + /// addresses: in the `Authorization` header unless the provider takes it only in the form. + #[serde(skip_serializing_if = "ClientAuth::is_basic", deserialize_with = "crate::sync::lenient_or_default")] + pub client_auth: ClientAuth, + /// [`OAuthProvider::Custom`]: the provider says its page names itself when it sends the + /// owner back (RFC 9207), so an answer that doesn't is refused. + #[serde(skip_serializing_if = "std::ops::Not::not", deserialize_with = "crate::sync::lenient_or_default")] + pub issuer_in_response: bool, } /// A change made here to what a Microsoft account's server has that comparing with what the diff --git a/crates/model/src/mailbox_tests.rs b/crates/model/src/mailbox_tests.rs index 20141ade5b..a55280e2d3 100644 --- a/crates/model/src/mailbox_tests.rs +++ b/crates/model/src/mailbox_tests.rs @@ -892,8 +892,13 @@ fn a_file_from_before_the_jmap_setting_reads_and_writes_as_it_was() { assert_eq!(serde_json::to_string(&read).unwrap(), written); } - let oauth = - OAuth { provider: OAuthProvider::Microsoft, client_id: "app-id".into(), tenant: "organizations".into(), directory: Directory::Organisation }; + let oauth = OAuth { + provider: OAuthProvider::Microsoft, + client_id: "app-id".into(), + tenant: "organizations".into(), + directory: Directory::Organisation, + ..Default::default() + }; let microsoft = Account { id: 2, name: "Noor".into(), diff --git a/crates/model/src/oauth.rs b/crates/model/src/oauth.rs new file mode 100644 index 0000000000..6efd9cb6a1 --- /dev/null +++ b/crates/model/src/oauth.rs @@ -0,0 +1,434 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! The settings of an OAuth 2.0 sign-in beyond who signs the owner in ([`OAuth`]): the values +//! built in for Microsoft and Google, and the owner's own for an identity provider of their own +//! ([`OAuthProvider::Custom`]), with what makes them usable. +//! +//! Nothing here goes anywhere: these are settings, checked as text. The host that holds the +//! sockets uses them (`mailcraft-net`); the tokens and any client secret are never here. +//! +//! **Built in or the owner's.** Microsoft's and Google's addresses, scopes and mechanism are +//! the program's own ([`OAuthProvider::defaults`]) and can't be changed on such an account: only +//! its client id, tenant and redirect port can. An account whose addresses are anybody else's is +//! a [`OAuthProvider::Custom`] one, so that what may be sent to Microsoft's and Google's hosts +//! is never loosened by a setting ([`OAuth::check`]). + +use serde::{Deserialize, Serialize}; + +use crate::{ModelError, OAuth, OAuthProvider}; + +/// Where Microsoft signs people in. +pub const MICROSOFT_LOGIN: &str = "https://login.microsoftonline.com"; +/// What a Microsoft account's mail sign-in asks for: IMAP, SMTP, a refresh token and who signs in. +pub const MICROSOFT_MAIL_SCOPE: &str = + "https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send offline_access openid profile email"; +/// The mail servers a Microsoft account's token is for (as shown; the host decides by domain). +pub const MICROSOFT_HOSTS: [&str; 3] = ["outlook.office365.com", "smtp.office365.com", "smtp-mail.outlook.com"]; +/// Google's identity provider. +pub const GOOGLE_ISSUER: &str = "https://accounts.google.com"; +/// Google's sign-in page. +pub const GOOGLE_AUTHORIZE: &str = "https://accounts.google.com/o/oauth2/v2/auth"; +/// Google's token endpoint. +pub const GOOGLE_TOKEN: &str = "https://oauth2.googleapis.com/token"; +/// Where Google takes a refresh token back. +pub const GOOGLE_REVOKE: &str = "https://oauth2.googleapis.com/revoke"; +/// What a Google account's sign-in asks for: Gmail's IMAP and SMTP, and who signs in. +pub const GOOGLE_SCOPE: &str = "https://mail.google.com/ openid email"; +/// The mail servers a Google account's token is for. +pub const GOOGLE_HOSTS: [&str; 2] = ["imap.gmail.com", "smtp.gmail.com"]; +/// What an own identity provider is always asked for: who signs in, their address, and a refresh +/// token so that the owner isn't asked again each time a token runs out. +pub const CUSTOM_SCOPE: &str = "openid email offline_access"; + +/// Longest address of an identity provider, its pages or its endpoints. +pub const MAX_ENDPOINT: usize = 2048; +/// Longest list of extra scopes, in bytes. +pub const MAX_SCOPES: usize = 1024; +/// Most extra scopes. +pub const MAX_SCOPE_COUNT: usize = 32; +/// Longest client id. +pub const MAX_CLIENT_ID: usize = 200; + +/// How the mail servers are given an access token (SASL). +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum SaslChoice { + /// OAUTHBEARER (RFC 7628) when the server offers it, else XOAUTH2. + #[default] + #[serde(rename = "auto")] + Auto, + /// OAUTHBEARER only. + #[serde(rename = "oauthbearer")] + OAuthBearer, + /// XOAUTH2 only. + #[serde(rename = "xoauth2")] + XOAuth2, +} + +impl SaslChoice { + pub fn is_auto(&self) -> bool { + *self == SaslChoice::Auto + } + + pub fn parse(text: &str) -> Option { + match text.trim().to_ascii_lowercase().as_str() { + "" | "auto" | "automatic" => Some(SaslChoice::Auto), + "oauthbearer" => Some(SaslChoice::OAuthBearer), + "xoauth2" => Some(SaslChoice::XOAuth2), + _ => None, + } + } + + pub fn code(self) -> &'static str { + match self { + SaslChoice::Auto => "auto", + SaslChoice::OAuthBearer => "oauthbearer", + SaslChoice::XOAuth2 => "xoauth2", + } + } +} + +/// How a client with a secret proves who it is to the token and revocation addresses (RFC 6749 +/// §2.3.1). A client without a secret names itself in the form either way (§3.2.1). +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub enum ClientAuth { + /// `client_secret_basic`: the client id and secret in the `Authorization` header (HTTP Basic, + /// each form-encoded first). Every provider must take it (§2.3.1), and it is what a provider + /// that says nothing takes (RFC 8414 §2). + #[default] + #[serde(rename = "basic")] + Basic, + /// `client_secret_post`: the two in the form, for a provider that takes only that. + #[serde(rename = "post")] + Post, +} + +impl ClientAuth { + pub fn is_basic(&self) -> bool { + *self == ClientAuth::Basic + } + + pub fn parse(text: &str) -> Option { + match text.trim().to_ascii_lowercase().as_str() { + "" | "basic" | "client_secret_basic" | "header" => Some(ClientAuth::Basic), + "post" | "client_secret_post" | "form" | "body" => Some(ClientAuth::Post), + _ => None, + } + } + + pub fn code(self) -> &'static str { + match self { + ClientAuth::Basic => "basic", + ClientAuth::Post => "post", + } + } + + /// The name the standards and providers' descriptions give it. + pub fn method(self) -> &'static str { + match self { + ClientAuth::Basic => "client_secret_basic", + ClientAuth::Post => "client_secret_post", + } + } +} + +/// Everything a sign-in uses, as it is used: built in for Microsoft and Google, the account's +/// own for an own identity provider ([`OAuth::effective`]). +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct OAuthDefaults { + pub provider: OAuthProvider, + /// The identity provider's own address; empty when there is none to show. + pub issuer: String, + pub authorize: String, + pub token: String, + /// Empty for none. + pub revoke: String, + /// Everything the tokens are asked for, separated by spaces. + pub scopes: String, + pub mechanism: SaslChoice, + /// How a client secret is sent, when there is one. + pub client_auth: ClientAuth, + /// Whether the provider's page names itself (`iss`) when it sends the owner back (RFC 9207), + /// so that an answer without it is refused. + pub issuer_in_response: bool, + /// The client id: the account's own, or empty for the build's own (Microsoft and Google only). + pub client_id: String, + /// Whether the client id used is the build's own. + pub built_in_client: bool, + /// The mail servers the token is for, when they are the provider's own; empty for an own + /// identity provider, whose token goes to the account's own IMAP and SMTP servers only. + pub hosts: Vec, + pub redirect_port: Option, +} + +impl OAuthProvider { + /// The values built in for this provider. `tenant` is Microsoft's directory (empty, or one + /// that can't be part of an address, reads as `common`); the others have none. An own + /// identity provider has no addresses built in: only what it is always asked for. + pub fn defaults(self, tenant: &str) -> OAuthDefaults { + match self { + OAuthProvider::Microsoft => { + let tenant = usable_tenant(tenant).unwrap_or("common"); + OAuthDefaults { + provider: self, + issuer: format!("{MICROSOFT_LOGIN}/{tenant}/v2.0"), + authorize: format!("{MICROSOFT_LOGIN}/{tenant}/oauth2/v2.0/authorize"), + token: format!("{MICROSOFT_LOGIN}/{tenant}/oauth2/v2.0/token"), + revoke: String::new(), + scopes: MICROSOFT_MAIL_SCOPE.into(), + mechanism: SaslChoice::XOAuth2, + client_auth: ClientAuth::Post, + issuer_in_response: false, + client_id: String::new(), + built_in_client: true, + hosts: MICROSOFT_HOSTS.iter().map(|h| h.to_string()).collect(), + redirect_port: None, + } + } + OAuthProvider::Google => OAuthDefaults { + provider: self, + issuer: GOOGLE_ISSUER.into(), + authorize: GOOGLE_AUTHORIZE.into(), + token: GOOGLE_TOKEN.into(), + revoke: GOOGLE_REVOKE.into(), + scopes: GOOGLE_SCOPE.into(), + mechanism: SaslChoice::XOAuth2, + client_auth: ClientAuth::Post, + issuer_in_response: false, + client_id: String::new(), + built_in_client: true, + hosts: GOOGLE_HOSTS.iter().map(|h| h.to_string()).collect(), + redirect_port: None, + }, + OAuthProvider::Custom => { + OAuthDefaults { provider: self, scopes: CUSTOM_SCOPE.into(), mechanism: SaslChoice::Auto, ..OAuthDefaults::default() } + } + } + } +} + +impl OAuth { + /// Settings for an own identity provider with nothing filled in yet. + pub fn custom() -> OAuth { + OAuth { provider: OAuthProvider::Custom, ..OAuth::default() } + } + + /// What a sign-in with these settings uses: the provider's built-in values with the + /// account's client id, tenant and redirect port over them; for an own identity provider, + /// the account's own values, with [`CUSTOM_SCOPE`] before its extra scopes. + pub fn effective(&self) -> OAuthDefaults { + let mut used = self.provider.defaults(&self.tenant); + let client = self.client_id.trim(); + if !client.is_empty() { + used.client_id = client.to_string(); + used.built_in_client = false; + } + used.redirect_port = self.redirect_port; + if self.provider == OAuthProvider::Custom { + used.built_in_client = false; + used.issuer = self.issuer.trim().to_string(); + used.authorize = self.authorize.trim().to_string(); + used.token = self.token.trim().to_string(); + used.revoke = self.revoke.trim().to_string(); + used.mechanism = self.mechanism; + used.client_auth = self.client_auth; + used.issuer_in_response = self.issuer_in_response; + let base = self.base_scopes.as_deref().map_or_else(|| CUSTOM_SCOPE.to_string(), standard_scopes); + used.scopes = scope_list(&base, &self.scopes); + } + used + } + + /// Whether these settings can be saved: every value that is there is one that can be used + /// (addresses `https://` ones, or `http://` ones on this computer; no user name or fragment + /// in them; scopes of the characters RFC 6749 §3.3 allows; a client id, tenant and port that + /// can be sent). An own identity provider needs a client id. Microsoft's and Google's + /// accounts have no addresses, scopes or mechanism of their own: those are built in. + /// + /// It doesn't say whether a sign-in can start: [`OAuth::ready`] does. + pub fn check(&self) -> Result<(), ModelError> { + let invalid = |text: String| Err(ModelError::Invalid(text)); + let client = self.client_id.trim(); + if client.len() > MAX_CLIENT_ID || !client.bytes().all(|b| b.is_ascii_graphic()) { + return invalid("the client id can only be letters, digits and punctuation, at most 200 of them".into()); + } + if self.redirect_port == Some(0) { + return invalid("the redirect port must be between 1 and 65535, or automatic".into()); + } + if self.provider == OAuthProvider::Microsoft && !self.tenant.trim().is_empty() && usable_tenant(&self.tenant).is_none() { + return invalid("use common, consumers, organizations, or a directory's id or domain as the tenant".into()); + } + let own = [&self.issuer, &self.authorize, &self.token, &self.revoke, &self.scopes].iter().any(|value| !value.trim().is_empty()) + || !self.mechanism.is_auto() + || !self.client_auth.is_basic() + || self.issuer_in_response + || self.base_scopes.is_some() + || self.has_secret; + if self.provider != OAuthProvider::Custom { + if own { + return invalid(format!( + "{}'s addresses, scopes and mechanism are built in: an account with its own is set up for your own identity provider", + self.provider.label() + )); + } + return Ok(()); + } + if client.is_empty() { + return invalid("enter the client id registered for MailCraft at your identity provider".into()); + } + for (what, value) in + [("identity provider (issuer)", &self.issuer), ("sign-in", &self.authorize), ("token", &self.token), ("revocation", &self.revoke)] + { + if let Err(why) = endpoint(value) { + return invalid(format!("the {what} address {why}")); + } + } + if !self.issuer.trim().is_empty() && self.issuer.contains(['?', '#']) { + return invalid("the identity provider (issuer) address can't have a query or a fragment".into()); + } + if let Some(base) = &self.base_scopes + && (base.len() > CUSTOM_SCOPE.len() || base.split_ascii_whitespace().any(|s| !CUSTOM_SCOPE.split(' ').any(|c| c == s))) + { + return invalid(format!("the standard scopes can only be some of {CUSTOM_SCOPE}")); + } + scopes(&self.scopes).map_err(ModelError::Invalid) + } + + /// Whether a sign-in can start with these settings ([`OAuth::check`], and for an own + /// identity provider both its sign-in and token addresses, found or typed). + pub fn ready(&self) -> Result<(), ModelError> { + self.check()?; + if self.provider == OAuthProvider::Custom && (self.authorize.trim().is_empty() || self.token.trim().is_empty()) { + return Err(ModelError::Invalid("find your identity provider's sign-in addresses (Discover), or enter them".into())); + } + Ok(()) + } + + /// The values a remembered sign-in belongs to: changing any of them needs a fresh sign-in on + /// the provider's page, so that a changed setting never sends a remembered token anywhere new. + /// An own provider's revocation address is one of them: the refresh token goes there when the + /// account is removed (RFC 7009). (Microsoft's and Google's are built in, and their sign-ins + /// stay remembered under the names they always had.) + pub fn binding(&self) -> String { + let used = self.effective(); + if self.provider == OAuthProvider::Custom { + // (Each value with its length before it: values may hold the separator, and two + // different settings must never come to the same binding.) + let field = |value: &str| format!("{}:{value}", value.len()); + return format!( + "{}|{}|{}|{}|{}", + self.provider.code(), + field(&used.issuer), + field(&used.token), + field(&used.client_id), + field(&used.revoke) + ); + } + format!("{}|{}|{}|{}", self.provider.code(), used.issuer, used.token, used.client_id) + } +} + +/// Of `asked`, the scopes of [`CUSTOM_SCOPE`], in its order (anything else in a hand-edited file is +/// never asked for in their place). +fn standard_scopes(asked: &str) -> String { + CUSTOM_SCOPE.split(' ').filter(|s| asked.split_ascii_whitespace().any(|a| a == *s)).collect::>().join(" ") +} + +/// Which of [`CUSTOM_SCOPE`] to ask an own identity provider for, from the scopes its description +/// lists (`scopes_supported`, RFC 8414 §2): `None` for all of them, when it lists none (it needn't) +/// or lists them all; else those it lists, so that a provider that refuses a scope it doesn't +/// know (RFC 6749 §3.3) is never asked for one. +pub fn base_scopes_for(supported: &[String]) -> Option { + if supported.is_empty() { + return None; + } + let listed: Vec<&str> = CUSTOM_SCOPE.split(' ').filter(|s| supported.iter().any(|l| l == s)).collect(); + (listed.len() < CUSTOM_SCOPE.split(' ').count()).then(|| listed.join(" ")) +} + +/// `base` and the owner's `extra` scopes, each once, in that order. +pub fn scope_list(base: &str, extra: &str) -> String { + let mut all: Vec<&str> = Vec::new(); + for scope in base.split_ascii_whitespace().chain(extra.split_ascii_whitespace()) { + if !all.contains(&scope) { + all.push(scope); + } + } + all.join(" ") +} + +/// Whether `text` is a list of scopes that can be sent: at most [`MAX_SCOPE_COUNT`] of them in +/// [`MAX_SCOPES`] bytes, each of the characters RFC 6749 §3.3 allows. +pub fn scopes(text: &str) -> Result<(), String> { + if text.len() > MAX_SCOPES { + return Err("the extra scopes are too long".into()); + } + let mut count = 0usize; + for scope in text.split([' ', '\t']).filter(|s| !s.is_empty()) { + count = count.saturating_add(1); + if !scope.bytes().all(|b| b == 0x21 || (0x23..=0x5B).contains(&b) || (0x5D..=0x7E).contains(&b)) { + return Err("a scope can only be letters, digits and punctuation other than \" and \\".into()); + } + } + if count > MAX_SCOPE_COUNT { + return Err(format!("at most {MAX_SCOPE_COUNT} extra scopes")); + } + Ok(()) +} + +/// Whether `text` is an address an identity provider can be reached at: empty, or an absolute +/// `https://` one (an `http://` one only on this computer) with no user name or password and no +/// fragment, at most [`MAX_ENDPOINT`] bytes. The reason when not, to follow "the … address". +pub fn endpoint(text: &str) -> Result<(), String> { + let text = text.trim(); + if text.is_empty() { + return Ok(()); + } + if text.len() > MAX_ENDPOINT { + return Err("is too long".into()); + } + if text.chars().any(|c| c.is_whitespace() || c.is_control()) { + return Err("can't have spaces in it".into()); + } + let Some(link) = mailcraft_link::WebLink::parse(text) else { return Err("isn't a web address".into()) }; + if !link.is_https() && !is_loopback(link.host()) { + return Err("must start with https://".into()); + } + let after_scheme = text.split_once("://").map_or("", |(_, rest)| rest); + let authority = after_scheme.split(['/', '?', '#']).next().unwrap_or(""); + if authority.contains('@') { + return Err("can't have a user name or password in it".into()); + } + if text.contains('#') { + return Err("can't have a fragment (#) in it".into()); + } + Ok(()) +} + +/// Whether `host` (as [`mailcraft_link::WebLink::host`] writes it) is this computer. +pub fn is_loopback(host: &str) -> bool { + matches!(host, "127.0.0.1" | "[::1]" | "localhost") +} + +/// Microsoft's directory when it can be part of an address: letters, digits, dots and hyphens. +fn usable_tenant(tenant: &str) -> Option<&str> { + let tenant = tenant.trim(); + let plain = !tenant.is_empty() && tenant.len() <= 253 && tenant.bytes().all(|b| b.is_ascii_alphanumeric() || matches!(b, b'.' | b'-')); + let edges = |b: Option| b.is_some_and(|b| b.is_ascii_alphanumeric()); + (plain && edges(tenant.bytes().next()) && edges(tenant.bytes().next_back()) && !tenant.contains("..")).then_some(tenant) +} + +/// [`OAuth::provider`] as a file has it: one this version doesn't know is an own identity +/// provider with nothing set up, never Microsoft. +pub(crate) fn provider_read<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result { + let value = serde_json::Value::deserialize(deserializer)?; + Ok(value.as_str().and_then(OAuthProvider::parse).unwrap_or(OAuthProvider::Custom)) +} + +/// The kind an IMAP account that signs in with an own identity provider is written with, so that +/// an earlier MailCraft, which can't read such a sign-in, keeps the account whole as one of a kind +/// it doesn't know ([`crate::AccountKind::Unknown`]) instead of failing to open the mailbox. +pub(crate) const OWN_SIGN_IN_KIND: &str = "imapOwnSignIn"; + +#[cfg(test)] +#[path = "oauth_custom_tests.rs"] +mod oauth_custom_tests; diff --git a/crates/model/src/oauth_custom_tests.rs b/crates/model/src/oauth_custom_tests.rs new file mode 100644 index 0000000000..941ef1350d --- /dev/null +++ b/crates/model/src/oauth_custom_tests.rs @@ -0,0 +1,286 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! Signing in with an own identity provider: the settings, how they are written and read, and +//! what is refused. + +use proptest::prelude::*; + +use crate::oauth::{CUSTOM_SCOPE, GOOGLE_TOKEN, MICROSOFT_MAIL_SCOPE, endpoint, scopes}; +use crate::{Account, AccountKind, Mailbox, OAuth, OAuthProvider, SaslChoice}; + +fn own() -> OAuth { + OAuth { + provider: OAuthProvider::Custom, + client_id: "mailcraft".into(), + issuer: "https://id.example.org/realms/mail".into(), + authorize: "https://id.example.org/realms/mail/protocol/openid-connect/auth".into(), + token: "https://id.example.org/realms/mail/protocol/openid-connect/token".into(), + revoke: "https://id.example.org/realms/mail/protocol/openid-connect/revoke".into(), + scopes: "mail".into(), + mechanism: SaslChoice::OAuthBearer, + redirect_port: Some(53_682), + has_secret: true, + ..OAuth::default() + } +} + +fn imap_account(oauth: OAuth) -> Account { + Account { id: 7, email: "alice@example.org".into(), kind: AccountKind::Imap, oauth: Some(oauth), ..Default::default() } +} + +#[test] +fn the_settings_go_round_and_come_back() { + let oauth = own(); + let text = serde_json::to_string(&oauth).unwrap(); + assert_eq!(serde_json::from_str::(&text).unwrap(), oauth); + assert!( + text.contains("\"provider\":\"custom\"") && text.contains("\"mechanism\":\"oauthbearer\"") && text.contains("\"hasSecret\":true"), + "{text}" + ); + // A secret is never part of the settings: only that there is one. + assert!(!text.to_ascii_lowercase().contains("secret\":\""), "{text}"); +} + +#[test] +fn a_file_from_before_reads_as_it_did() { + let old: OAuth = serde_json::from_str(r#"{"provider":"google","clientId":"abc"}"#).unwrap(); + assert_eq!((old.provider, old.client_id.as_str(), old.issuer.as_str(), old.mechanism), (OAuthProvider::Google, "abc", "", SaslChoice::Auto)); + // Nothing new is written for an account that has none of it. + assert_eq!(serde_json::to_string(&old).unwrap(), r#"{"provider":"google","clientId":"abc"}"#); + // Nothing said is Microsoft, as ever. + assert_eq!(serde_json::from_str::("{}").unwrap().provider, OAuthProvider::Microsoft); +} + +#[test] +fn a_provider_this_version_doesnt_know_is_never_microsoft() { + for provider in [r#""carrierPigeon""#, "7", "null", r#"{"x":1}"#, r#""Microsoft365x""#] { + let oauth: OAuth = serde_json::from_str(&format!(r#"{{"provider":{provider}}}"#)).unwrap(); + assert_eq!(oauth.provider, OAuthProvider::Custom, "{provider}"); + // With no addresses, it can't sign in anywhere. + assert!(oauth.ready().is_err()); + } + for (word, provider) in [("microsoft", OAuthProvider::Microsoft), ("google", OAuthProvider::Google), ("custom", OAuthProvider::Custom)] { + assert_eq!(serde_json::from_str::(&format!(r#"{{"provider":"{word}"}}"#)).unwrap().provider, provider); + } + // A new value that can't be read doesn't stop the rest being read. + let odd: OAuth = serde_json::from_str(r#"{"provider":"custom","clientId":"c","mechanism":"carrier","redirectPort":-4,"issuer":7}"#).unwrap(); + assert_eq!((odd.client_id.as_str(), odd.mechanism, odd.redirect_port, odd.issuer.as_str()), ("c", SaslChoice::Auto, None, "")); +} + +#[test] +fn an_earlier_version_keeps_such_an_account_whole_instead_of_failing_to_open_the_mailbox() { + let mut mb = Mailbox::default(); + mb.accounts.push(imap_account(own())); + let file = serde_json::to_value(&mb).unwrap(); + let written = &file["accounts"][0]; + // Written with a kind earlier versions don't know: they keep such an account as its file has it. + assert_eq!(written["kind"], "imapOwnSignIn"); + // And read back here as the IMAP account it is. + let back: Mailbox = serde_json::from_value(file.clone()).unwrap(); + assert_eq!(back.accounts[0].kind, AccountKind::Imap); + assert_eq!(back.accounts[0].oauth, Some(own())); + // A Microsoft or Google one is written as ever. + let mut plain = Mailbox::default(); + plain.accounts.push(imap_account(OAuth { provider: OAuthProvider::Google, ..OAuth::default() })); + assert_eq!(serde_json::to_value(&plain).unwrap()["accounts"][0]["kind"], "imap"); + // An account of another kind whose file names a provider this version reads as its own keeps + // its kind when written and read back (#1844 review). + let mut other = Mailbox::default(); + other.accounts.push(Account { kind: AccountKind::Microsoft, ..imap_account(own()) }); + let file = serde_json::to_value(&other).unwrap(); + assert_eq!(file["accounts"][0]["kind"], "microsoft"); + let back: Mailbox = serde_json::from_value(file).unwrap(); + assert_eq!(back.accounts[0].kind, AccountKind::Microsoft); +} + +#[test] +fn what_is_used_is_built_in_for_microsoft_and_google_and_the_accounts_own_otherwise() { + let microsoft = OAuth { tenant: "contoso.example".into(), ..OAuth::default() }.effective(); + assert_eq!(microsoft.token, "https://login.microsoftonline.com/contoso.example/oauth2/v2.0/token"); + assert_eq!((microsoft.scopes.as_str(), microsoft.mechanism, microsoft.built_in_client), (MICROSOFT_MAIL_SCOPE, SaslChoice::XOAuth2, true)); + // A tenant that can't be part of an address is `common`, as in the sign-in itself. + assert!(OAuth { tenant: "a/../b".into(), ..OAuth::default() }.effective().token.contains("/common/")); + let google = OAuth { provider: OAuthProvider::Google, client_id: "mine".into(), ..OAuth::default() }.effective(); + assert_eq!((google.token.as_str(), google.client_id.as_str(), google.built_in_client), (GOOGLE_TOKEN, "mine", false)); + let custom = own().effective(); + assert_eq!(custom.scopes, format!("{CUSTOM_SCOPE} mail")); + assert_eq!((custom.mechanism, custom.redirect_port, custom.hosts.is_empty()), (SaslChoice::OAuthBearer, Some(53_682), true)); + // A scope said twice is asked for once. + assert_eq!(OAuth { scopes: "email mail mail".into(), ..own() }.effective().scopes, format!("{CUSTOM_SCOPE} mail")); +} + +#[test] +fn microsofts_and_googles_built_in_values_cant_be_changed_on_their_accounts() { + for provider in [OAuthProvider::Microsoft, OAuthProvider::Google] { + let base = OAuth { provider, ..OAuth::default() }; + assert!(base.check().is_ok()); + for changed in [ + OAuth { token: "https://id.example.org/token".into(), ..base.clone() }, + OAuth { issuer: "https://id.example.org".into(), ..base.clone() }, + OAuth { scopes: "more".into(), ..base.clone() }, + OAuth { mechanism: SaslChoice::OAuthBearer, ..base.clone() }, + ] { + assert!(changed.check().is_err(), "{changed:?}"); + } + // Their client id and redirect port can. + assert!(OAuth { client_id: "mine".into(), redirect_port: Some(8_400), ..base.clone() }.check().is_ok()); + } +} + +#[test] +fn an_own_provider_needs_a_client_id_and_its_two_addresses_to_sign_in() { + assert!(own().ready().is_ok()); + assert!(OAuth { client_id: String::new(), ..own() }.check().is_err()); + // The addresses may be found later (Discover): saved without them, not signed in with. + let found_later = OAuth { authorize: String::new(), token: String::new(), ..own() }; + assert!(found_later.check().is_ok() && found_later.ready().is_err()); + // Typed by hand, no issuer is needed. + assert!(OAuth { issuer: String::new(), ..own() }.ready().is_ok()); + assert!(OAuth::custom().ready().is_err()); +} + +#[test] +fn addresses_that_cant_be_used_are_refused() { + for bad in [ + "http://id.example.org/token", + "https://user:pw@id.example.org/token", + "https://id.example.org/token#x", + "javascript:alert(1)", + "ftp://id.example.org/", + "https://id.example.org/a b", + "https://id.example.org/\r\nHost: x", + "https://id.example.org/\0", + "id.example.org/token", + "https:///token", + ] { + assert!(endpoint(bad).is_err(), "{bad:?}"); + assert!(OAuth { token: bad.into(), ..own() }.check().is_err(), "{bad:?}"); + } + assert!(endpoint(&format!("https://id.example.org/{}", "a".repeat(5_000))).is_err()); + for good in + ["https://id.example.org/token", "https://xn--bcher-kva.example/t", "http://127.0.0.1:8080/token", "http://[::1]/t", "http://localhost/t", ""] + { + assert!(endpoint(good).is_ok(), "{good:?}"); + } + assert!(OAuth { issuer: "https://id.example.org/realms/mail?x=1".into(), ..own() }.check().is_err()); +} + +#[test] +fn scopes_ports_and_client_ids_that_cant_be_sent_are_refused() { + for bad in ["a\"b", "a\\b", "é", "a\nb", &"s ".repeat(40), &"x".repeat(2_000)] { + assert!(scopes(bad).is_err(), "{bad:?}"); + } + assert!(scopes("openid mail urn:ietf:params:oauth:scope:mail").is_ok()); + assert!(OAuth { redirect_port: Some(0), ..own() }.check().is_err()); + for bad in ["has space", "a\u{7f}", &"c".repeat(201), "ünïcode"] { + assert!(OAuth { client_id: bad.into(), ..own() }.check().is_err(), "{bad:?}"); + } + assert!(OAuth { tenant: "../evil".into(), ..OAuth::default() }.check().is_err()); +} + +#[test] +fn the_binding_changes_with_every_value_a_remembered_sign_in_belongs_to() { + let base = own().binding(); + for changed in [ + OAuth { issuer: "https://id2.example.org".into(), ..own() }, + OAuth { token: "https://id.example.org/other".into(), ..own() }, + OAuth { client_id: "other".into(), ..own() }, + // Where the refresh token goes when the account is removed. + OAuth { revoke: "https://elsewhere.example.org/revoke".into(), ..own() }, + OAuth { provider: OAuthProvider::Microsoft, ..OAuth::default() }, + ] { + assert_ne!(changed.binding(), base, "{changed:?}"); + } + // Microsoft's and Google's stay what they were: their remembered sign-ins are found as before. + let microsoft = OAuth { provider: OAuthProvider::Microsoft, ..OAuth::default() }.binding(); + assert_eq!(microsoft.matches('|').count(), 3, "{microsoft}"); + // Not with the ones it doesn't. + assert_eq!(OAuth { scopes: String::new(), mechanism: SaslChoice::XOAuth2, redirect_port: None, ..own() }.binding(), base); +} + +/// Values may hold the separator: two settings that differ only in where it falls never come to +/// the same binding, so a sign-in remembered under one is never found (and its refresh token +/// never sent away) under the other (#1844 review). +#[test] +fn settings_that_move_a_separator_between_values_are_bound_apart() { + let a = OAuth { client_id: "mailcraft".into(), revoke: "https://id.example.org/revoke|https://attacker.example/revoke".into(), ..own() }; + let b = OAuth { client_id: "mailcraft|https://id.example.org/revoke".into(), revoke: "https://attacker.example/revoke".into(), ..own() }; + assert_ne!(a.binding(), b.binding()); +} + +proptest! { + #[test] + fn checking_never_panics(issuer in ".{0,300}", token in ".{0,300}", scope in ".{0,300}", client in ".{0,300}", tenant in ".{0,80}", port in proptest::option::of(any::())) { + for provider in [OAuthProvider::Microsoft, OAuthProvider::Google, OAuthProvider::Custom] { + let oauth = OAuth { provider, issuer: issuer.clone(), token: token.clone(), authorize: token.clone(), revoke: issuer.clone(), scopes: scope.clone(), client_id: client.clone(), tenant: tenant.clone(), redirect_port: port, ..OAuth::default() }; + let _ = oauth.check(); + let _ = oauth.ready(); + let _ = oauth.effective(); + let _ = oauth.binding(); + } + } + + #[test] + fn reading_any_provider_value_never_panics_and_is_never_microsoft_unless_it_says_so(value in ".{0,40}") { + let json = serde_json::json!({ "provider": value }); + let oauth: OAuth = serde_json::from_value(json).unwrap(); + if oauth.provider == OAuthProvider::Microsoft { + prop_assert_eq!(OAuthProvider::parse(&value), Some(OAuthProvider::Microsoft)); + } + } +} + +#[test] +fn how_the_secret_is_sent_is_kept_and_the_standard_way_is_the_default() { + use crate::ClientAuth; + // RFC 6749 §2.3.1: the header, which every provider takes, unless the account says the form. + assert_eq!(own().client_auth, ClientAuth::Basic); + assert!(!serde_json::to_string(&own()).unwrap().contains("clientAuth")); + let post = OAuth { client_auth: ClientAuth::Post, issuer_in_response: true, ..own() }; + let text = serde_json::to_string(&post).unwrap(); + assert!(text.contains("\"clientAuth\":\"post\"") && text.contains("\"issuerInResponse\":true"), "{text}"); + assert_eq!(serde_json::from_str::(&text).unwrap(), post); + assert_eq!((post.effective().client_auth, post.effective().issuer_in_response), (ClientAuth::Post, true)); + // A way this version doesn't know reads as the standard one, and the account still opens. + let odd: OAuth = serde_json::from_str(r#"{"provider":"custom","clientId":"m","clientAuth":"private_key_jwt","issuerInResponse":"yes"}"#).unwrap(); + assert_eq!((odd.client_auth, odd.issuer_in_response), (ClientAuth::Basic, false)); + // Names a command may use. + for (text, way) in [("basic", ClientAuth::Basic), ("client_secret_post", ClientAuth::Post), (" POST ", ClientAuth::Post)] { + assert_eq!(ClientAuth::parse(text), Some(way), "{text}"); + } + assert_eq!(ClientAuth::parse("private_key_jwt"), None); + // Microsoft's and Google's are built in. + for provider in [OAuthProvider::Microsoft, OAuthProvider::Google] { + assert!(OAuth { provider, client_auth: ClientAuth::Post, ..OAuth::default() }.check().is_err()); + assert!(OAuth { provider, issuer_in_response: true, ..OAuth::default() }.check().is_err()); + } +} + +/// A provider that lists its scopes is asked only for the standard ones it lists (RFC 6749 §3.3: +/// it may refuse one it doesn't know); one that lists none, or all of them, for all three. +#[test] +fn only_the_standard_scopes_a_provider_lists_are_asked_for() { + use crate::oauth::base_scopes_for; + let list = |all: &[&str]| all.iter().map(|s| s.to_string()).collect::>(); + assert_eq!(base_scopes_for(&[]), None); + assert_eq!(base_scopes_for(&list(&["openid", "email", "offline_access", "profile"])), None); + assert_eq!(base_scopes_for(&list(&["openid", "email", "profile"])).as_deref(), Some("openid email")); + assert_eq!(base_scopes_for(&list(&["mail", "offline_access"])).as_deref(), Some("offline_access")); + assert_eq!(base_scopes_for(&list(&["mail"])).as_deref(), Some("")); + + assert_eq!(own().effective().scopes, "openid email offline_access mail"); + let listed = OAuth { base_scopes: Some("openid email".into()), ..own() }; + assert!(listed.check().is_ok()); + assert_eq!(listed.effective().scopes, "openid email mail"); + assert_eq!(OAuth { base_scopes: Some(String::new()), ..own() }.effective().scopes, "mail"); + // Nothing but the standard ones, from a command or a hand-edited file. + assert!(OAuth { base_scopes: Some("openid admin".into()), ..own() }.check().is_err()); + assert_eq!(OAuth { base_scopes: Some("admin email".into()), ..own() }.effective().scopes, "email mail"); + // Microsoft's and Google's are built in. + assert!(OAuth { provider: OAuthProvider::Google, base_scopes: Some("openid".into()), ..OAuth::default() }.check().is_err()); + // Kept in the file, and left out of it when it is all three. + let saved = serde_json::to_value(&listed).unwrap(); + assert_eq!(saved["baseScopes"], "openid email"); + assert_eq!(serde_json::from_value::(saved).unwrap(), listed); + assert!(serde_json::to_value(own()).unwrap().get("baseScopes").is_none()); +} diff --git a/crates/model/src/provider.rs b/crates/model/src/provider.rs index 4ed978df35..f762f9c5ac 100644 --- a/crates/model/src/provider.rs +++ b/crates/model/src/provider.rs @@ -450,6 +450,9 @@ pub struct Discovered { /// How the owner signs in, as the servers' source wrote it: the address or one of its /// parts, `%EMAILADDRESS%`, `%EMAILLOCALPART%` or `%EMAILDOMAIN%`; empty for the address. pub username: String, + /// The identity provider the incoming server's document names for an OAuth 2.0 sign-in, as + /// an `https://` address; empty when it names none. Offered to the owner, never followed by itself. + pub oauth_issuer: String, } /// The hosts are the organisation's own: not for a log. diff --git a/crates/model/src/sync.rs b/crates/model/src/sync.rs index 073f3f9f70..0118179596 100644 --- a/crates/model/src/sync.rs +++ b/crates/model/src/sync.rs @@ -20,6 +20,8 @@ mod place; mod problems_tests; mod progress; mod search; +#[cfg(test)] +mod tokens_tests; pub use directory::*; pub use drafts::*; pub use ews::*; @@ -245,6 +247,9 @@ pub struct Tokens { pub refresh: String, /// When the access token stops working (Unix seconds). pub expires_at: i64, + /// When it was handed out (Unix seconds); 0 when that isn't known. With [`Tokens::expires_at`] + /// it gives how long the token lives, which the margin before renewing can't exceed. + pub issued_at: i64, /// Who signed in, as the provider names them (may be empty): for the account's display name. pub name: String, /// The address the provider knows them by (may be empty). @@ -276,7 +281,24 @@ impl Tokens { /// spare: one that runs out sooner is renewed before a job starts with it, not during it /// (#306). `now` is the wall clock, so time the computer spent asleep counts. pub fn fresh(&self, now: i64) -> bool { - !self.access.is_empty() && self.expires_at.saturating_sub(FRESH_MARGIN) > now + self.fresh_for(now, 0) + } + + /// Whether the access token is still good for `wanted` seconds after `now`, with the margin + /// of [`Tokens::fresh`] to spare. Both together are never more than half the token's life: + /// an identity provider's tokens may live five minutes (Keycloak's own setting), and one just + /// handed out must count as fresh, or every renewal asks for the next at once. + pub fn fresh_for(&self, now: i64, wanted: i64) -> bool { + !self.access.is_empty() && self.expires_at.saturating_sub(self.margin(wanted)) > now + } + + /// [`FRESH_MARGIN`] and `wanted`, at most half of how long the token lives when that is known. + fn margin(&self, wanted: i64) -> i64 { + let full = FRESH_MARGIN.saturating_add(wanted.max(0)); + if self.issued_at <= 0 || self.expires_at <= self.issued_at { + return full; + } + full.min(self.expires_at.saturating_sub(self.issued_at) / 2) } /// Whether these are somebody else's than the account's whose address is `email` and whose diff --git a/crates/model/src/sync/tokens_tests.rs b/crates/model/src/sync/tokens_tests.rs new file mode 100644 index 0000000000..0fc0e846f8 --- /dev/null +++ b/crates/model/src/sync/tokens_tests.rs @@ -0,0 +1,48 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! When an access token counts as fresh: the margin before renewing never exceeds half its life, +//! so a provider's short-lived tokens (Keycloak's five minutes) are used, not renewed in a loop. + +use super::{FRESH_MARGIN, Tokens}; + +const NOW: i64 = 1_791_993_600; + +fn living(seconds: i64) -> Tokens { + Tokens { access: "a".into(), expires_at: NOW + seconds, issued_at: NOW, ..Tokens::default() } +} + +#[test] +fn a_token_just_handed_out_is_fresh_however_short_it_lives() { + for life in [60, 300, 600, 900, 3_600] { + let t = living(life); + assert!(t.fresh(NOW) && t.fresh_for(NOW, 600), "a token of {life} s just handed out"); + } +} + +#[test] +fn a_long_lived_token_keeps_the_whole_margin() { + // An hour (Microsoft's, Google's): renewed once fewer than the margin and the wish remain. + let t = living(3_600); + assert!(t.fresh_for(NOW + 3_600 - FRESH_MARGIN - 600 - 1, 600)); + assert!(!t.fresh_for(NOW + 3_600 - FRESH_MARGIN - 600, 600)); +} + +#[test] +fn a_short_lived_token_is_renewed_after_half_its_life() { + let t = living(300); + assert!(t.fresh_for(NOW + 149, 600)); + assert!(!t.fresh_for(NOW + 150, 600)); + assert!(!t.fresh(NOW + 300)); +} + +#[test] +fn a_token_whose_start_isnt_known_keeps_the_old_rule() { + // As every token made before `issued_at` was: the whole margin. + let t = Tokens { issued_at: 0, ..living(3_600) }; + assert!(t.fresh_for(NOW + 3_600 - FRESH_MARGIN - 600 - 1, 600)); + assert!(!Tokens { issued_at: 0, ..living(300) }.fresh(NOW)); + // Nonsense (it ran out before it began) is no shorter margin either. + assert!(!Tokens { issued_at: NOW + 10_000, ..living(300) }.fresh(NOW)); + // No access token is never fresh. + assert!(!Tokens { access: String::new(), ..living(3_600) }.fresh(NOW)); +} diff --git a/crates/net/src/autoconfig.rs b/crates/net/src/autoconfig.rs index da0a4aec3d..2518c25734 100644 --- a/crates/net/src/autoconfig.rs +++ b/crates/net/src/autoconfig.rs @@ -45,6 +45,10 @@ pub(crate) struct ClientConfig { /// empty when it says none, or names no incoming server that is taken. (An account has one /// user name, the one it reads its mail with: the outgoing server's is not read for it.) pub(crate) username: String, + /// The identity provider the document names (`oAuth2`'s `issuer`, as an `https://` address) + /// when the incoming server taken signs in with OAuth 2.0 (`authentication` `OAuth2`); empty + /// otherwise. Only ever offered to the owner: nothing signs in by itself because of it. + pub(crate) oauth_issuer: String, } /// The document isn't one this reads. @@ -74,6 +78,11 @@ enum Tag { Port, SocketType, Username, + /// `authentication` of a server: how it signs in (`password-cleartext`, `OAuth2`). + Authentication, + /// `clientConfig/oAuth2`, and its `issuer`. + OAuth2, + OAuthIssuer, Other, } @@ -84,6 +93,8 @@ struct Listed { port: String, socket_type: String, username: String, + /// It lists `OAuth2` among the ways it signs in. + oauth2: bool, } impl Listed { @@ -119,6 +130,8 @@ struct Walk { server: Option<(Listed, bool)>, incoming: Vec, outgoing: Vec, + /// The text of `oAuth2`'s `issuer`. + issuer: String, } impl Walk { @@ -136,13 +149,17 @@ impl Walk { ([.., Tag::Server(_)], "port") => Tag::Port, ([.., Tag::Server(_)], "socketType") => Tag::SocketType, ([.., Tag::Server(_)], "username") => Tag::Username, + ([.., Tag::Server(_)], "authentication") => Tag::Authentication, + ([Tag::ClientConfig], "oAuth2") => Tag::OAuth2, + ([Tag::ClientConfig, Tag::OAuth2], "issuer") => Tag::OAuthIssuer, _ => Tag::Other, }; if let Tag::Server(incoming) = tag { self.server = Some((Listed::default(), incoming)); } self.stack.push(tag); - if matches!(tag, Tag::Hostname | Tag::Port | Tag::SocketType | Tag::Username) && self.field.is_none() { + if matches!(tag, Tag::Hostname | Tag::Port | Tag::SocketType | Tag::Username | Tag::Authentication | Tag::OAuthIssuer) && self.field.is_none() + { self.field = Some((String::new(), self.stack.len())); self.spoiled = false; } @@ -155,6 +172,14 @@ impl Walk { if self.field.as_ref().is_some_and(|(_, at)| *at == depth) { let text = self.field.take().map(|(text, _)| text).unwrap_or_default(); let text = if self.spoiled { String::new() } else { text.trim().to_string() }; + if tag == Tag::OAuthIssuer && self.issuer.is_empty() { + self.issuer = text.clone(); + } + if tag == Tag::Authentication + && let Some((server, _)) = &mut self.server + { + server.oauth2 |= text.eq_ignore_ascii_case("OAuth2"); + } // (The first of a field is the one taken.) if let Some((server, _)) = &mut self.server { let field = match tag { @@ -213,7 +238,8 @@ pub(crate) fn read(xml: &[u8]) -> Result, Malformed> { let mut reader = Reader::from_str(&xml); let config = reader.config_mut(); (config.check_end_names, config.allow_unmatched_ends, config.expand_empty_elements) = (true, false, false); - let mut walk = Walk { stack: Vec::new(), field: None, spoiled: false, server: None, incoming: Vec::new(), outgoing: Vec::new() }; + let mut walk = + Walk { stack: Vec::new(), field: None, spoiled: false, server: None, incoming: Vec::new(), outgoing: Vec::new(), issuer: String::new() }; // Every event takes at least a byte of the document, which bounds the loop. for _ in 0..=xml.len() { match reader.read_event().map_err(|_| Malformed)? { @@ -242,7 +268,26 @@ pub(crate) fn read(xml: &[u8]) -> Result, Malformed> { } // The user name is the incoming server's, and goes with it alone. let username = incoming.as_ref().map(|(_, listed)| listed.username.clone()).unwrap_or_default(); - Ok(Some(ClientConfig { incoming: incoming.map(|(server, _)| server), outgoing: outgoing.map(|(server, _)| server), username })) + // The identity provider, for an incoming server that signs in with it, as an address. + let oauth2 = incoming.as_ref().is_some_and(|(_, listed)| listed.oauth2); + let oauth_issuer = if oauth2 { issuer_address(&walk.issuer) } else { String::new() }; + Ok(Some(ClientConfig { incoming: incoming.map(|(server, _)| server), outgoing: outgoing.map(|(server, _)| server), username, oauth_issuer })) +} + +/// `issuer` as an identity provider's address: as written when it is an `https://` one, a bare +/// host name made one; empty when it is neither, or isn't one that can be used. +fn issuer_address(issuer: &str) -> String { + let issuer = issuer.trim(); + let address = if issuer.contains("://") { + issuer.to_string() + } else { + match domain_name(issuer) { + Some(host) => format!("https://{host}"), + None => return String::new(), + } + }; + let usable = address.starts_with("https://") && !address.contains(['?', '#']) && mailcraft_model::oauth::endpoint(&address).is_ok(); + if usable { address } else { String::new() } } #[cfg(test)] diff --git a/crates/net/src/autoconfig_tests.rs b/crates/net/src/autoconfig_tests.rs index f41d31cb08..11424a9445 100644 --- a/crates/net/src/autoconfig_tests.rs +++ b/crates/net/src/autoconfig_tests.rs @@ -225,3 +225,47 @@ proptest! { } } } + +/// [`DOCUMENT`] with an `oAuth2` block naming `issuer`. +fn with_issuer(issuer: &str) -> String { + DOCUMENT.replace( + r#" \n {issuer}\n openid email\n \n OAuth2\n", ""); + assert_eq!(read(password_only.as_bytes()).unwrap().unwrap().oauth_issuer, ""); +} + +#[test] +fn an_issuer_that_cant_be_used_is_left_out() { + for issuer in [ + "http://id.example.org", + "https://user:pw@id.example.org", + "https://id.example.org/?x=1", + "javascript:alert(1)", + "not a host", + "https://id.example.org/ x", + "&custom;", + ] { + let config = read(with_issuer(issuer).as_bytes()).ok().flatten(); + assert_eq!(config.map(|c| c.oauth_issuer).unwrap_or_default(), "", "{issuer:?}"); + } + let long = format!("https://id.example.org/{}", "a".repeat(5_000)); + assert_eq!(read(with_issuer(&long).as_bytes()).unwrap().unwrap().oauth_issuer, ""); +} diff --git a/crates/net/src/custom_oauth_sync_tests.rs b/crates/net/src/custom_oauth_sync_tests.rs new file mode 100644 index 0000000000..c7e5eb0078 --- /dev/null +++ b/crates/net/src/custom_oauth_sync_tests.rs @@ -0,0 +1,161 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! An account that signs in with an own identity provider, end to end against the fake IMAP and +//! SMTP servers on loopback: which way its token is given, and where it may go. + +use mailcraft_model::sync::{FolderState, SyncRequest}; +use mailcraft_model::{Account, AccountKind, Address, FolderKind, Message, OAuth, OAuthProvider, SaslChoice, Security, Server}; + +use crate::fake::{Fake, FakeImap, FakeMailbox, FakeSmtp, ImapWorld, SmtpWorld, oauthbearer_parts}; +use crate::{NetError, send, sync, test_account}; + +const TOKEN: &str = "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhbGljZSJ9.c2ln"; +const USER: &str = "alice"; + +fn servers(oauthbearer: bool, xoauth2: bool) -> (FakeImap, FakeSmtp) { + let inbox = + FakeMailbox { raw: "INBOX".into(), flags: "\\HasNoChildren".into(), uid_validity: 1, messages: Vec::new(), refuse_open: false, next_uid: 0 }; + let imap = Fake::imap(ImapWorld { + user: USER.into(), + token: TOKEN.into(), + oauthbearer, + no_xoauth2: !xoauth2, + mailboxes: vec![inbox], + ..Default::default() + }); + let smtp = Fake::smtp(SmtpWorld { user: USER.into(), token: TOKEN.into(), oauthbearer, no_xoauth2: !xoauth2, ..Default::default() }); + (imap, smtp) +} + +fn account(imap: &FakeImap, smtp: &FakeSmtp, mechanism: SaslChoice) -> Account { + let server = |port: u16| Some(Server { host: "127.0.0.1".into(), port, security: Security::None }); + Account { + id: 3, + email: "alice@example.org".into(), + username: USER.into(), + kind: AccountKind::Imap, + incoming: server(imap.port), + outgoing: server(smtp.port), + oauth: Some(OAuth { + provider: OAuthProvider::Custom, + client_id: "mailcraft".into(), + authorize: "https://id.example.org/auth".into(), + token: "https://id.example.org/token".into(), + mechanism, + ..OAuth::default() + }), + ..Default::default() + } +} + +fn hello() -> Message { + Message { + id: 9, + from: Address::new("Alice", "alice@example.org"), + to: vec![Address::new("Bob", "bob@example.org")], + subject: "Hello".into(), + ..Default::default() + } +} + +fn used(log: &[String]) -> Vec<&str> { + log.iter().filter_map(|l| l.split_whitespace().find(|w| *w == "OAUTHBEARER" || *w == "XOAUTH2")).collect() +} + +#[test] +fn oauthbearer_is_preferred_when_offered_and_carries_the_servers_host_and_port() { + let (imap, smtp) = servers(true, true); + let a = account(&imap, &smtp, SaslChoice::Auto); + assert_eq!(test_account(&a, TOKEN), Ok(())); + assert_eq!(send(&a, TOKEN, &hello()), Ok(())); + let imap_log = imap.world().log.clone(); + assert_eq!(used(&imap_log).first(), Some(&"OAUTHBEARER"), "{imap_log:?}"); + assert!(used(&smtp.world().log).iter().all(|m| *m == "OAUTHBEARER")); + // What went out names the server it went to. + let payload = imap_log.iter().find(|l| !l.contains(' ') && l.len() > 40).cloned().unwrap_or_default(); + let (user, host, port, token) = oauthbearer_parts(&payload); + assert_eq!((user.as_str(), host.as_str(), port, token.as_str()), (USER, "127.0.0.1", imap.port.to_string(), TOKEN)); + assert_eq!(smtp.world().delivered.len(), 1); +} + +#[test] +fn xoauth2_is_used_when_it_is_all_the_server_takes_or_what_the_settings_say() { + let (imap, smtp) = servers(false, true); + let a = account(&imap, &smtp, SaslChoice::Auto); + assert_eq!(test_account(&a, TOKEN), Ok(())); + assert!(used(&imap.world().log).iter().all(|m| *m == "XOAUTH2")); + let (imap, smtp) = servers(true, true); + let a = account(&imap, &smtp, SaslChoice::XOAuth2); + assert_eq!(test_account(&a, TOKEN), Ok(())); + assert_eq!(send(&a, TOKEN, &hello()), Ok(())); + assert!(used(&imap.world().log).iter().all(|m| *m == "XOAUTH2")); + assert!(used(&smtp.world().log).iter().all(|m| *m == "XOAUTH2")); +} + +#[test] +fn a_mechanism_the_server_doesnt_offer_is_an_error_and_the_token_never_goes() { + for (bearer, xoauth2, choice) in [(false, true, SaslChoice::OAuthBearer), (true, false, SaslChoice::XOAuth2), (false, false, SaslChoice::Auto)] { + let (imap, smtp) = servers(bearer, xoauth2); + // (A server that takes no token at all: one that says so.) + if !bearer && !xoauth2 { + imap.world().token = String::new(); + smtp.world().token = String::new(); + } + let a = account(&imap, &smtp, choice); + let error = test_account(&a, TOKEN).unwrap_err(); + assert!(matches!(error, NetError::Proto(mailcraft_proto::ProtoError::Auth(_))), "{choice:?}: {error:?}"); + assert!(!imap.world().log.iter().any(|l| l.contains("AUTHENTICATE")), "{choice:?}: {:?}", imap.world().log); + let error = send(&a, TOKEN, &hello()).unwrap_err(); + assert!(!format!("{error:?}").contains(TOKEN)); + assert!(!smtp.world().log.iter().any(|l| l.starts_with("AUTH")), "{choice:?}: {:?}", smtp.world().log); + } +} + +#[test] +fn a_refused_token_says_why_without_showing_it() { + let (imap, smtp) = servers(true, false); + let a = account(&imap, &smtp, SaslChoice::Auto); + let error = test_account(&a, "eyJ.stale.token").unwrap_err(); + assert!(error.is_refused_sign_in(), "{error:?}"); + assert!(!format!("{error} {error:?}").contains("eyJ.stale.token")); + // The server's reasons were answered as RFC 7628 has it. + assert!(imap.world().log.iter().any(|l| l == "AQ=="), "{:?}", imap.world().log); + let error = send(&a, "eyJ.stale.token", &hello()).unwrap_err(); + assert!(!format!("{error} {error:?}").contains("eyJ.stale.token")); + assert!(smtp.world().log.iter().any(|l| l == "AQ==")); +} + +#[test] +fn mail_comes_down_and_goes_out_on_the_token() { + let (imap, smtp) = servers(true, true); + let a = account(&imap, &smtp, SaslChoice::Auto); + let folders: Vec = + FolderKind::STANDARD.iter().zip(100..).map(|(kind, id)| FolderState { id, kind: *kind, ..Default::default() }).collect(); + let request = SyncRequest { account: a, access_token: TOKEN.into(), folders, outbox: vec![hello()], ..Default::default() }; + let result = sync(&request); + assert_eq!(result.errors, Vec::::new()); + assert_eq!(result.sent, [9]); +} + +#[test] +fn the_token_never_goes_to_a_server_the_account_doesnt_name() { + let (imap, smtp) = servers(true, true); + let mut a = account(&imap, &smtp, SaslChoice::Auto); + // Edited to point at Google's server after signing in: refused before anything connects. + a.incoming = Some(Server { host: "imap.gmail.com".into(), port: 993, security: Security::Tls }); + let error = test_account(&a, TOKEN).unwrap_err(); + assert!(matches!(error, NetError::Config(_)), "{error:?}"); + assert_eq!(imap.world().connections, 0); +} + +#[test] +fn starttls_missing_is_refused_before_any_token_is_sent() { + let (imap, smtp) = servers(true, true); + let mut a = account(&imap, &smtp, SaslChoice::Auto); + a.incoming.as_mut().unwrap().security = Security::StartTls; + a.outgoing.as_mut().unwrap().security = Security::StartTls; + assert!(matches!(test_account(&a, TOKEN), Err(NetError::Tls { .. }))); + assert!(!imap.world().log.iter().any(|l| l.contains("AUTHENTICATE"))); + assert!(matches!(send(&a, TOKEN, &hello()), Err(NetError::Tls { .. }))); + assert!(!smtp.world().log.iter().any(|l| l.starts_with("AUTH"))); +} diff --git a/crates/net/src/discover.rs b/crates/net/src/discover.rs index 39850cf899..014af97fd9 100644 --- a/crates/net/src/discover.rs +++ b/crates/net/src/discover.rs @@ -121,6 +121,7 @@ fn take(found: &mut Discovered, config: autoconfig::ClientConfig, via: Via) { { found.incoming = Some(FoundServer { server, via }); found.username = config.username; + found.oauth_issuer = config.oauth_issuer; } if found.outgoing.is_none() && let Some(server) = config.outgoing diff --git a/crates/net/src/fake.rs b/crates/net/src/fake.rs index c0af22676e..426eab6615 100644 --- a/crates/net/src/fake.rs +++ b/crates/net/src/fake.rs @@ -295,6 +295,10 @@ pub(crate) struct ImapWorld { pub(crate) password: String, /// The access token that signs `user` in (XOAUTH2); empty for a server that takes none. pub(crate) token: String, + /// With `token`: take it with OAUTHBEARER (RFC 7628) too. + pub(crate) oauthbearer: bool, + /// With `token`: don't take it with XOAUTH2. + pub(crate) no_xoauth2: bool, /// Say the token may come with the command (SASL-IR). pub(crate) sasl_ir: bool, /// Offer the password-based PLAIN mechanism. @@ -377,7 +381,14 @@ pub(crate) struct ImapWorld { impl ImapWorld { /// What the server says it can do. fn capabilities(&self, secured: bool) -> String { - let xoauth2 = if self.token.is_empty() { "" } else { " AUTH=XOAUTH2" }; + let xoauth2 = match (self.token.is_empty(), self.oauthbearer, self.no_xoauth2) { + (true, ..) => "", + (false, true, true) => " AUTH=OAUTHBEARER", + (false, true, false) => " AUTH=OAUTHBEARER AUTH=XOAUTH2", + // (Neither offered: a server that takes no token at all, #1844 review.) + (false, false, true) => "", + (false, false, false) => " AUTH=XOAUTH2", + }; let sasl_ir = if self.sasl_ir { " SASL-IR" } else { "" }; let plain = if self.plain && (!self.offer_starttls || secured) { " AUTH=PLAIN" } else { "" }; let starttls = if self.offer_starttls { " STARTTLS" } else { "" }; @@ -418,6 +429,10 @@ pub(crate) struct SmtpWorld { pub(crate) auth_optional: bool, /// The access token that signs `user` in (XOAUTH2, insisted on likewise); empty for a server that takes none. pub(crate) token: String, + /// With `token`: take it with OAUTHBEARER (RFC 7628) too. + pub(crate) oauthbearer: bool, + /// With `token`: don't take it with XOAUTH2. + pub(crate) no_xoauth2: bool, /// Say STARTTLS is on offer (it isn't: what follows the go-ahead is no handshake). pub(crate) offer_starttls: bool, /// Recipients to answer 550 for. @@ -504,6 +519,30 @@ fn pretend_tls(out: &mut TcpStream, reader: &mut BufReader, go_ahead: /// What a server writes in place of its reasons for refusing a token: `{"status":"401"}`. const REASONS: &str = "eyJzdGF0dXMiOiI0MDEifQ=="; +/// What a server writes in place of its reasons for refusing an OAUTHBEARER token: +/// `{"status":"invalid_token","openid-configuration":"https://id.example.org/.well-known/openid-configuration"}`. +const BEARER_REASONS: &str = "eyJzdGF0dXMiOiJpbnZhbGlkX3Rva2VuIiwib3BlbmlkLWNvbmZpZ3VyYXRpb24iOiJodHRwczovL2lkLmV4YW1wbGUub3JnLy53ZWxsLWtub3duL29wZW5pZC1jb25maWd1cmF0aW9uIn0="; + +/// The user, host, port and token of an OAUTHBEARER message (`n,a=…,^Ahost=…^Aport=…^Aauth=Bearer …^A^A` +/// in base64); empty when it isn't one. +pub(crate) fn oauthbearer_parts(payload: &str) -> (String, String, String, String) { + let decoded = mailcraft_charset::base64::STANDARD.decode(payload).unwrap_or_default(); + let decoded = String::from_utf8_lossy(&decoded).into_owned(); + let mut fields = decoded.split('\u{1}'); + let Some(user) = fields.next().and_then(|h| h.strip_prefix("n,a=")).and_then(|h| h.strip_suffix(',')) else { return Default::default() }; + let (mut host, mut port, mut token) = (String::new(), String::new(), String::new()); + for field in fields { + if let Some(v) = field.strip_prefix("host=") { + host = v.into(); + } else if let Some(v) = field.strip_prefix("port=") { + port = v.into(); + } else if let Some(v) = field.strip_prefix("auth=Bearer ") { + token = v.into(); + } + } + (user.replace("=2C", ",").replace("=3D", "="), host, port, token) +} + /// The user and the token of an XOAUTH2 response (`user=…^Aauth=Bearer …^A^A` in base64); empty when it isn't one. fn bearer(payload: &str) -> (String, String) { let decoded = mailcraft_charset::base64::STANDARD.decode(payload).unwrap_or_default(); @@ -673,7 +712,9 @@ fn serve_imap(stream: TcpStream, shared: Arc>) { let _ = reader.get_mut().write_all(format!("{tag} {verdict}\r\n").as_bytes()); continue; } - if world.token.is_empty() || !mechanism.eq_ignore_ascii_case("XOAUTH2") { + let bearer = mechanism.eq_ignore_ascii_case("OAUTHBEARER"); + let takes = if bearer { world.oauthbearer } else { mechanism.eq_ignore_ascii_case("XOAUTH2") && !world.no_xoauth2 }; + if world.token.is_empty() || !takes { reply.extend(format!("{tag} NO [CANNOT] no such way to sign in\r\n").bytes()); } else { let (user, token) = (world.user.clone(), world.token.clone()); @@ -688,14 +729,20 @@ fn serve_imap(stream: TcpStream, shared: Arc>) { } else { with_command.to_string() }; - let (given_user, given_token) = bearer(&payload); + let (given_user, given_token) = if bearer { + let (u, _, _, t) = oauthbearer_parts(&payload); + (u, t) + } else { + self::bearer(&payload) + }; if (given_user, &given_token) == (user, &token) { signed_in = true; let _ = reader.get_mut().write_all(format!("{tag} OK [CAPABILITY {caps}] welcome\r\n").as_bytes()); } else { - // The reasons, and after the client's empty line the verdict. A careless + // The reasons, and after the client's answer the verdict. A careless // server: it repeats the token it was sent. - let _ = reader.get_mut().write_all(format!("+ {REASONS}\r\n").as_bytes()); + let reasons = if bearer { BEARER_REASONS } else { REASONS }; + let _ = reader.get_mut().write_all(format!("+ {reasons}\r\n").as_bytes()); let Some(line) = read_line(&mut reader) else { return }; shared.lock().unwrap().log.push(line); let _ = reader @@ -1095,12 +1142,17 @@ fn serve_smtp(stream: TcpStream, shared: Arc>) { let mut world = shared.lock().unwrap(); world.log.push(line.clone()); let reply = if upper.starts_with("EHLO") { - let auth = match (world.auth, !world.token.is_empty()) { - (true, true) => "250-AUTH PLAIN LOGIN XOAUTH2\r\n", - (true, false) => "250-AUTH PLAIN LOGIN\r\n", - (false, true) => "250-AUTH XOAUTH2\r\n", - (false, false) => "", - }; + let mut mechanisms: Vec<&str> = Vec::new(); + if world.auth { + mechanisms.extend(["PLAIN", "LOGIN"]); + } + if !world.token.is_empty() && !world.no_xoauth2 { + mechanisms.push("XOAUTH2"); + } + if !world.token.is_empty() && world.oauthbearer { + mechanisms.push("OAUTHBEARER"); + } + let auth = if mechanisms.is_empty() { String::new() } else { format!("250-AUTH {}\r\n", mechanisms.join(" ")) }; let starttls = if world.offer_starttls { "250-STARTTLS\r\n" } else { "" }; format!("250-fake.example.org\r\n250-8BITMIME\r\n250-SIZE 10485760\r\n{auth}{starttls}250 HELP") } else if upper == "STARTTLS" && world.offer_starttls { @@ -1119,8 +1171,36 @@ fn serve_smtp(stream: TcpStream, shared: Arc>) { // A careless server: it repeats the password it was sent. format!("535 5.7.8 no user with the password {}", parts.get(2).copied().unwrap_or("")) } + } else if upper == "AUTH OAUTHBEARER" || upper.starts_with("AUTH OAUTHBEARER ") { + if world.token.is_empty() || !world.oauthbearer { + "504 5.5.4 no such way to sign in".to_string() + } else { + let (user, token) = (world.user.clone(), world.token.clone()); + drop(world); + let with_command = line.get("AUTH OAUTHBEARER ".len()..).unwrap_or(""); + let payload = if with_command.is_empty() { + let _ = out.write_all(b"334 \r\n"); + let Some(line) = read_line(&mut reader) else { return }; + shared.lock().unwrap().log.push(line.clone()); + line + } else { + with_command.to_string() + }; + let (given_user, _, _, given_token) = oauthbearer_parts(&payload); + if (given_user, &given_token) == (user, &token) { + signed_in = true; + shared.lock().unwrap().sign_ins += 1; + let _ = out.write_all(b"235 2.7.0 welcome\r\n"); + } else { + let _ = out.write_all(format!("334 {BEARER_REASONS}\r\n").as_bytes()); + let Some(line) = read_line(&mut reader) else { return }; + shared.lock().unwrap().log.push(line); + let _ = out.write_all(b"535 5.7.8 refused\r\n"); + } + continue; + } } else if upper == "AUTH XOAUTH2" || upper.starts_with("AUTH XOAUTH2 ") { - if world.token.is_empty() { + if world.token.is_empty() || world.no_xoauth2 { "504 5.5.4 no such way to sign in".to_string() } else { let (user, token) = (world.user.clone(), world.token.clone()); diff --git a/crates/net/src/http.rs b/crates/net/src/http.rs index 2bd788f2b5..d82974f1e6 100644 --- a/crates/net/src/http.rs +++ b/crates/net/src/http.rs @@ -321,7 +321,16 @@ pub(crate) fn get(url: &Url, headers: &[(&str, &str)], patience: Duration) -> Re /// POST `fields` as a form to `url`, asking for JSON, and read the answer, whatever its status. /// Connecting may take `patience`, and so may the answer. pub(crate) fn post_form(url: &Url, fields: &[(&str, &str)], patience: Duration) -> Result { - let headers = [("Accept", "application/json"), ("Content-Type", "application/x-www-form-urlencoded")]; + post_form_as(url, fields, None, patience) +} + +/// [`post_form`] with an `Authorization` header when `authorization` is one (a client's +/// credentials, RFC 6749 §2.3.1). The caller keeps it out of errors and logs, as the form's secrets. +pub(crate) fn post_form_as(url: &Url, fields: &[(&str, &str)], authorization: Option<&str>, patience: Duration) -> Result { + let mut headers = vec![("Accept", "application/json"), ("Content-Type", "application/x-www-form-urlencoded")]; + if let Some(authorization) = authorization { + headers.push(("Authorization", authorization)); + } send(url, "POST", &headers, Some(&form(fields)), patience) } diff --git a/crates/net/src/lib.rs b/crates/net/src/lib.rs index decfecc030..f9b986eb03 100644 --- a/crates/net/src/lib.rs +++ b/crates/net/src/lib.rs @@ -88,6 +88,9 @@ mod xml_text; // (`cfg(test)` on its own line: that is how clippy knows test code, which may unwrap.) #[cfg(test)] #[cfg(not(target_arch = "wasm32"))] +mod custom_oauth_sync_tests; +#[cfg(test)] +#[cfg(not(target_arch = "wasm32"))] mod fake; #[cfg(test)] #[cfg(not(target_arch = "wasm32"))] diff --git a/crates/net/src/oauth.rs b/crates/net/src/oauth.rs index 2652f14372..719a176707 100644 --- a/crates/net/src/oauth.rs +++ b/crates/net/src/oauth.rs @@ -66,6 +66,7 @@ use std::sync::atomic::{AtomicBool, Ordering}; use std::time::{Duration, Instant}; use mailcraft_charset::base64::URL_SAFE_NO_PAD; +use mailcraft_i18n::said; use mailcraft_model::sync::Tokens; use mailcraft_model::{OAuth, OAuthProvider}; use mailcraft_proto::ProtoError; @@ -100,21 +101,26 @@ const TOKEN_TIMEOUT: Duration = Duration::from_secs(20); /// How long an access token is taken to last when the server doesn't say, and the longest it is believed to. const DEFAULT_LIFETIME: i64 = 3_600; const MAX_LIFETIME: i64 = 7 * 24 * 3_600; +/// The life a token is taken to have when the provider says it has none at all (0, or less): +/// used as it comes, never renewed again and again before anything is done with it (seconds). +/// A life it does say is kept as said, however short (#1844 review): a short token is kept fresh +/// by the half-life margin ([`Tokens::fresh_for`]), not by a longer life it hasn't got. +const MIN_LIFETIME: i64 = 60; /// Longest name or address taken from an identity token. const MAX_IDENTITY: usize = 254; -const MICROSOFT_LOGIN: &str = "https://login.microsoftonline.com"; -const GOOGLE_AUTHORIZE: &str = "https://accounts.google.com/o/oauth2/v2/auth"; -const GOOGLE_TOKEN: &str = "https://oauth2.googleapis.com/token"; -const GOOGLE_SCOPE: &str = "https://mail.google.com/ openid email"; +// (The built-in values are the model's, so that what the settings show is what is used.) +const MICROSOFT_LOGIN: &str = mailcraft_model::oauth::MICROSOFT_LOGIN; +const GOOGLE_AUTHORIZE: &str = mailcraft_model::oauth::GOOGLE_AUTHORIZE; +const GOOGLE_TOKEN: &str = mailcraft_model::oauth::GOOGLE_TOKEN; +const GOOGLE_SCOPE: &str = mailcraft_model::oauth::GOOGLE_SCOPE; const GOOGLE_DESKTOP_SECRET: &str = match option_env!("MAILCRAFT_GOOGLE_CLIENT_SECRET") { Some(secret) => secret, None => "", }; /// IMAP and SMTP, a refresh token to go with the access token, and who it is that signed in. -const MICROSOFT_SCOPE: &str = - "https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send offline_access openid profile email"; +const MICROSOFT_SCOPE: &str = mailcraft_model::oauth::MICROSOFT_MAIL_SCOPE; /// Microsoft Graph: sending mail, reading the calendar and writing to it (events made, moved, /// changed and deleted here go back to the server), and reading the contacts. A sign-in from /// before the calendar was written to agreed to reading it only: its refresh token gets no @@ -356,6 +362,12 @@ impl Endpoints { fewer: String::new(), lesser: String::new(), }, + // The owner's own identity provider: its addresses are the account's own settings, + // and it is asked for mail and nothing else (it has no Microsoft Graph). + OAuthProvider::Custom => { + let used = oauth.effective(); + Endpoints { authorize: used.authorize, token: used.token, scope: used.scopes, ..Endpoints::default() } + } } } } @@ -400,6 +412,9 @@ pub fn sign_in_for(oauth: &OAuth, login_hint: &str, open: &dyn Fn(&str), cancel: if oauth.provider == OAuthProvider::Google && resource != Resource::Mail { return Err(NetError::Config("Google sign-in supports mail only, not Microsoft Graph".into())); } + if oauth.provider == OAuthProvider::Custom && resource != Resource::Mail { + return Err(NetError::Config(said!("a sign-in with your own identity provider is for mail only, not Microsoft Graph"))); + } let mut endpoints = Endpoints::for_resource(oauth, resource); // (An Outlook.com address is a personal account whatever the settings know yet.) if resource != Resource::Mail && oauth.is_personal(login_hint) { @@ -420,6 +435,11 @@ pub fn sign_in_at(endpoints: &Endpoints, oauth: &OAuth, login_hint: &str, open: if oauth.provider == OAuthProvider::Google { return sign_in_google_at(endpoints, oauth, GOOGLE_DESKTOP_SECRET, login_hint, open, cancel); } + // (Its addresses are its settings': a public client, with no secret. One with a secret signs + // in with [`sign_in_custom`], which the host hands it to.) + if oauth.provider == OAuthProvider::Custom { + return sign_in_custom(&at_endpoints(oauth, endpoints), "", login_hint, open, cancel); + } sign_in_within(endpoints, oauth, login_hint, open, cancel, SIGN_IN_TIMEOUT) } @@ -436,6 +456,10 @@ pub fn sign_in_explained( return google::sign_in_google_refused(endpoints, oauth, GOOGLE_DESKTOP_SECRET, login_hint, open, cancel, SIGN_IN_TIMEOUT) .map_err(SignInEnd::from); } + if oauth.provider == OAuthProvider::Custom { + return custom::sign_in_custom_refused(&at_endpoints(oauth, endpoints), "", login_hint, open, cancel, SIGN_IN_TIMEOUT) + .map_err(SignInEnd::from); + } sign_in_refused(endpoints, oauth, login_hint, open, cancel, SIGN_IN_TIMEOUT).map_err(SignInEnd::from) } @@ -1260,6 +1284,12 @@ pub fn refresh_at(endpoints: &Endpoints, oauth: &OAuth, refresh_token: &str) -> /// [`refresh_for`] at endpoints other than the provider's usual ones: the tokens are asked for /// [`Endpoints::scope`], and a refusal is read as one of a token for `resource`. pub fn refresh_for_at(endpoints: &Endpoints, oauth: &OAuth, refresh_token: &str, resource: Resource) -> Result { + if oauth.provider == OAuthProvider::Custom { + if resource != Resource::Mail { + return Err(NetError::Config(said!("a sign-in with your own identity provider is for mail only, not Microsoft Graph"))); + } + return refresh_custom(&at_endpoints(oauth, endpoints), "", refresh_token); + } if oauth.provider == OAuthProvider::Google { if resource != Resource::Mail { return Err(NetError::Config("Google sign-in supports mail only, not Microsoft Graph".into())); @@ -1646,11 +1676,17 @@ fn tokens_from(answer: &Answer, earlier_refresh: &str, now: i64, secrets: &[&str Some(Value::String(s)) => s.trim().parse::().ok(), _ => None, }; - let lifetime = lifetime.unwrap_or(DEFAULT_LIFETIME).clamp(0, MAX_LIFETIME); + // (Its life as the provider said it, up to a week; one said to be none at all, a minute.) + let lifetime = match lifetime { + Some(seconds) if seconds > 0 => seconds.min(MAX_LIFETIME), + Some(_) => MIN_LIFETIME, + None => DEFAULT_LIFETIME, + }; Ok(Tokens { access: access.to_string(), refresh: refresh.to_string(), expires_at: now.saturating_add(lifetime), + issued_at: now, granted_scope: text("scope").chars().take(4096).collect(), ..identity(text("id_token")) }) @@ -1971,9 +2007,22 @@ impl Redirect { Redirect::listen_avoiding(blocked_port) } + /// Listen on `port` of 127.0.0.1 alone: for a provider whose registration names the port, with + /// a redirect to the IP literal (no browser takes `127.0.0.1` to be IPv6). A port somebody + /// else has is refused rather than another taken: the provider wouldn't send the owner there. + fn listen_at(port: u16) -> Result { + if port == 0 || blocked_port(port) { + return Err(NetError::Config(said!("that redirect port can't be used: choose another, or automatic"))); + } + let v4 = TcpListener::bind((Ipv4Addr::LOCALHOST, port)) + .map_err(|_| NetError::Config(said!("port {port} on this computer is in use: choose another redirect port, or automatic", port)))?; + v4.set_nonblocking(true).map_err(|_| NetError::Config(said!("couldn't open a port on this computer for the sign-in to come back to")))?; + Ok(Redirect { listeners: vec![v4], port }) + } + /// [`listen`](Self::listen) with the test for a port a browser refuses given, so a test can drive it. fn listen_avoiding(blocked: impl Fn(u16) -> bool) -> Result { - let failed = || NetError::Config("couldn't open a port on this computer for the sign-in to come back to".into()); + let failed = || NetError::Config(said!("couldn't open a port on this computer for the sign-in to come back to")); for attempt in 1..=MAX_PORT_TRIES { let v4 = TcpListener::bind((Ipv4Addr::LOCALHOST, 0)).map_err(|_| failed())?; let port = v4.local_addr().map_err(|_| failed())?.port(); @@ -2095,8 +2144,8 @@ pub fn sign_in_via( if matches!(via, RedirectStrategy::Loopback) { return sign_in_at(endpoints, oauth, login_hint, open, cancel); } - if oauth.provider == OAuthProvider::Google { - return Err(NetError::Config("Google sign-in comes back through a loopback port only".into())); + if oauth.provider != OAuthProvider::Microsoft { + return Err(NetError::Config(said!("a sign-in with {provider} comes back through a loopback port only", provider = oauth.provider.label()))); } sign_in_refused_via(endpoints, oauth, login_hint, open, cancel, SIGN_IN_TIMEOUT, via).map_err(|refused| refused.error) } @@ -2113,15 +2162,38 @@ pub fn sign_in_explained_via( if matches!(via, RedirectStrategy::Loopback) { return sign_in_explained(endpoints, oauth, login_hint, open, cancel); } - if oauth.provider == OAuthProvider::Google { - return Err(SignInEnd::Other(NetError::Config("Google sign-in comes back through a loopback port only".into()))); + if oauth.provider != OAuthProvider::Microsoft { + return Err(SignInEnd::Other(NetError::Config(said!( + "a sign-in with {provider} comes back through a loopback port only", + provider = oauth.provider.label() + )))); } sign_in_refused_via(endpoints, oauth, login_hint, open, cancel, SIGN_IN_TIMEOUT, via).map_err(SignInEnd::from) } mod google; pub use google::{refresh_google_at, sign_in_google_at}; +mod custom; +pub use custom::{refresh_custom, revoke_custom, sign_in_custom, sign_in_custom_explained}; + +/// An own identity provider's settings with the addresses `endpoints` gives in place of its own +/// (what the `…_at` functions are for). +fn at_endpoints(oauth: &OAuth, endpoints: &Endpoints) -> OAuth { + let mut oauth = oauth.clone(); + if !endpoints.authorize.trim().is_empty() { + oauth.authorize = endpoints.authorize.clone(); + } + if !endpoints.token.trim().is_empty() { + oauth.token = endpoints.token.clone(); + } + oauth +} +pub mod discovery; +#[cfg(test)] +mod custom_tests; +#[cfg(test)] +mod discovery_tests; #[cfg(test)] mod google_tests; #[cfg(test)] diff --git a/crates/net/src/oauth/custom.rs b/crates/net/src/oauth/custom.rs new file mode 100644 index 0000000000..0effe204a7 --- /dev/null +++ b/crates/net/src/oauth/custom.rs @@ -0,0 +1,297 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! Signing in with the owner's own identity provider ([`OAuthProvider::Custom`]): an OpenID +//! Connect or OAuth 2.0 server in front of their own IMAP and SMTP servers. +//! +//! The same protected sign-in as Microsoft's and Google's (authorization code with PKCE `S256`, +//! a random `state`, the system browser, a loopback redirect: RFC 6749, 7636, 8252), at the +//! addresses the account's settings name ([`OAuth::effective`]). The client is the one the +//! owner (or their administrator) registered there for MailCraft: a public client, or one with a +//! client secret, which the host hands in from the system's credential store and which goes to +//! the token and revocation addresses alone (RFC 8252 §8.5 says what such a secret is worth). +//! A client with a secret proves who it is in the `Authorization` header (`client_secret_basic`, +//! RFC 6749 §2.3.1), or in the form for a provider that takes only that; a public client names +//! itself in the form (§3.2.1). The revocation address is asked the same way (RFC 7009 §2.1). +//! +//! When the provider's page sends the owner back it may name itself (`iss`, RFC 9207): a name +//! other than the issuer's is refused, and so is none from a provider that says it names itself, +//! so that a code meant for one provider is never traded at another. +//! +//! The redirect is `http://127.0.0.1:{port}/`, the IP literal RFC 8252 §7.3 asks for, on any free +//! port or the one the settings name for a provider that can't register "any port". +//! +//! What the provider answers is hostile. Its refusals are told apart by their code alone, in +//! fixed words; the text it adds for people is never shown (it could say anything, or repeat a +//! secret). + +use mailcraft_i18n::said; +use mailcraft_model::ClientAuth; + +use super::*; + +/// The fixed words for a provider's refusal, by its code (RFC 6749 §5.2, §4.1.2.1). +fn refused(code: &str) -> NetError { + let (text, auth) = match code { + "invalid_grant" => (said!("your identity provider no longer takes this sign-in: sign in again"), true), + "invalid_client" | "unauthorized_client" => { + (said!("your identity provider doesn't know this client id, or its client secret: check the OAuth settings"), true) + } + "invalid_scope" => (said!("your identity provider won't give what was asked for: check the extra scopes in the OAuth settings"), true), + "access_denied" => (said!("access was refused on the sign-in page"), true), + "server_error" | "temporarily_unavailable" => (said!("your identity provider can't sign anybody in just now: try again later"), false), + _ => (said!("your identity provider refused the sign-in"), true), + }; + NetError::Proto(if auth { ProtoError::Auth(text) } else { ProtoError::Rejected(text) }) +} + +/// The client id and the addresses a sign-in uses, when the settings are ready for one. +fn registration(oauth: &OAuth, client_secret: &str) -> Result { + if oauth.provider != OAuthProvider::Custom { + return Err(NetError::Config(said!("this account doesn't sign in with your own identity provider"))); + } + oauth.ready().map_err(|why| NetError::Config(why.to_string().into()))?; + if client_secret.len() > 1024 || !client_secret.bytes().all(|b| b.is_ascii_graphic()) { + return Err(NetError::Config(said!("the client secret can only be letters, digits and punctuation"))); + } + Ok(oauth.effective()) +} + +/// Sign the owner in on their identity provider's page and bring back tokens for the mail +/// servers. `client_secret` is empty for a public client. As for [`sign_in`]: `open` is given the +/// page's address, the wait is five minutes at most, and `cancel` ends it. +pub fn sign_in_custom(oauth: &OAuth, client_secret: &str, login_hint: &str, open: &dyn Fn(&str), cancel: &AtomicBool) -> Result { + sign_in_custom_refused(oauth, client_secret, login_hint, open, cancel, SIGN_IN_TIMEOUT).map_err(|refused| refused.error) +} + +/// [`sign_in_custom`], saying how a sign-in that brought no tokens ended ([`SignInEnd`]). +pub fn sign_in_custom_explained( + oauth: &OAuth, + client_secret: &str, + login_hint: &str, + open: &dyn Fn(&str), + cancel: &AtomicBool, +) -> Result { + sign_in_custom_refused(oauth, client_secret, login_hint, open, cancel, SIGN_IN_TIMEOUT).map_err(SignInEnd::from) +} + +/// [`sign_in_custom`], with what a no was about and whose it was. +pub(super) fn sign_in_custom_refused( + oauth: &OAuth, + client_secret: &str, + login_hint: &str, + open: &dyn Fn(&str), + cancel: &AtomicBool, + patience: Duration, +) -> Result { + let used = registration(oauth, client_secret)?; + provider_url(&used.authorize)?; + let token_endpoint = provider_url(&used.token)?; + if cancel.load(Ordering::Relaxed) { + return Err(NetError::SignInCancelled.into()); + } + let redirect = match used.redirect_port { + Some(port) => Redirect::listen_at(port)?, + None => Redirect::listen()?, + }; + let redirect_uri = format!("http://127.0.0.1:{}/", redirect.port); + let verifier = random(32)?; + let state = random(24)?; + open(&page(&used, &redirect_uri, &state, &challenge(&verifier), login_hint)); + let (issuer, iss_required) = (used.issuer.clone(), used.issuer_in_response); + let code = redirect.wait_for(&state, cancel, patience, |request, state| judge_issued(request, state, &issuer, iss_required))?; + drop(redirect); + let mut fields = vec![ + ("grant_type", "authorization_code"), + ("code", code.as_str()), + ("redirect_uri", redirect_uri.as_str()), + ("code_verifier", verifier.as_str()), + ]; + let authorization = client_authentication(&used, client_secret, &mut fields); + let secrets = [code.as_str(), verifier.as_str(), client_secret, credentials(&authorization)]; + trade_custom(&token_endpoint, &fields, authorization.as_deref(), "", &secrets).map_err(Refused::from) +} + +/// How the client proves who it is to the token or revocation address (RFC 6749 §2.3.1, §3.2.1): +/// with a secret, the `Authorization` header to send (`client_secret_basic`: the id and secret +/// each form-encoded, joined by a colon, in base64), or the two in the form (`client_secret_post`); +/// without one, its id in the form. The id is never sent both ways (a provider may refuse that). +fn client_authentication<'a>(used: &'a mailcraft_model::OAuthDefaults, client_secret: &'a str, fields: &mut Vec<(&str, &'a str)>) -> Option { + if client_secret.is_empty() { + fields.push(("client_id", used.client_id.as_str())); + return None; + } + match used.client_auth { + ClientAuth::Basic => { + let pair = format!("{}:{}", http::encode(&used.client_id), http::encode(client_secret)); + Some(format!("Basic {}", mailcraft_charset::base64::STANDARD.encode(pair.as_bytes()))) + } + ClientAuth::Post => { + fields.push(("client_id", used.client_id.as_str())); + fields.push(("client_secret", client_secret)); + None + } + } +} + +/// The credentials in an `Authorization` header (the base64 after `Basic `), to be kept out of +/// errors as the secret is: a server that repeats them repeats the secret. +fn credentials(authorization: &Option) -> &str { + authorization.as_deref().map_or("", |header| header.strip_prefix("Basic ").unwrap_or(header)) +} + +/// [`judge`] for an identity provider that may name itself in its answer (RFC 9207 §2.4): the +/// answer, a code or a refusal, is taken only from `issuer` (when it is known), and only with +/// its name when `required`. Checked before anything else in it is believed. +fn judge_issued(request: &[u8], state: &str, issuer: &str, required: bool) -> (&'static Page, Option>) { + let fields = match brought(request, state) { + Ok(fields) => fields, + Err(page) => return (page, None), + }; + let named = fields.iter().find(|(name, _)| name == "iss").map(|(_, value)| value.as_str()); + let wrong = match named { + Some(named) => !issuer.is_empty() && named != issuer, + None => required, + }; + if wrong { + let why = match named { + Some(_) => said!("the sign-in came back from another identity provider than the one asked: nothing of it was used"), + None => said!("the sign-in came back without your identity provider's name, which it says it always gives: nothing of it was used"), + }; + return (&FAILED, Some(Err(Refused::from(NetError::Proto(ProtoError::Protocol(why)))))); + } + // A no from the page is said in this module's own words, by its code alone: the provider's + // words (`error_description`) may name the owner or the organisation, and are neither logged + // nor shown (#1844 review). + if let Some((_, error)) = fields.iter().find(|(name, _)| name == "error").filter(|(_, error)| !error.is_empty()) { + log::info!("the identity provider's page came back with a no"); + // (The owner's own no, `access_denied` or `consent_required`, stays theirs: Declined.) + let declined = matches!(error.trim().to_ascii_lowercase().as_str(), "access_denied" | "consent_required"); + return (&FAILED, Some(Err(Refused { declined, ..Refused::from(refused(error)) }))); + } + match code_of(&fields) { + Ok(code) => (&DONE, Some(Ok(code))), + Err(refused) => (&FAILED, Some(Err(refused))), + } +} + +/// The address of the identity provider's sign-in page, with everything it needs to send the +/// owner back here. Nothing of the owner's but the address they sign in as (`login_hint`). +fn page(used: &mailcraft_model::OAuthDefaults, redirect_uri: &str, state: &str, challenge: &str, login_hint: &str) -> String { + let mut fields = vec![ + ("client_id", used.client_id.as_str()), + ("response_type", "code"), + ("redirect_uri", redirect_uri), + ("scope", used.scopes.as_str()), + ("state", state), + ("code_challenge", challenge), + ("code_challenge_method", "S256"), + ]; + let hint = login_hint.trim(); + if !hint.is_empty() && hint.len() <= 320 && !hint.chars().any(char::is_control) { + fields.push(("login_hint", hint)); + } + let address = used.authorize.trim(); + format!("{address}{}{}", if address.contains('?') { '&' } else { '?' }, http::form(&fields)) +} + +/// An address of an own identity provider, as one is spoken to: `https://` only. The settings may +/// name an `http://` address on this computer ([`mailcraft_model::oauth::endpoint`]), but nothing +/// is sent to one outside a test: a sign-in is never sent unencrypted, not even to this computer +/// (#1844 review). +pub(super) fn provider_url(text: &str) -> Result { + provider_url_when(text, plaintext_allowed()) +} + +/// [`provider_url`], with whether an `http://` address on this computer may be spoken to. +pub(super) fn provider_url_when(text: &str, plaintext: bool) -> Result { + let url = Url::parse(text)?; + if !url.secure && !plaintext { + return Err(NetError::Config(said!("your identity provider's addresses must start with https://"))); + } + Ok(url) +} + +/// Whether an identity provider may be spoken to without encryption (on this computer, as +/// [`Url::parse`] already holds): in this crate's own tests, and in the tests of the crates on it +/// that ask for it on their thread (`graph::standin::allow_loopback_tokens`, built with the +/// `stand-in` feature alone). +pub(super) fn plaintext_allowed() -> bool { + #[cfg(any(test, feature = "stand-in"))] + if crate::graph::standin::loopback_tokens_allowed() { + return true; + } + cfg!(test) +} + +/// Trade a refresh token for new tokens for the mail servers, without asking the owner anything. +/// The tokens carry the refresh token to use next time (a new one when the provider sent one). +/// `ProtoError::Auth`: the provider no longer takes it, and the owner has to sign in again; +/// `ProtoError::Rejected` or a connection error: it couldn't say, and the refresh token is as good +/// as it was. +pub fn refresh_custom(oauth: &OAuth, client_secret: &str, refresh_token: &str) -> Result { + let used = registration(oauth, client_secret)?; + let token_endpoint = provider_url(&used.token)?; + if refresh_token.is_empty() || !usable(refresh_token) { + return Err(NetError::Proto(ProtoError::Auth(said!("there is no earlier sign-in to renew")))); + } + // (No scope: the new tokens are for what the sign-in was given, RFC 6749 §6.) + let mut fields = vec![("grant_type", "refresh_token"), ("refresh_token", refresh_token)]; + let authorization = client_authentication(&used, client_secret, &mut fields); + let secrets = [refresh_token, client_secret, credentials(&authorization)]; + trade_custom(&token_endpoint, &fields, authorization.as_deref(), refresh_token, &secrets) +} + +/// Give a refresh token back to the identity provider (RFC 7009), when it names where: what is +/// done when the account is removed. Nothing to do when it names nowhere. A refusal or a provider +/// that can't be reached is an error, which the caller may let be: the token is forgotten here +/// either way. +pub fn revoke_custom(oauth: &OAuth, client_secret: &str, refresh_token: &str) -> Result<(), NetError> { + let used = registration(oauth, client_secret).or_else(|error| { + // (Settings that can't sign in may still say where to give a token back.) + if oauth.provider == OAuthProvider::Custom && !oauth.revoke.trim().is_empty() { Ok(oauth.effective()) } else { Err(error) } + })?; + if used.revoke.is_empty() || refresh_token.is_empty() || !usable(refresh_token) { + return Ok(()); + } + mailcraft_model::oauth::endpoint(&used.revoke).map_err(|why| NetError::Config(said!("the revocation address {why}", why)))?; + let endpoint = provider_url(&used.revoke)?; + let mut fields = vec![("token", refresh_token), ("token_type_hint", "refresh_token")]; + let authorization = client_authentication(&used, client_secret, &mut fields); + let answer = http::post_form_as(&endpoint, &fields, authorization.as_deref(), TOKEN_TIMEOUT).map_err(|e| { + [refresh_token, client_secret, credentials(&authorization)].iter().filter(|s| !s.is_empty()).fold(e, |e, secret| e.without(secret)) + })?; + // RFC 7009 §2.2: 200 whether or not the token was still good. + if answer.status == 200 { + return Ok(()); + } + let json = serde_json::from_slice::(&answer.body).ok(); + let code = json.as_ref().and_then(|j| j.get("error")).and_then(Value::as_str).unwrap_or(""); + Err(if code.is_empty() { + NetError::Proto(ProtoError::Rejected(said!("your identity provider answered with status {status}", status = answer.status))) + } else { + refused(code) + }) +} + +/// POST the form to the token endpoint and read the tokens out of the answer, the refusal by its +/// code alone, with the client's credentials in the `Authorization` header when it sends them so. +/// `secrets` are the parts of the request that must not come back in an error. +fn trade_custom( + endpoint: &Url, + fields: &[(&str, &str)], + authorization: Option<&str>, + earlier_refresh: &str, + secrets: &[&str], +) -> Result { + let answer = http::post_form_as(endpoint, fields, authorization, TOKEN_TIMEOUT) + .map_err(|e| secrets.iter().filter(|s| !s.is_empty()).fold(e, |e, secret| e.without(secret)))?; + let json = serde_json::from_slice::(&answer.body).ok().filter(Value::is_object); + if let Some(code) = json.as_ref().and_then(|j| j.get("error")).and_then(Value::as_str) { + let code: String = code.chars().take(64).collect(); + return Err(refused(&code)); + } + if answer.status >= 500 { + return Err(NetError::Proto(ProtoError::Rejected(said!("your identity provider answered with status {status}", status = answer.status)))); + } + tokens_from(&answer, earlier_refresh, mailcraft_time::now(), secrets).map_err(|refused| refused.error) +} diff --git a/crates/net/src/oauth/custom_tests.rs b/crates/net/src/oauth/custom_tests.rs new file mode 100644 index 0000000000..aeb32ad228 --- /dev/null +++ b/crates/net/src/oauth/custom_tests.rs @@ -0,0 +1,404 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! Signing in with an own identity provider, against a fake token service and an in-process +//! loopback browser. Invented example.org identities; no real provider is contacted. + +use std::collections::HashMap; +use std::sync::{Arc, Mutex}; + +use mailcraft_model::ClientAuth; + +use super::*; +use crate::fake::{FakeHttp, json_answer}; + +const PATIENCE: Duration = Duration::from_secs(10); +const SECRET: &str = "not-a-real-client-secret"; + +fn own(server: &FakeHttp) -> OAuth { + OAuth { + provider: OAuthProvider::Custom, + client_id: "mailcraft-desktop".into(), + issuer: server.url("/realms/mail"), + authorize: server.url("/auth"), + token: server.url("/token"), + revoke: server.url("/revoke"), + scopes: "mail".into(), + ..OAuth::default() + } +} + +fn jwt(address: &str) -> String { + let claims = serde_json::json!({ "email": address, "name": "Alice Example" }); + format!("header.{}.signature", URL_SAFE_NO_PAD.encode(claims.to_string().as_bytes())) +} + +fn good(refresh: &str) -> Vec { + let mut body = serde_json::json!({ + "token_type": "Bearer", + "expires_in": 300, + "access_token": "fake-access", + "id_token": jwt("alice@example.org"), + }); + if !refresh.is_empty() { + body["refresh_token"] = serde_json::json!(refresh); + } + json_answer("200 OK", &body.to_string()) +} + +fn form(server: &FakeHttp, n: usize) -> HashMap { + http::pairs(server.request(n).split_once("\r\n\r\n").unwrap().1).into_iter().collect() +} + +type Seen = Arc>; + +/// A browser on another thread that comes back to the loopback port with a code, and the state +/// the page was given (or another). +fn browser(right_state: bool) -> (impl Fn(&str) + use<>, Seen) { + browser_adding(right_state, "") +} + +/// [`browser`], coming back with `extra` (`&iss=…`, say) after the code and state. +fn browser_adding(right_state: bool, extra: &str) -> (impl Fn(&str) + use<>, Seen) { + let extra = extra.to_string(); + let seen = Seen::default(); + let kept = seen.clone(); + let opener = move |url: &str| { + *kept.lock().unwrap() = url.into(); + let args: HashMap = http::pairs(url.split_once('?').unwrap().1).into_iter().collect(); + let port: u16 = args["redirect_uri"].strip_prefix("http://127.0.0.1:").unwrap().trim_end_matches('/').parse().unwrap(); + let state = if right_state { args["state"].clone() } else { "somebody-elses".into() }; + let extra = extra.clone(); + std::thread::spawn(move || { + let mut socket = TcpStream::connect((Ipv4Addr::LOCALHOST, port)).unwrap(); + socket.set_read_timeout(Some(PATIENCE)).unwrap(); + let request = format!("GET /?code=synthetic-code&state={state}{extra} HTTP/1.1\r\nHost: 127.0.0.1:{port}\r\n\r\n"); + socket.write_all(request.as_bytes()).unwrap(); + let mut answer = Vec::new(); + let _ = socket.read_to_end(&mut answer); + }); + }; + (opener, seen) +} + +fn page_args(seen: &Seen) -> HashMap { + let page = seen.lock().unwrap().clone(); + http::pairs(page.split_once('?').unwrap().1).into_iter().collect() +} + +#[test] +fn a_whole_sign_in_against_the_providers_own_addresses() { + let server = FakeHttp::answering(good("fake-refresh")); + let (open, seen) = browser(true); + let cancel = AtomicBool::new(false); + let tokens = sign_in_custom(&own(&server), "", "alice@example.org", &open, &cancel).unwrap(); + assert_eq!((tokens.access.as_str(), tokens.refresh.as_str(), tokens.email.as_str()), ("fake-access", "fake-refresh", "alice@example.org")); + // The page: the client, PKCE S256, the IP-literal redirect, what it is asked for. + let args = page_args(&seen); + assert!(seen.lock().unwrap().starts_with(&server.url("/auth?"))); + assert_eq!((args["client_id"].as_str(), args["code_challenge_method"].as_str()), ("mailcraft-desktop", "S256")); + assert_eq!(args["scope"], "openid email offline_access mail"); + assert!(args["redirect_uri"].starts_with("http://127.0.0.1:") && args["redirect_uri"].ends_with('/')); + assert_eq!(args["login_hint"], "alice@example.org"); + // The trade: the code, the verifier whose hash the page got, the same redirect, no secret. + let trade = form(&server, 0); + assert!(server.request(0).starts_with("POST /token ")); + assert_eq!((trade["grant_type"].as_str(), trade["code"].as_str()), ("authorization_code", "synthetic-code")); + assert_eq!(challenge(&trade["code_verifier"]), args["code_challenge"]); + assert_eq!(trade["redirect_uri"], args["redirect_uri"]); + assert!(!trade.contains_key("client_secret")); +} + +#[test] +fn a_client_secret_goes_to_the_token_address_alone_and_never_into_an_error() { + let server = + FakeHttp::answering(json_answer("401 Unauthorized", &format!(r#"{{"error":"invalid_client","error_description":"bad secret {SECRET}"}}"#))); + let (open, seen) = browser(true); + let cancel = AtomicBool::new(false); + let error = sign_in_custom(&own(&server), SECRET, "alice@example.org", &open, &cancel).unwrap_err(); + assert_eq!(authorization(&server, 0).as_deref(), Some(basic("mailcraft-desktop", SECRET).as_str())); + assert!(!seen.lock().unwrap().contains(SECRET), "the secret went through the browser"); + // In fixed words: the provider's own text is never shown. + let shown = format!("{error} {error:?}"); + assert!(!shown.contains(SECRET) && !shown.contains("bad secret"), "{shown}"); + assert!(shown.contains("client id"), "{shown}"); +} + +#[test] +fn a_code_with_the_wrong_state_is_never_traded() { + let server = FakeHttp::answering(good("r")); + let (open, _) = browser(false); + let cancel = AtomicBool::new(false); + let outcome = custom::sign_in_custom_refused(&own(&server), "", "", &open, &cancel, Duration::from_millis(1_500)); + assert!(matches!(outcome.map_err(|r| r.error), Err(NetError::SignInTimedOut))); + assert_eq!(server.asked(), 0); +} + +#[test] +fn a_fixed_redirect_port_is_the_one_used() { + let port = TcpListener::bind("127.0.0.1:0").unwrap().local_addr().unwrap().port(); + let server = FakeHttp::answering(good("r")); + let (open, seen) = browser(true); + let cancel = AtomicBool::new(false); + sign_in_custom(&OAuth { redirect_port: Some(port), ..own(&server) }, "", "", &open, &cancel).unwrap(); + assert_eq!(page_args(&seen)["redirect_uri"], format!("http://127.0.0.1:{port}/")); + // One somebody else has is refused, not swapped for another the provider wouldn't send to. + let taken = TcpListener::bind("127.0.0.1:0").unwrap(); + let busy = taken.local_addr().unwrap().port(); + let error = sign_in_custom(&OAuth { redirect_port: Some(busy), ..own(&server) }, "", "", &open, &cancel).unwrap_err(); + assert!(matches!(error, NetError::Config(_)), "{error:?}"); +} + +#[test] +fn settings_that_cant_sign_in_are_refused_before_the_page_opens() { + let server = FakeHttp::answering(good("r")); + let opened = Arc::new(Mutex::new(false)); + let flag = opened.clone(); + let open = move |_: &str| *flag.lock().unwrap() = true; + let cancel = AtomicBool::new(false); + for broken in [ + OAuth { client_id: String::new(), ..own(&server) }, + OAuth { token: String::new(), ..own(&server) }, + OAuth { authorize: "http://id.example.org/auth".into(), ..own(&server) }, + OAuth { provider: OAuthProvider::Google, ..own(&server) }, + ] { + assert!(matches!(sign_in_custom(&broken, "", "", &open, &cancel), Err(NetError::Config(_))), "{broken:?}"); + } + assert!(matches!(sign_in_custom(&own(&server), "a secret with spaces", "", &open, &cancel), Err(NetError::Config(_)))); + assert!(!*opened.lock().unwrap()); + assert_eq!(server.asked(), 0); + // Nor is it ever a Microsoft Graph sign-in. + assert!(matches!(sign_in_for(&own(&server), "", &open, &cancel, Resource::Graph), Err(NetError::Config(_)))); + assert!(matches!(refresh_for(&own(&server), "r", Resource::Graph), Err(NetError::Config(_)))); +} + +#[test] +fn refreshing_keeps_the_newest_refresh_token() { + let server = FakeHttp::start(|n, _| if n == 0 { good("rotated") } else { good("") }); + let first = refresh_custom(&own(&server), SECRET, "original").unwrap(); + assert_eq!(first.refresh, "rotated"); + let trade = form(&server, 0); + assert_eq!((trade["grant_type"].as_str(), trade["refresh_token"].as_str()), ("refresh_token", "original")); + assert_eq!(authorization(&server, 0), Some(basic("mailcraft-desktop", SECRET))); + assert!(!trade.contains_key("scope")); + // An answer without a new one keeps the one given. + assert_eq!(refresh_custom(&own(&server), "", "rotated").unwrap().refresh, "rotated"); + // The generic path takes it too, as a public client. + assert!(refresh(&own(&server), "rotated").is_ok()); +} + +#[test] +fn a_refused_refresh_says_sign_in_again_and_a_provider_that_cant_say_doesnt() { + let refused = FakeHttp::answering(json_answer("400 Bad Request", r#"{"error":"invalid_grant","error_description":""}"#)); + let error = refresh_custom(&own(&refused), "", "old").unwrap_err(); + assert!(error.is_refused_sign_in(), "{error:?}"); + assert!(!format!("{error}").contains("script")); + let down = FakeHttp::answering(json_answer("503 Service Unavailable", "down")); + let error = refresh_custom(&own(&down), "", "old").unwrap_err(); + assert!(!error.is_refused_sign_in(), "{error:?}"); + let busy = FakeHttp::answering(json_answer("400 Bad Request", r#"{"error":"temporarily_unavailable"}"#)); + assert!(!refresh_custom(&own(&busy), "", "old").unwrap_err().is_refused_sign_in()); + // A provider that can't be reached isn't a refusal either. + let port = TcpListener::bind("127.0.0.1:0").unwrap().local_addr().unwrap().port(); + let gone = OAuth { token: format!("http://127.0.0.1:{port}/token"), ..own(&down) }; + assert!(matches!(refresh_custom(&gone, "", "old"), Err(NetError::Connect { .. }))); + // No refresh token: nothing to renew, and nothing asked. + let quiet = FakeHttp::answering(good("r")); + assert!(refresh_custom(&own(&quiet), "", "").unwrap_err().is_refused_sign_in()); + assert_eq!(quiet.asked(), 0); +} + +#[test] +fn an_answer_without_a_usable_token_is_refused() { + for body in [r#"{"token_type":"mac","access_token":"a"}"#, r#"{"token_type":"Bearer"}"#, "not json", r#"{"access_token":"a b\r\nc"}"#] { + let server = FakeHttp::answering(json_answer("200 OK", body)); + assert!(refresh_custom(&own(&server), "", "old").is_err(), "{body}"); + } +} + +#[test] +fn revoking_gives_the_refresh_token_back_where_the_provider_says() { + let server = FakeHttp::answering(json_answer("200 OK", "")); + revoke_custom(&own(&server), SECRET, "the-refresh").unwrap(); + let sent = form(&server, 0); + assert!(server.request(0).starts_with("POST /revoke ")); + assert_eq!((sent["token"].as_str(), sent["token_type_hint"].as_str()), ("the-refresh", "refresh_token")); + // RFC 7009 §2.1: the client proves who it is as at the token address. + assert_eq!(authorization(&server, 0), Some(basic("mailcraft-desktop", SECRET))); + assert!(!sent.contains_key("client_secret") && !sent.contains_key("client_id")); + // Nowhere to give it back: nothing is sent. + let quiet = FakeHttp::answering(json_answer("200 OK", "")); + revoke_custom(&OAuth { revoke: String::new(), ..own(&quiet) }, "", "the-refresh").unwrap(); + assert_eq!(quiet.asked(), 0); + // A refusal is an error that names no token. + let refused = FakeHttp::answering(json_answer("400 Bad Request", r#"{"error":"invalid_client","error_description":"the-refresh"}"#)); + let error = revoke_custom(&own(&refused), "", "the-refresh").unwrap_err(); + assert!(!format!("{error} {error:?}").contains("the-refresh")); +} + +#[test] +fn the_endpoints_of_an_own_provider_are_its_settings() { + let server = FakeHttp::answering(good("r")); + let ends = Endpoints::of(&own(&server)); + assert_eq!((ends.authorize, ends.token), (server.url("/auth"), server.url("/token"))); + assert_eq!(ends.scope, "openid email offline_access mail"); + assert!(ends.consent.is_empty() && ends.fewer.is_empty() && ends.lesser.is_empty()); +} + +/// The `Authorization` header of request `n`, when it has one. +fn authorization(server: &FakeHttp, n: usize) -> Option { + let request = server.request(n); + let head = request.split_once("\r\n\r\n").map_or(request.as_str(), |(head, _)| head).to_string(); + head.lines() + .find_map(|line| line.split_once(':').filter(|(name, _)| name.eq_ignore_ascii_case("authorization")).map(|(_, v)| v.trim().to_string())) +} + +/// RFC 6749 §2.3.1 by hand: each form-encoded, joined by a colon, in base64. +fn basic(id: &str, secret: &str) -> String { + format!("Basic {}", mailcraft_charset::base64::STANDARD.encode(format!("{}:{}", http::encode(id), http::encode(secret)).as_bytes())) +} + +#[test] +fn a_secret_goes_in_the_header_and_the_form_names_no_client() { + let server = FakeHttp::answering(good("r")); + let (open, _) = browser(true); + sign_in_custom(&own(&server), SECRET, "", &open, &AtomicBool::new(false)).unwrap(); + let trade = form(&server, 0); + // §4.1.3: client_id only from a client that doesn't authenticate; never both ways. + assert!(!trade.contains_key("client_id") && !trade.contains_key("client_secret"), "{trade:?}"); + assert_eq!(authorization(&server, 0).unwrap(), "Basic bWFpbGNyYWZ0LWRlc2t0b3A6bm90LWEtcmVhbC1jbGllbnQtc2VjcmV0"); +} + +#[test] +fn the_header_form_encodes_the_id_and_secret_before_base64() { + let server = FakeHttp::answering(good("r")); + let oauth = OAuth { client_id: "desk:top".into(), ..own(&server) }; + refresh_custom(&oauth, "a:b+c%d/e", "old").unwrap(); + let sent = authorization(&server, 0).unwrap(); + let decoded = mailcraft_charset::base64::STANDARD.decode(sent.strip_prefix("Basic ").unwrap()).unwrap(); + // The colon in each is escaped, so the one between them is the only one there is. + assert_eq!(String::from_utf8(decoded).unwrap(), "desk%3Atop:a%3Ab%2Bc%25d%2Fe"); +} + +#[test] +fn a_provider_that_takes_only_the_form_gets_the_secret_there() { + let server = FakeHttp::start(|_, _| good("r")); + let oauth = OAuth { client_auth: ClientAuth::Post, ..own(&server) }; + refresh_custom(&oauth, SECRET, "old").unwrap(); + let trade = form(&server, 0); + assert_eq!((trade["client_id"].as_str(), trade["client_secret"].as_str()), ("mailcraft-desktop", SECRET)); + assert_eq!(authorization(&server, 0), None); + revoke_custom(&oauth, SECRET, "old").unwrap(); + assert_eq!(form(&server, 1)["client_secret"], SECRET); + assert_eq!(authorization(&server, 1), None); +} + +#[test] +fn a_public_client_names_itself_in_the_form_and_sends_no_header() { + let server = FakeHttp::start(|_, _| good("r")); + for oauth in [own(&server), OAuth { client_auth: ClientAuth::Post, ..own(&server) }] { + let n = server.asked(); + refresh_custom(&oauth, "", "old").unwrap(); + let trade = form(&server, n); + assert_eq!(trade.get("client_id").map(String::as_str), Some("mailcraft-desktop")); + assert!(!trade.contains_key("client_secret") && authorization(&server, n).is_none()); + } +} + +#[test] +fn the_header_never_comes_back_in_an_error() { + let header = basic("mailcraft-desktop", SECRET); + let echo = format!(r#"{{"error":"invalid_client","error_description":"got {}"}}"#, header); + let server = FakeHttp::answering(json_answer("401 Unauthorized", &echo)); + let error = refresh_custom(&own(&server), SECRET, "old").unwrap_err(); + let shown = format!("{error} {error:?}"); + assert!(!shown.contains(header.trim_start_matches("Basic ")) && !shown.contains(SECRET), "{shown}"); + assert!(error.is_refused_sign_in()); +} + +#[test] +fn an_answer_naming_the_issuer_is_taken_and_one_naming_another_never_traded() { + // RFC 9207 §2.4. + let server = FakeHttp::answering(good("r")); + let issuer = own(&server).issuer; + let (open, _) = browser_adding(true, &format!("&iss={}", http::encode(&issuer))); + assert!(sign_in_custom(&own(&server), "", "", &open, &AtomicBool::new(false)).is_ok()); + let other = FakeHttp::answering(good("r")); + let (open, _) = browser_adding(true, "&iss=https%3A%2F%2Fevil.example%2Frealms%2Fmail"); + let error = sign_in_custom(&own(&other), "", "", &open, &AtomicBool::new(false)).unwrap_err(); + assert!(format!("{error}").contains("another identity provider"), "{error}"); + assert_eq!(other.asked(), 0, "a code from another provider was traded"); +} + +#[test] +fn an_answer_without_the_name_a_provider_promised_is_refused() { + let server = FakeHttp::answering(good("r")); + let promised = OAuth { issuer_in_response: true, ..own(&server) }; + let (open, _) = browser(true); + let error = sign_in_custom(&promised, "", "", &open, &AtomicBool::new(false)).unwrap_err(); + assert!(format!("{error}").contains("without your identity provider's name"), "{error}"); + assert_eq!(server.asked(), 0); + // A provider that never said it names itself: its answer without a name is taken. + let (open, _) = browser(true); + assert!(sign_in_custom(&own(&server), "", "", &open, &AtomicBool::new(false)).is_ok()); +} + +#[test] +fn a_five_minute_token_is_used_as_it_comes_not_renewed_again_at_once() { + // Keycloak's own setting: access tokens live five minutes. Renewed tokens that counted as + // stale at once made every Send/Receive renew again and again (#1831). + let body = + |life: &str| json_answer("200 OK", &format!(r#"{{"token_type":"Bearer","expires_in":{life},"access_token":"a","refresh_token":"r"}}"#)); + let server = FakeHttp::start(move |n, _| body(if n == 0 { "300" } else { "0" })); + let now = mailcraft_time::now(); + let tokens = refresh_custom(&own(&server), "", "old").unwrap(); + assert!(tokens.issued_at >= now && tokens.expires_at >= tokens.issued_at + 300); + assert!(tokens.fresh_for(mailcraft_time::now(), 600), "a token just renewed counts as stale"); + // One said to live no time at all lives a minute: used once, not renewed in a loop. + let brief = refresh_custom(&own(&server), "", "old").unwrap(); + assert!(brief.expires_at - brief.issued_at >= 60 && brief.fresh_for(mailcraft_time::now(), 600)); +} + +/// A no from the provider's page is said in fixed words by its code: its own words, which may +/// name the owner or the organisation, reach neither the error nor anything traded (#1844 review). +#[test] +fn a_no_from_the_page_is_said_in_fixed_words_never_the_providers() { + let server = FakeHttp::answering(good("r")); + let (open, _) = browser_adding(true, "&error=access_denied&error_description=Private%20text%20about%20ada%40example.org"); + let error = sign_in_custom(&own(&server), "", "", &open, &AtomicBool::new(false)).unwrap_err(); + let said = format!("{error} {error:?}"); + assert!(said.contains("access was refused on the sign-in page"), "{said}"); + assert!(!said.contains("Private") && !said.contains("ada@example.org") && !said.contains("ada%40"), "{said}"); + assert_eq!(server.asked(), 0, "nothing was traded"); + // A code nobody knows: the general words, not the code itself. + let (open, _) = browser_adding(true, "&error=Private-code-ada&error_description=more"); + let error = sign_in_custom(&own(&server), "", "", &open, &AtomicBool::new(false)).unwrap_err(); + assert!(!format!("{error} {error:?}").contains("Private"), "{error}"); +} + +/// The owner's own no on the provider's page is still the owner's: Declined, in fixed words +/// (#1844 review). +#[test] +fn the_owners_no_on_the_page_is_declined() { + for code in ["access_denied", "consent_required"] { + let server = FakeHttp::answering(good("r")); + let (open, _) = browser_adding(true, &format!("&error={code}&error_description=Private")); + let end = sign_in_custom_explained(&own(&server), "", "", &open, &AtomicBool::new(false)).unwrap_err(); + assert!(matches!(end, SignInEnd::Declined), "{code}: {end:?}"); + } + let server = FakeHttp::answering(good("r")); + let (open, _) = browser_adding(true, "&error=server_error"); + assert!(!matches!(sign_in_custom_explained(&own(&server), "", "", &open, &AtomicBool::new(false)), Err(SignInEnd::Declined))); +} + +/// Outside a test nothing is sent to an own identity provider without encryption, not even to +/// this computer; https addresses are taken either way (#1844 review). +#[test] +fn an_own_providers_plain_http_address_is_spoken_to_only_in_a_test() { + for address in ["http://127.0.0.1:8080/token", "http://localhost/token", "http://[::1]/token"] { + assert!(matches!(custom::provider_url_when(address, false), Err(NetError::Config(_))), "{address}"); + assert!(custom::provider_url_when(address, true).is_ok(), "{address}"); + } + assert!(custom::provider_url_when("https://id.example.org/token", false).is_ok()); + // Plain http elsewhere is never spoken to, test or not. + assert!(custom::provider_url_when("http://id.example.org/token", true).is_err()); +} diff --git a/crates/net/src/oauth/discovery.rs b/crates/net/src/oauth/discovery.rs new file mode 100644 index 0000000000..49ed0b11a5 --- /dev/null +++ b/crates/net/src/oauth/discovery.rs @@ -0,0 +1,373 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! Finding an identity provider's sign-in and token addresses from its own address (its issuer): +//! OpenID Connect Discovery 1.0 (`{issuer}/.well-known/openid-configuration`), then RFC 8414 +//! (`https://host/.well-known/oauth-authorization-server{path}`). +//! +//! Only the issuer's address goes out: no mail address, no client id, no cookie. Fetched over +//! HTTPS alone (an `http://` address only on this computer, and only in tests: +//! `custom::provider_url`), following at most [`MAX_REDIRECTS`] redirects, each to an address +//! that is checked as the first was and that never leads from a provider on the network to this +//! computer, a private network or plain `http` ([`may_redirect`]); an address on another server +//! is asked the way a picture is, its name looked up and every address of it public, and the +//! connection made to an address that was checked ([`fetch_with`]). The answer is capped. +//! +//! The document is hostile. It must name the issuer that was asked for, byte for byte (RFC 8414 +//! §3.3, OpenID Connect Discovery §4.3): a document that names another is refused, so that one +//! provider can't speak for another. Only the fields a sign-in needs are read, each capped; +//! every address in it must be one an identity provider can be reached at +//! ([`mailcraft_model::oauth::endpoint`]). A provider that says which PKCE methods it takes and +//! doesn't list `S256` is refused: `plain` is never sent. + +use std::time::{Duration, Instant}; + +use mailcraft_i18n::{Arg, said}; +use mailcraft_model::ClientAuth; +use serde_json::Value; + +use crate::NetError; +use crate::http::{self, Url}; +use crate::pictures::{self, Limits, PictureError, Reach, Sent}; + +/// How long fetching one document may take. +const PATIENCE: Duration = Duration::from_secs(10); +/// Most redirects followed from one address. +pub(crate) const MAX_REDIRECTS: usize = 3; +/// Most entries of a list kept, and the longest one. +const MAX_LIST: usize = 64; +const MAX_ENTRY: usize = 256; + +/// What an identity provider says of itself, as far as a sign-in needs it. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct Discovered { + /// The issuer, as asked for and as the document names it. + pub issuer: String, + /// The page the owner signs in on. + pub authorize: String, + /// Where codes and refresh tokens are traded for tokens. + pub token: String, + /// Where a refresh token is given back; empty when it names none. + pub revoke: String, + /// The scopes it says it supports; empty when it doesn't say. + pub scopes_supported: Vec, + /// The hosts of its addresses that lie outside the issuer's own domain (its registrable + /// part), for the owner to be asked about once before anything is sent there. + pub outside: Vec, + /// How a client secret is to be sent: in the `Authorization` header (`client_secret_basic`) + /// unless the provider lists the form (`client_secret_post`) and not the header. + pub client_auth: ClientAuth, + /// It says its page names itself (`iss`) when it sends the owner back (RFC 9207). + pub issuer_in_response: bool, +} + +impl Discovered { + /// Whether it says it can't hand out refresh tokens: it lists its scopes and + /// `offline_access` isn't among them. (Saying nothing is no such word.) + pub fn lacks_offline_access(&self) -> bool { + !self.scopes_supported.is_empty() && !self.scopes_supported.iter().any(|s| s == "offline_access") + } + + /// Which of the standard scopes (`openid email offline_access`) to ask it for: `None` for all + /// of them, else only those it lists ([`mailcraft_model::oauth::base_scopes_for`]). + pub fn base_scopes(&self) -> Option { + mailcraft_model::oauth::base_scopes_for(&self.scopes_supported) + } +} + +/// Fetch and read what the identity provider at `issuer` says of itself: its OpenID Connect +/// document, else its RFC 8414 one. The error says what was wrong with the last one tried. +pub fn discover(issuer: &str) -> Result { + let issuer = checked_issuer(issuer)?; + let mut last = NetError::Config(said!("the identity provider doesn't describe itself at the usual addresses: enter its sign-in addresses")); + for address in addresses(&issuer) { + match fetch(&address) { + Ok(Some(body)) => match read(&issuer, &body) { + Ok(found) => return Ok(found), + // A document that is there but wrong says so, whatever the other address has. + Err(error) => last = error, + }, + Ok(None) => {} + Err(error) => last = error, + } + } + Err(last) +} + +/// The issuer as typed, if it is one: an `https://` address with no query or fragment. +fn checked_issuer(issuer: &str) -> Result { + let issuer = issuer.trim(); + if issuer.is_empty() { + return Err(NetError::Config(said!("enter your identity provider's address (its issuer)"))); + } + mailcraft_model::oauth::endpoint(issuer).map_err(|why| NetError::Config(said!("the identity provider's address {why}", why)))?; + if issuer.contains(['?', '#']) { + return Err(NetError::Config(said!("the identity provider's address can't have a query or a fragment"))); + } + Ok(issuer.to_string()) +} + +/// Where the issuer's documents are, in the order they are tried. +pub(crate) fn addresses(issuer: &str) -> Vec { + let base = issuer.trim_end_matches('/'); + let mut out = vec![format!("{base}/.well-known/openid-configuration")]; + // RFC 8414 §3.1: the well-known part goes between the host and the issuer's path. + if let Some((scheme, rest)) = base.split_once("://") { + let (host, path) = rest.find('/').map_or((rest, ""), |at| rest.split_at(at)); + out.push(format!("{scheme}://{host}/.well-known/oauth-authorization-server{path}")); + } + out +} + +/// What one request for a description brought back. +pub(super) struct Got { + pub(super) status: u16, + pub(super) body: Vec, + /// Where a redirect leads, as the server wrote it. + pub(super) location: Option, +} + +/// Why a redirect isn't followed. +fn elsewhere() -> NetError { + NetError::Config(said!("the identity provider sent its description on to an address on this computer, a private network or without https")) +} + +/// The body at `address`, following redirects to addresses that are checked as it was. +/// `Ok(None)` when there is nothing there (a status other than 200 and a redirect). +fn fetch(address: &str) -> Result>, NetError> { + fetch_with(address, &Reach::web()) +} + +/// [`fetch`], with where names lead and connections may go said. +/// +/// The issuer the owner typed is asked as it is, wherever it is (an organisation's own provider +/// may be on its own network), and so is another address on the same server. An address on +/// another server, which only the provider's redirect names, is asked the way a picture is: its +/// name is looked up here, every address it has must be on the public internet, and the +/// connection goes to an address that was checked (`pictures::ask_with`), so that a redirect +/// never reaches this computer or a private network, by its address or by its name (#1844 +/// review). An issuer on this computer (a test's) may lead anywhere [`may_redirect`] lets it. +pub(super) fn fetch_with(address: &str, reach: &Reach<'_>) -> Result>, NetError> { + let mut url = super::custom::provider_url(address)?; + let first = url.clone(); + for _ in 0..=MAX_REDIRECTS { + let got = if crate::transport::is_loopback(&first.host) || url.same_server(&first) { ask(&url)? } else { ask_public(&url, reach)? }; + match got.status { + 200 => return Ok(Some(got.body)), + 301 | 302 | 303 | 307 | 308 => { + let Some(location) = got.location else { return Ok(None) }; + url = next_hop(&first, &url, &location, super::custom::plaintext_allowed())?; + } + _ => return Ok(None), + } + } + Err(NetError::Config(said!("the identity provider sent its description on through too many redirects"))) +} + +/// Where a redirect from `url` to `location` leads, met fetching the description of the issuer at +/// `first`: checked as the issuer was (`https://` alone, unless `plaintext` and on this computer: +/// `custom::provider_url`), and by [`may_redirect`] (#1844 review). +pub(super) fn next_hop(first: &Url, url: &Url, location: &str, plaintext: bool) -> Result { + let next = super::custom::provider_url_when(&absolute(url, location), plaintext)?; + if !may_redirect(first, &next) { + return Err(elsewhere()); + } + Ok(next) +} + +/// One request for a description, as the HTTP layer makes it. +fn ask(url: &Url) -> Result { + let request = + http::Request { method: "GET", headers: &[("Accept", "application/json")], body: None, patience: PATIENCE, max_body: http::MAX_BODY }; + let answer = http::request(url, &request)?; + Ok(Got { status: answer.status, body: answer.body, location: answer.location }) +} + +/// One request for a description at an address a redirect named, to the public internet alone. +pub(super) fn ask_public(url: &Url, reach: &Reach<'_>) -> Result { + let limits = Limits { max_bytes: http::MAX_BODY, patience: PATIENCE, ..Limits::default() }; + let deadline = Instant::now() + PATIENCE; + let sent = Sent { accept: "application/json", extra: "" }; + let answer = pictures::ask_with(url, reach, &limits, http::MAX_BODY, deadline, None, &sent, &pictures::Cancel::new()).map_err(refused)?; + let body = match &answer.said.coding { + Some(coding) => pictures::unpack(answer.body, coding, http::MAX_BODY).map_err(refused)?, + None => answer.body, + }; + Ok(Got { status: answer.status, body, location: answer.said.location }) +} + +/// What went wrong asking at an address a redirect named, as discovery says it. +fn refused(error: PictureError) -> NetError { + match error { + PictureError::NotPublic | PictureError::Address => elsewhere(), + PictureError::Net(error) => error, + other => NetError::Config(said!("the identity provider's description couldn't be fetched: {other}", other)), + } +} + +/// Whether a redirect met fetching the description of the issuer at `first` may be followed to +/// `next`: before the owner has agreed to anything, it never leads from a provider on the +/// network to this computer or a private network (by an address written as one), nor from +/// `https` to `http` (#1844 review). An issuer on this computer (a test's) may lead anywhere +/// [`Url::parse`] takes. +pub(super) fn may_redirect(first: &Url, next: &Url) -> bool { + if crate::transport::is_loopback(&first.host) { + return true; + } + let inside = crate::transport::is_loopback(&next.host) || next.host.parse::().is_ok_and(|ip| !crate::pictures::is_public(ip)); + next.secure && !inside +} + +/// Whether `reference` starts with a scheme (RFC 3986 §3.1: a letter, then letters, digits, +/// `+`, `-` or `.`, then `:`), which makes it an absolute address. +fn has_scheme(reference: &str) -> bool { + let Some((scheme, _)) = reference.split_once(':') else { return false }; + let mut bytes = scheme.bytes(); + bytes.next().is_some_and(|b| b.is_ascii_alphabetic()) && bytes.all(|b| b.is_ascii_alphanumeric() || matches!(b, b'+' | b'-' | b'.')) +} + +/// A `Location` as an absolute address, resolved against `from` as a URI reference is (RFC 3986 +/// §5.2): an absolute one as written; `//host/…` with `from`'s scheme; `/path` on `from`'s host; +/// `?query` on `from`'s path; and `name` beside `from`'s document, in its directory (#1844 +/// review). What comes of it is checked by [`Url::parse`] before anything is fetched. +pub(super) fn absolute(from: &Url, location: &str) -> String { + let location = location.trim(); + // (Absolute by the scheme it starts with, not by a `://` anywhere: `/next?u=https://x` is a + // path on `from`'s host, #1844 review.) + if has_scheme(location) { + return location.to_string(); + } + let scheme = if from.secure { "https" } else { "http" }; + if let Some(rest) = location.strip_prefix("//") { + return format!("{scheme}://{rest}"); + } + let host = if from.host.contains(':') { format!("[{}]", from.host) } else { from.host.clone() }; + let port = if from.port == 0 { String::new() } else { format!(":{}", from.port) }; + // (`from`'s path without its query, and the directory it is in.) + let path = from.path.split(['?', '#']).next().unwrap_or(""); + let path = if path.is_empty() { "/" } else { path }; + let target = if location.starts_with('/') { + location.to_string() + } else if location.starts_with('?') { + format!("{path}{location}") + } else if location.is_empty() || location.starts_with('#') { + path.to_string() + } else { + let directory = path.rfind('/').map_or("/", |at| path.get(..=at).unwrap_or("/")); + format!("{directory}{location}") + }; + format!("{scheme}://{host}{port}{}", remove_dots(&target)) +} + +/// A path with its `.` and `..` segments taken out (RFC 3986 §5.2.4), its query kept as it is. +fn remove_dots(target: &str) -> String { + let (path, query) = match target.find(['?', '#']) { + Some(at) => target.split_at(at), + None => (target, ""), + }; + let mut out: Vec<&str> = Vec::new(); + let segments: Vec<&str> = path.split('/').skip(1).collect(); + let last = segments.len().saturating_sub(1); + for (n, segment) in segments.iter().enumerate() { + match *segment { + "." => { + if n == last { + out.push(""); + } + } + ".." => { + out.pop(); + if n == last { + out.push(""); + } + } + other => out.push(other), + } + } + format!("/{}{query}", out.join("/")) +} + +/// Read an identity provider's description of itself, fetched for `issuer` (as typed). +pub fn read(issuer: &str, body: &[u8]) -> Result { + let bad = |why: mailcraft_i18n::Text| NetError::Config(why); + if body.len() > http::MAX_BODY { + return Err(bad(said!("the identity provider's description is too long"))); + } + let not_json = || bad(said!("the identity provider's description isn't the JSON it should be")); + let json: Value = serde_json::from_slice(body).map_err(|_| not_json())?; + let object = json.as_object().ok_or_else(not_json)?; + let text = |name: &str| object.get(name).and_then(Value::as_str).map(str::trim).unwrap_or(""); + let list = |name: &str| -> Vec { + let entries = object.get(name).and_then(Value::as_array).map(Vec::as_slice).unwrap_or_default(); + entries + .iter() + .take(MAX_LIST) + .filter_map(Value::as_str) + .filter(|entry| entry.len() <= MAX_ENTRY && entry.bytes().all(|b| b.is_ascii_graphic())) + .map(str::to_string) + .collect() + }; + let issuer = issuer.trim(); + if text("issuer") != issuer { + return Err(NetError::Config(said!( + "the identity provider's description names another issuer than the address entered: check the address, character for character" + ))); + } + let address = |name: &str, what: Arg, needed: bool| -> Result { + let value = text(name); + if value.is_empty() { + return if needed { Err(bad(said!("the identity provider's description has no {what} address", what))) } else { Ok(String::new()) }; + } + mailcraft_model::oauth::endpoint(value).map_err(|why| { + let why = why.trim_start_matches("is ").trim_start_matches("must ").to_string(); + bad(said!("the identity provider's description gives a {what} address that {why}", what, why)) + })?; + Ok(value.to_string()) + }; + let authorize = address("authorization_endpoint", Arg::words("sign-in"), true)?; + let token = address("token_endpoint", Arg::words("token"), true)?; + let revoke = address("revocation_endpoint", Arg::words("revocation"), false)?; + let methods = list("code_challenge_methods_supported"); + if object.contains_key("code_challenge_methods_supported") && !methods.iter().any(|m| m == "S256") { + return Err(bad(said!("the identity provider's description says it doesn't take the protected sign-in (PKCE with S256) MailCraft uses"))); + } + let grants = list("grant_types_supported"); + if !grants.is_empty() && !grants.iter().any(|g| g == "authorization_code") { + return Err(bad(said!("the identity provider's description says it doesn't sign people in on its page (authorization code)"))); + } + let client_auth = client_auth_of(&list("token_endpoint_auth_methods_supported")); + let issuer_in_response = object.get("authorization_response_iss_parameter_supported").and_then(Value::as_bool).unwrap_or(false); + let home = host_of(issuer); + let home = mailcraft_model::sender_warnings::registrable(&home).to_string(); + let mut outside: Vec = Vec::new(); + for found in [&authorize, &token, &revoke].into_iter().filter(|a| !a.is_empty()) { + let host = host_of(found); + if !mailcraft_model::is_within(&host, &home) && !outside.contains(&host) { + outside.push(host); + } + } + Ok(Discovered { + issuer: issuer.to_string(), + authorize, + token, + revoke, + scopes_supported: list("scopes_supported"), + outside, + client_auth, + issuer_in_response, + }) +} + +/// How a client secret goes to a provider that lists these ways of taking one +/// (`token_endpoint_auth_methods_supported`): in the header, which every provider must take +/// (RFC 6749 §2.3.1) and which one that lists nothing takes (RFC 8414 §2), unless it lists the +/// form and not the header. (Its revocation address takes what its token address takes: a +/// provider that lists other ways there is rare enough not to be asked about.) +pub(crate) fn client_auth_of(methods: &[String]) -> ClientAuth { + let lists = |method: &str| methods.iter().any(|m| m == method); + if lists("client_secret_post") && !lists("client_secret_basic") { ClientAuth::Post } else { ClientAuth::Basic } +} + +/// The host of an address, lower-cased. +fn host_of(address: &str) -> String { + Url::parse(address).map(|url| url.host.to_ascii_lowercase()).unwrap_or_default() +} diff --git a/crates/net/src/oauth/discovery_tests.rs b/crates/net/src/oauth/discovery_tests.rs new file mode 100644 index 0000000000..4aca21a469 --- /dev/null +++ b/crates/net/src/oauth/discovery_tests.rs @@ -0,0 +1,326 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! Finding an identity provider's addresses from its issuer, against synthetic documents. + +use std::time::Duration; + +use proptest::prelude::*; + +use mailcraft_model::ClientAuth; + +use super::discovery::{absolute, addresses, ask_public, client_auth_of, discover, may_redirect, next_hop, read}; +use crate::NetError; +use crate::fake::{FakeHttp, json_answer}; + +const ISSUER: &str = "https://id.example.org/realms/mail"; + +/// What a Keycloak-shaped provider says of itself. +fn keycloak(issuer: &str) -> String { + serde_json::json!({ + "issuer": issuer, + "authorization_endpoint": format!("{issuer}/protocol/openid-connect/auth"), + "token_endpoint": format!("{issuer}/protocol/openid-connect/token"), + "revocation_endpoint": format!("{issuer}/protocol/openid-connect/revoke"), + "userinfo_endpoint": format!("{issuer}/protocol/openid-connect/userinfo"), + "jwks_uri": format!("{issuer}/protocol/openid-connect/certs"), + "grant_types_supported": ["authorization_code", "refresh_token", "password"], + "code_challenge_methods_supported": ["plain", "S256"], + "scopes_supported": ["openid", "email", "profile", "offline_access"], + "token_endpoint_auth_methods_supported": ["private_key_jwt", "client_secret_basic", "client_secret_post"], + }) + .to_string() +} + +fn error(result: Result) -> String { + match result { + Err(NetError::Config(why)) => why.to_string(), + other => panic!("expected the description to be refused, got {other:?}"), + } +} + +#[test] +fn a_keycloak_shaped_description_gives_the_addresses() { + let found = read(ISSUER, keycloak(ISSUER).as_bytes()).unwrap(); + assert_eq!(found.authorize, format!("{ISSUER}/protocol/openid-connect/auth")); + assert_eq!(found.token, format!("{ISSUER}/protocol/openid-connect/token")); + assert_eq!(found.revoke, format!("{ISSUER}/protocol/openid-connect/revoke")); + assert!(found.outside.is_empty() && !found.lacks_offline_access()); + // It lists both: the header, which every provider takes (RFC 6749 §2.3.1). + assert_eq!(found.client_auth, ClientAuth::Basic); + assert!(!found.issuer_in_response); +} + +#[test] +fn an_authentik_shaped_one_with_its_token_on_another_host_says_so() { + let issuer = "https://auth.example.org/application/o/mail/"; + let doc = serde_json::json!({ + "issuer": issuer, + "authorization_endpoint": "https://auth.example.org/application/o/authorize/", + "token_endpoint": "https://tokens.example.net/application/o/token/", + "scopes_supported": ["openid", "email"], + "token_endpoint_auth_methods_supported": ["client_secret_basic"], + }); + let found = read(issuer, doc.to_string().as_bytes()).unwrap(); + assert_eq!(found.outside, ["tokens.example.net"]); + // It lists its scopes, and offline_access isn't one: no refresh tokens. + assert!(found.lacks_offline_access()); + assert_eq!(found.client_auth, ClientAuth::Basic); + assert!(found.revoke.is_empty()); +} + +#[test] +fn a_description_naming_another_issuer_is_refused() { + for typed in [ + "https://id.example.org/realms/other", + "https://id.example.org/realms/mail/", + "https://ID.example.org/realms/mail", + " https://evil.example/realms/mail", + ] { + let why = error(read(typed, keycloak(ISSUER).as_bytes())); + assert!(why.contains("another issuer"), "{typed}: {why}"); + } +} + +#[test] +fn addresses_that_cant_be_used_are_refused() { + for (field, value) in [ + ("token_endpoint", "http://id.example.org/token"), + ("authorization_endpoint", "javascript:alert(1)"), + ("token_endpoint", "https://user:pw@id.example.org/token"), + ("token_endpoint", "https://id.example.org/token#frag"), + ("authorization_endpoint", ""), + ("revocation_endpoint", "ftp://id.example.org/revoke"), + ] { + let mut doc: serde_json::Value = serde_json::from_str(&keycloak(ISSUER)).unwrap(); + doc[field] = serde_json::json!(value); + assert!(read(ISSUER, doc.to_string().as_bytes()).is_err(), "{field}={value}"); + } + // A token address that isn't text at all is no address. + let mut doc: serde_json::Value = serde_json::from_str(&keycloak(ISSUER)).unwrap(); + doc["token_endpoint"] = serde_json::json!({"deep": [1, 2]}); + assert!(read(ISSUER, doc.to_string().as_bytes()).is_err()); +} + +#[test] +fn a_provider_without_s256_or_the_code_grant_is_refused_and_one_that_doesnt_say_is_not() { + let mut doc: serde_json::Value = serde_json::from_str(&keycloak(ISSUER)).unwrap(); + doc["code_challenge_methods_supported"] = serde_json::json!(["plain"]); + assert!(error(read(ISSUER, doc.to_string().as_bytes())).contains("PKCE")); + doc["code_challenge_methods_supported"] = serde_json::json!("S256"); + assert!(read(ISSUER, doc.to_string().as_bytes()).is_err()); + doc.as_object_mut().unwrap().remove("code_challenge_methods_supported"); + assert!(read(ISSUER, doc.to_string().as_bytes()).is_ok()); + doc["grant_types_supported"] = serde_json::json!(["client_credentials"]); + assert!(read(ISSUER, doc.to_string().as_bytes()).is_err()); +} + +#[test] +fn what_isnt_a_description_is_refused_without_panicking() { + for body in [&b""[..], b"null", b"[1,2]", b"{\"issuer\":", b"\xff\xfe{}", b"\"text\""] { + assert!(read(ISSUER, body).is_err(), "{body:?}"); + } + // Deep nesting and huge lists are capped, not followed. + let deep = format!("{}1{}", "[".repeat(5_000), "]".repeat(5_000)); + assert!(read(ISSUER, deep.as_bytes()).is_err()); + let mut doc: serde_json::Value = serde_json::from_str(&keycloak(ISSUER)).unwrap(); + doc["scopes_supported"] = serde_json::json!((0..1_000).map(|n| format!("s{n}")).collect::>()); + let found = read(ISSUER, doc.to_string().as_bytes()).unwrap(); + assert!(found.scopes_supported.len() <= 64); + assert!(read(ISSUER, &vec![b' '; 200_000]).is_err()); +} + +#[test] +fn the_documents_are_looked_for_where_the_two_standards_say() { + assert_eq!( + addresses(ISSUER), + [ + "https://id.example.org/realms/mail/.well-known/openid-configuration".to_string(), + "https://id.example.org/.well-known/oauth-authorization-server/realms/mail".to_string() + ] + ); + assert_eq!( + addresses("https://id.example.org/"), + [ + "https://id.example.org/.well-known/openid-configuration".to_string(), + "https://id.example.org/.well-known/oauth-authorization-server".to_string() + ] + ); +} + +#[test] +fn discovery_fetches_only_the_issuers_document_and_follows_redirects_it_may() { + let issuer_of = |port: u16| format!("http://127.0.0.1:{port}/realms/mail"); + let server = FakeHttp::start(move |n, request| { + let port = request.lines().find_map(|l| l.strip_prefix("Host: 127.0.0.1:")).and_then(|p| p.trim().parse().ok()).unwrap_or(0); + match n { + 0 => b"HTTP/1.1 302 Found\r\nLocation: /moved\r\nContent-Length: 0\r\nConnection: close\r\n\r\n".to_vec(), + _ => json_answer("200 OK", &keycloak(&issuer_of(port))), + } + }); + let found = discover(&issuer_of(server.port)).unwrap(); + assert_eq!(found.token, format!("{}/protocol/openid-connect/token", issuer_of(server.port))); + let first = server.request(0); + assert!(first.starts_with("GET /realms/mail/.well-known/openid-configuration HTTP/1.1"), "{first}"); + assert!(server.request(1).starts_with("GET /moved HTTP/1.1")); + // Nothing of the owner goes along: no address, no client id, no cookie. + for request in [first, server.request(1)] { + assert!(!request.to_ascii_lowercase().contains("cookie") && !request.contains('@') && !request.contains("client"), "{request}"); + } +} + +#[test] +fn the_second_standards_address_is_tried_when_the_first_has_nothing() { + let server = FakeHttp::start(move |n, request| match n { + 0 => json_answer("404 Not Found", "{}"), + _ => { + let port = request.lines().find_map(|l| l.strip_prefix("Host: 127.0.0.1:")).unwrap_or("0").trim().to_string(); + json_answer("200 OK", &keycloak(&format!("http://127.0.0.1:{port}/realms/mail"))) + } + }); + assert!(discover(&server.url("/realms/mail")).is_ok()); + assert!(server.request(1).starts_with("GET /.well-known/oauth-authorization-server/realms/mail HTTP/1.1")); +} + +#[test] +fn a_redirect_to_plain_http_elsewhere_or_round_and_round_is_not_followed() { + let away = + FakeHttp::answering(b"HTTP/1.1 301 Moved\r\nLocation: http://id.example.org/x\r\nContent-Length: 0\r\nConnection: close\r\n\r\n".to_vec()); + assert!(discover(&away.url("/realms/mail")).is_err()); + let round = FakeHttp::answering(b"HTTP/1.1 302 Found\r\nLocation: /again\r\nContent-Length: 0\r\nConnection: close\r\n\r\n".to_vec()); + assert!(discover(&round.url("/realms/mail")).is_err()); + // Four for the first address and four for the second, no more. + assert!(round.asked() <= 8, "{}", round.asked()); +} + +#[test] +fn an_issuer_that_isnt_one_is_refused_before_anything_is_fetched() { + for issuer in ["", "http://id.example.org", "https://id.example.org/?x=1", "https://id.example.org/#f", "id.example.org"] { + assert!(matches!(discover(issuer), Err(NetError::Config(_))), "{issuer:?}"); + } +} + +proptest! { + #[test] + fn reading_any_bytes_never_panics(bytes in proptest::collection::vec(any::(), 0..4_000)) { + let _ = read(ISSUER, &bytes); + } + + #[test] + fn reading_any_json_never_panics(keys in proptest::collection::vec(("[a-z_]{1,30}", ".{0,60}"), 0..20)) { + let mut doc = serde_json::Map::new(); + doc.insert("issuer".into(), serde_json::json!(ISSUER)); + for (key, value) in keys { + doc.insert(key, serde_json::json!(value)); + } + let _ = read(ISSUER, serde_json::Value::Object(doc).to_string().as_bytes()); + } +} + +#[test] +fn the_secret_goes_in_the_form_only_when_the_provider_lists_that_and_not_the_header() { + let list = |methods: &[&str]| methods.iter().map(|m| m.to_string()).collect::>(); + // RFC 8414 §2: a provider that lists nothing takes client_secret_basic. + assert_eq!(client_auth_of(&[]), ClientAuth::Basic); + assert_eq!(client_auth_of(&list(&["client_secret_basic", "client_secret_post"])), ClientAuth::Basic); + assert_eq!(client_auth_of(&list(&["client_secret_post"])), ClientAuth::Post); + assert_eq!(client_auth_of(&list(&["private_key_jwt", "client_secret_post", "none"])), ClientAuth::Post); + assert_eq!(client_auth_of(&list(&["private_key_jwt", "none"])), ClientAuth::Basic); + let mut doc: serde_json::Value = serde_json::from_str(&keycloak(ISSUER)).unwrap(); + doc["token_endpoint_auth_methods_supported"] = serde_json::json!(["client_secret_post"]); + assert_eq!(read(ISSUER, doc.to_string().as_bytes()).unwrap().client_auth, ClientAuth::Post); +} + +#[test] +fn a_provider_that_names_itself_in_its_answers_is_noted() { + let mut doc: serde_json::Value = serde_json::from_str(&keycloak(ISSUER)).unwrap(); + doc["authorization_response_iss_parameter_supported"] = serde_json::json!(true); + assert!(read(ISSUER, doc.to_string().as_bytes()).unwrap().issuer_in_response); + // Only a true is a yes. + doc["authorization_response_iss_parameter_supported"] = serde_json::json!("true"); + assert!(!read(ISSUER, doc.to_string().as_bytes()).unwrap().issuer_in_response); +} + +/// A redirect's `Location` is resolved as a URI reference against the document it came from +/// (RFC 3986 §5.2, #1844 review). +#[test] +fn a_redirect_is_resolved_as_a_uri_reference() { + let from = crate::http::Url::parse("https://id.example.org/realms/mail/.well-known/openid-configuration?x=1").unwrap(); + for (location, resolved) in [ + ("https://other.example.org/doc", "https://other.example.org/doc"), + ("/moved", "https://id.example.org/moved"), + ("metadata.json", "https://id.example.org/realms/mail/.well-known/metadata.json"), + ("../up.json", "https://id.example.org/realms/mail/up.json"), + ("./here.json", "https://id.example.org/realms/mail/.well-known/here.json"), + ("//other.example.org/meta", "https://other.example.org/meta"), + ("?y=2", "https://id.example.org/realms/mail/.well-known/openid-configuration?y=2"), + ("/a/../../b", "https://id.example.org/b"), + // A path whose query holds an address is a path, not an address elsewhere. + ("/next?u=https://x.example", "https://id.example.org/next?u=https://x.example"), + ("next?u=https://x.example", "https://id.example.org/realms/mail/.well-known/next?u=https://x.example"), + ("HTTPS://other.example.org/doc", "HTTPS://other.example.org/doc"), + ] { + assert_eq!(absolute(&from, location), resolved, "{location}"); + } +} + +/// Before the owner has agreed to anything, a provider on the network never sends discovery on to +/// this computer, a private network or plain `http`; an issuer on this computer (a test's) may +/// (#1844 review). +#[test] +fn a_redirect_from_the_network_to_this_computer_a_private_network_or_http_is_not_followed() { + let url = |text: &str| crate::http::Url::parse(text).unwrap(); + let from = url("https://id.example.org/.well-known/openid-configuration"); + for next in [ + "https://127.0.0.1/x", + "https://localhost:8443/x", + "https://[::1]/x", + "http://127.0.0.1:8080/x", + "https://10.1.2.3/x", + "https://192.168.1.10/x", + "https://169.254.169.254/latest/meta-data", + ] { + assert!(!may_redirect(&from, &url(next)), "{next}"); + } + assert!(may_redirect(&from, &url("https://login.example.net/.well-known/openid-configuration"))); + let local = url("http://127.0.0.1:9000/realms/mail"); + assert!(may_redirect(&local, &url("http://localhost:9001/x")) && may_redirect(&local, &url("https://id.example.org/x"))); +} + +/// A redirect's address is checked as the issuer's is: outside a test, an `https://` provider on +/// this computer can't send discovery on to plain `http://` there either (#1844 review). +#[test] +fn a_redirect_target_is_checked_as_the_issuer_is() { + let url = |text: &str| crate::http::Url::parse(text).unwrap(); + let first = url("https://127.0.0.1:8443/realms/mail/.well-known/openid-configuration"); + assert!(matches!(next_hop(&first, &first, "http://127.0.0.1:8080/doc", false), Err(NetError::Config(_)))); + assert!(next_hop(&first, &first, "http://127.0.0.1:8080/doc", true).is_ok(), "a test's"); + assert!(next_hop(&first, &first, "https://127.0.0.1:8443/doc", false).is_ok()); + let public = url("https://id.example.org/.well-known/openid-configuration"); + assert!(next_hop(&public, &public, "https://10.1.2.3/doc", true).is_err()); + assert_eq!(next_hop(&public, &public, "/moved", false).unwrap().path, "/moved"); +} + +/// An address only a redirect names is asked the way a picture is: its name is looked up here, and +/// one that leads to this computer or a private network is never connected to (#1844 review). +#[test] +fn an_address_a_redirect_names_is_asked_only_on_the_public_internet() { + let url = |text: &str| crate::http::Url::parse(text).unwrap(); + let server = FakeHttp::start(|_, _| json_answer("200 OK", "{}")); + let at: std::net::SocketAddr = format!("127.0.0.1:{}", server.port).parse().unwrap(); + // A name that leads to a private address, or to this computer, is refused before anything is sent. + let private = |_: &str, _: u16, _: Duration, _: &crate::pictures::Cancel| vec![std::net::SocketAddr::from(([10, 1, 2, 3], 443))]; + let reach = crate::pictures::Reach { lookup: &private, stand_ins: &[], dial: None }; + assert!(matches!(ask_public(&url("https://metadata.example.org/doc"), &reach), Err(NetError::Config(_)))); + let here = move |_: &str, _: u16, _: Duration, _: &crate::pictures::Cancel| vec![at]; + let reach = crate::pictures::Reach { lookup: &here, stand_ins: &[], dial: None }; + assert!(ask_public(&url("https://intranet.example.org/doc"), &reach).is_err()); + assert_eq!(server.asked(), 0); + // One on the public internet (a stand-in for it here) is asked, and nothing of the owner goes along. + let allowed = [at]; + let reach = crate::pictures::Reach { lookup: &here, stand_ins: &allowed, dial: None }; + let got = ask_public(&url(&server.url("/realms/mail/doc")), &reach).unwrap(); + assert_eq!((got.status, got.body.as_slice()), (200, b"{}".as_slice())); + let request = server.request(0); + assert!(request.starts_with("GET /realms/mail/doc HTTP/1.1"), "{request}"); + assert!(!request.to_ascii_lowercase().contains("cookie") && !request.contains('@'), "{request}"); +} diff --git a/crates/net/src/oauth/google_tests.rs b/crates/net/src/oauth/google_tests.rs index a278580c17..d8da9cdb9a 100644 --- a/crates/net/src/oauth/google_tests.rs +++ b/crates/net/src/oauth/google_tests.rs @@ -218,7 +218,8 @@ fn google_refresh_preserves_account_identity_scope_and_expiry() { let old = "synthetic-refresh-one"; let refreshed = refresh_google_at(&endpoint(&server), &google(), STAND_IN_SECRET, old).unwrap(); assert_eq!((refreshed.access.as_str(), refreshed.refresh.as_str()), ("next-access", old)); - assert!(!refreshed.fresh(mailcraft_time::now())); + // Said to last no time at all: a minute, used as it comes rather than renewed in a loop. + assert!(refreshed.expires_at - refreshed.issued_at >= 60); let sent = form(&server, 0); assert_eq!(sent["grant_type"], "refresh_token"); assert_eq!(sent["client_secret"], STAND_IN_SECRET); diff --git a/crates/net/src/oauth/tests.rs b/crates/net/src/oauth/tests.rs index afea27747c..d3b1e82da5 100644 --- a/crates/net/src/oauth/tests.rs +++ b/crates/net/src/oauth/tests.rs @@ -1326,7 +1326,7 @@ fn how_long_a_token_lasts() { }; assert_eq!( lasting(r#","expires_in":3599"#), - Tokens { access: "acc-ess".into(), refresh: "kept".into(), expires_at: 4_599, ..Default::default() } + Tokens { access: "acc-ess".into(), refresh: "kept".into(), expires_at: 4_599, issued_at: 1_000, ..Default::default() } ); assert_eq!(lasting(r#","expires_in":" 3600 ""#).expires_at, 4_600); assert_eq!(lasting(r#","expires_in":90.9"#).expires_at, 1_090); @@ -1334,10 +1334,16 @@ fn how_long_a_token_lasts() { for unsaid in ["", r#","expires_in":null"#, r#","expires_in":"soon""#, r#","expires_in":[3600]"#] { assert_eq!(lasting(unsaid).expires_at, 1_000 + DEFAULT_LIFETIME, "{unsaid}"); } - // Already over, and longer than any token lasts. + // Said to have no life at all: a minute, so that it is used as it comes rather than renewed + // again and again before anything is done with it. A short life it does have is the life it + // has, never more (#1844 review). for over in [r#","expires_in":0"#, r#","expires_in":-5"#, r#","expires_in":"-99999999999999""#, r#","expires_in":-1e300"#] { - assert_eq!(lasting(over).expires_at, 1_000, "{over}"); + assert_eq!(lasting(over).expires_at, 1_000 + MIN_LIFETIME, "{over}"); + assert!(lasting(over).fresh(1_000), "used as it comes: {over}"); } + let short = lasting(r#","expires_in":30"#); + assert_eq!(short.expires_at, 1_030); + assert!(short.fresh(1_000) && !short.fresh(1_030), "fresh as it comes, never past its end"); for forever in [r#","expires_in":99999999999"#, r#","expires_in":1e300"#, r#","expires_in":18446744073709551615"#] { assert_eq!(lasting(forever).expires_at, 1_000 + MAX_LIFETIME, "{forever}"); } diff --git a/crates/net/src/send.rs b/crates/net/src/send.rs index 6ff92e4d50..7d0bfcdcfe 100644 --- a/crates/net/src/send.rs +++ b/crates/net/src/send.rs @@ -111,7 +111,13 @@ pub(crate) fn open_smtp_with<'a>( smtp = Smtp::resume(transport::upgrade(plain, &host)?); offered = smtp.hello(CLIENT_NAME)?; } - if account.oauth.is_some() { + if let Some(oauth) = account.oauth.as_ref().filter(|o| o.provider == mailcraft_model::OAuthProvider::Custom) { + // An own identity provider's token, the way the server and the settings say. + match crate::sync::token_mechanism(oauth.mechanism, offered.auth_oauthbearer, offered.auth_xoauth2)? { + mailcraft_model::SaslChoice::XOAuth2 => smtp.auth_xoauth2(user, secret)?, + _ => smtp.auth_oauthbearer(user, server.host.trim(), server.port, secret)?, + } + } else if account.oauth.is_some() { // A server that doesn't take tokens is an error, not a reason to go on unsigned. smtp.auth_xoauth2(user, secret)?; } else if !account.outgoing_without_sign_in && !user.is_empty() && !secret.is_empty() && (offered.auth_plain || offered.auth_login) { diff --git a/crates/net/src/sync.rs b/crates/net/src/sync.rs index 13eab06f50..3f9d2fae74 100644 --- a/crates/net/src/sync.rs +++ b/crates/net/src/sync.rs @@ -22,7 +22,7 @@ use mailcraft_model::sync::{ FolderDelta, FolderState, GmailLabels, GmailSorted, MAX_GMAIL_MOVES, MAX_TRIES, RemoteFlags, RemoteOp, SyncPhase, SyncRequest, SyncResult, SyncStage, SyncStep, }; -use mailcraft_model::{Account, Body, FlagStatus, FolderKind, GmailCategory, Id, Message, OAuthProvider, Security, Server}; +use mailcraft_model::{Account, Body, FlagStatus, FolderKind, GmailCategory, Id, Message, OAuthProvider, SaslChoice, Security, Server}; use mailcraft_proto::ProtoError; use mailcraft_proto::imap::{Fetched, FolderStatus, Imap, Mailbox, uid_sets}; use mailcraft_time::{Date, DateTime, Timestamp}; @@ -436,9 +436,31 @@ pub fn token_may_go_to(account: &Account, server: &Server, google_host: &str) -> } Err(NetError::Config(said!("a Microsoft sign-in is only used with Microsoft's own mail servers: this account names another server"))) } + Some(OAuthProvider::Custom) => own_provider_destination(account, &server.host), } } +/// Where a token from the owner's own identity provider may go: the account's own IMAP and SMTP +/// servers, and never Microsoft's or Google's (they have providers of their own), nor this +/// computer outside a test. +fn own_provider_destination(account: &Account, host: &str) -> Result<(), NetError> { + let host = host.trim().trim_end_matches('.').to_ascii_lowercase(); + let named = |server: Option<&Server>| server.is_some_and(|s| s.host.trim().trim_end_matches('.').eq_ignore_ascii_case(&host)); + if host.is_empty() || !(named(account.incoming.as_ref()) || named(account.outgoing.as_ref())) { + return Err(NetError::Config(said!("a sign-in with your identity provider is only used with this account's own mail servers"))); + } + // (Microsoft's mail hosts in every one of its clouds, office365.us and .cn among them, #1844 + // review.) + // (The same check refuses such an account's settings in `account.edit`.) + if mailcraft_model::is_microsoft_or_google_host(&host) { + return Err(NetError::Config(said!("a sign-in with your identity provider is never sent to Microsoft's or Google's mail servers"))); + } + if crate::transport::is_loopback(&host) && !microsoft_loopback_allowed() { + return Err(NetError::Config(said!("a sign-in with your identity provider is only sent to a mail server on this computer in a test"))); + } + Ok(()) +} + /// Whether a fake server on this computer may stand in for Microsoft's mail servers: in this /// crate's own tests, and in the tests of the crates on it that ask for it on their thread /// (`graph::standin::allow_loopback_tokens`, built with the `stand-in` feature alone). @@ -523,14 +545,44 @@ pub(crate) fn open_imap_with<'a>( if imap.is_authenticated() { return Ok(imap); } - if account.oauth.is_some() { - imap.authenticate_xoauth2(user, secret)?; - } else { - imap.authenticate_password(user, secret)?; + match account.oauth.as_ref() { + Some(oauth) if oauth.provider == OAuthProvider::Custom => { + // What the server takes is known once it has said what it can do. + if !imap.offers_mechanism("OAUTHBEARER") && !imap.offers_mechanism("XOAUTH2") { + imap.capabilities()?; + } + let (bearer, xoauth2) = (imap.offers_mechanism("OAUTHBEARER"), imap.offers_mechanism("XOAUTH2")); + match token_mechanism(oauth.mechanism, bearer, xoauth2)? { + SaslChoice::XOAuth2 => imap.authenticate_xoauth2(user, secret)?, + _ => imap.authenticate_oauthbearer(user, server.host.trim(), server.port, secret)?, + } + } + Some(_) => imap.authenticate_xoauth2(user, secret)?, + None => imap.authenticate_password(user, secret)?, } Ok(imap) } +/// How a token from an own identity provider is given to a server that offers OAUTHBEARER +/// (`bearer`) and XOAUTH2 (`xoauth2`) as it does: the account's choice, when the server offers +/// it; by itself, OAUTHBEARER first. A server that offers neither (or not the one chosen) is +/// never shown the token. +pub(crate) fn token_mechanism(choice: SaslChoice, bearer: bool, xoauth2: bool) -> Result { + match (choice, bearer, xoauth2) { + (SaslChoice::OAuthBearer | SaslChoice::Auto, true, _) => Ok(SaslChoice::OAuthBearer), + (SaslChoice::XOAuth2 | SaslChoice::Auto, _, true) => Ok(SaslChoice::XOAuth2), + (SaslChoice::OAuthBearer, false, _) => Err(NetError::Proto(ProtoError::Auth(said!( + "the server doesn't take a token with OAUTHBEARER, which this account's OAuth settings ask for" + )))), + (SaslChoice::XOAuth2, _, false) => { + Err(NetError::Proto(ProtoError::Auth(said!("the server doesn't take a token with XOAUTH2, which this account's OAuth settings ask for")))) + } + (SaslChoice::Auto, false, false) => Err(NetError::Proto(ProtoError::Auth(said!( + "the server offers no way to sign in with an access token (neither OAUTHBEARER nor XOAUTH2)" + )))), + } +} + /// What Exchange calls, in English, the folders of a mailbox that are no folders of mail to /// keep: where it has appointments, people, tasks, notes and the journal, mail on its way out, /// and its reports on synchronising with Outlook. diff --git a/crates/net/src/tests.rs b/crates/net/src/tests.rs index fc26e6a461..cc20ef4562 100644 --- a/crates/net/src/tests.rs +++ b/crates/net/src/tests.rs @@ -429,6 +429,7 @@ fn oauth_destinations_cannot_cross_providers_or_protocols() { let expected = match provider { OAuthProvider::Google => "Google OAuth access tokens may only be sent", OAuthProvider::Microsoft => "a Microsoft sign-in is only used", + OAuthProvider::Custom => "a sign-in with your identity provider", }; for error in [test_account(&account, TOKEN).unwrap_err(), send(&account, TOKEN, &hello()).unwrap_err()] { assert!(matches!(&error, NetError::Config(why) if why.to_string().starts_with(expected)), "{provider:?}: {error:?}"); diff --git a/crates/net/tests/token_hosts.rs b/crates/net/tests/token_hosts.rs index 8fceddf28e..76a4472cf8 100644 --- a/crates/net/tests/token_hosts.rs +++ b/crates/net/tests/token_hosts.rs @@ -11,15 +11,16 @@ use mailcraft_model::sync::SyncRequest; use mailcraft_model::{Account, AccountKind, OAuth, OAuthProvider, Security, Server}; use mailcraft_net::token_may_go_to; -/// Every provider. (A new one fails to build here until it has its row.) +/// Every provider with mail servers of its own. (A new one fails to build here until it has its +/// row; an own identity provider has its own test below.) fn providers() -> Vec { - let all = [OAuthProvider::Microsoft, OAuthProvider::Google]; - for provider in all { - match provider { - OAuthProvider::Microsoft | OAuthProvider::Google => {} - } - } - all.to_vec() + let all = [OAuthProvider::Microsoft, OAuthProvider::Google, OAuthProvider::Custom]; + all.into_iter() + .filter(|provider| match provider { + OAuthProvider::Microsoft | OAuthProvider::Google => true, + OAuthProvider::Custom => false, + }) + .collect() } /// The provider's own IMAP and SMTP servers. @@ -27,6 +28,7 @@ fn own_hosts(provider: OAuthProvider) -> [&'static str; 2] { match provider { OAuthProvider::Microsoft => ["outlook.office365.com", "smtp.office365.com"], OAuthProvider::Google => ["imap.gmail.com", "smtp.gmail.com"], + OAuthProvider::Custom => ["mail.example.org", "mail.example.org"], } } @@ -129,3 +131,27 @@ fn a_microsoft_account_at_a_loopback_server_is_refused_before_anything_connects( assert_eq!(listener.accept().map(|_| ()).map_err(|e| e.kind()), Err(std::io::ErrorKind::WouldBlock), "{host}"); } } + +#[test] +fn a_token_from_an_own_identity_provider_goes_to_the_accounts_own_servers_and_nowhere_else() { + // The account's own servers, wherever they are. + for host in ["mail.example.org", "imap.attacker.example", "192.0.2.10"] { + assert_eq!(allowed(OAuthProvider::Custom, host), [true, true], "{host}"); + } + // Never Microsoft's or Google's, whose tokens come from their own providers, nor this computer. + for host in own_hosts(OAuthProvider::Microsoft).into_iter().chain(own_hosts(OAuthProvider::Google)).chain([ + "gmail.googleapis.com", + // Microsoft's other clouds too (#1844 review). + "outlook.office365.us", + "partner.outlook.cn", + "127.0.0.1", + "localhost", + "[::1]", + ]) { + assert_eq!(allowed(OAuthProvider::Custom, host), [false, false], "{host}"); + } + // And never a server the account doesn't name. + let a = account(OAuthProvider::Custom, "mail.example.org"); + let elsewhere = Server { host: "imap.attacker.example".into(), port: 993, security: Security::Tls }; + assert!(token_may_go_to(&a, &elsewhere, "imap.gmail.com").is_err()); +} diff --git a/crates/proto/Cargo.toml b/crates/proto/Cargo.toml index 9cbb9fdfed..293ea8279b 100644 --- a/crates/proto/Cargo.toml +++ b/crates/proto/Cargo.toml @@ -12,6 +12,8 @@ workspace = true mailcraft-charset = { workspace = true } mailcraft-i18n = { workspace = true } log = { workspace = true } +# The reasons a server gives for refusing an OAUTHBEARER sign-in come as JSON (RFC 7628 §3.2.2). +serde_json = { workspace = true } [dev-dependencies] proptest = { workspace = true } \ No newline at end of file diff --git a/crates/proto/src/imap/mod.rs b/crates/proto/src/imap/mod.rs index b6a3d2d1e2..e2d62cc00b 100644 --- a/crates/proto/src/imap/mod.rs +++ b/crates/proto/src/imap/mod.rs @@ -4,7 +4,8 @@ //! mailboxes, and changing flags, moving, copying, removing and filing messages (UID MOVE of //! RFC 6851; UID EXPUNGE and the `COPYUID` answer of RFC 4315). Special-use mailbox flags //! (RFC 6154) come through in [`Mailbox::flags`] as the server wrote them. Password sign-in prefers -//! advertised SASL PLAIN, with LOGIN as a fallback when PLAIN is not offered; OAuth uses XOAUTH2. +//! advertised SASL PLAIN, with LOGIN as a fallback when PLAIN is not offered; OAuth uses +//! OAUTHBEARER (RFC 7628) or XOAUTH2. //! //! There is no plain EXPUNGE and no CLOSE here, on purpose: both remove every message marked //! `\Deleted` in the mailbox, also those another program marked. @@ -31,7 +32,7 @@ use parse::{Piece, Status, StatusLine, Value}; pub use utf7::{decode_utf7, encode_utf7}; use crate::line::Wire; -use crate::{MAX_LINE, MAX_LITERAL, ProtoError, Secrets, for_trace, tidy, xoauth2}; +use crate::{FAILURE_ANSWER, MAX_LINE, MAX_LITERAL, ProtoError, Secrets, for_trace, oauthbearer, tidy, xoauth2}; use mailcraft_i18n::{Arg, Text, said}; /// Most responses the server may send to one command. @@ -132,6 +133,11 @@ pub struct Imap { skipped: bool, /// The tag of the IDLE command the server is waiting in, if it is ([`Imap::idle_begin`]). idle_tag: Option, + /// What followed the `+` of the last go-ahead the server sent, capped: the reasons a token + /// sign-in is refused for come there. + go_ahead: Vec, + /// Why the last token sign-in was refused, when the server said ([`Imap::sasl_failure`]). + sasl_failure: Option, } #[derive(Clone, Debug, Default, PartialEq, Eq)] @@ -689,6 +695,8 @@ impl Imap { skip_long: false, skipped: false, idle_tag: None, + go_ahead: Vec::new(), + sasl_failure: None, } } @@ -795,23 +803,52 @@ impl Imap { /// go-ahead, so one that doesn't know the mechanism refuses without having seen it. pub fn authenticate_xoauth2(&mut self, user: &str, token: &str) -> Result<(), ProtoError> { let payload = xoauth2(user, token)?; + self.authenticate_token("XOAUTH2", token, &payload, "") + } + + /// AUTHENTICATE OAUTHBEARER (RFC 7628): an OAuth access token in place of a password, the + /// standard way. `host` and `port` are the server's, as connected to. NO → `ProtoError::Auth`, + /// with the server's reasons, when it gave them, in [`Imap::sasl_failure`]. + /// + /// As for [`Imap::authenticate_xoauth2`], the token goes with the command only to a server + /// that listed `SASL-IR` and `AUTH=OAUTHBEARER`; any other is asked first. + pub fn authenticate_oauthbearer(&mut self, user: &str, host: &str, port: u16, token: &str) -> Result<(), ProtoError> { + let payload = oauthbearer(user, host, port, token)?; + self.authenticate_token("OAUTHBEARER", token, &payload, FAILURE_ANSWER) + } + + /// Whether the server offers the SASL mechanism `name` (`OAUTHBEARER`, `XOAUTH2`), as far as + /// it has said what it can do. + pub fn offers_mechanism(&self, name: &str) -> bool { + self.offers(&format!("AUTH={}", name.to_ascii_uppercase())) + } + + /// Why the server refused the last token sign-in, when it said in the way RFC 7628 has it. + pub fn sasl_failure(&self) -> Option<&crate::SaslFailure> { + self.sasl_failure.as_ref() + } + + /// A token sign-in with SASL `mechanism`: `payload` (base64) as the client's message, and + /// `failure_answer` for the server's reasons when it refuses. + fn authenticate_token(&mut self, mechanism: &str, token: &str, payload: &str, failure_answer: &str) -> Result<(), ProtoError> { self.secrets.add(token); - self.secrets.add(&payload); - let inline = self.offers("SASL-IR") && self.offers("AUTH=XOAUTH2"); + self.secrets.add(payload); + self.sasl_failure = None; + let inline = self.offers("SASL-IR") && self.offers(&format!("AUTH={mechanism}")); let tag = self.tag(); - log::trace!("C: {tag} AUTHENTICATE XOAUTH2{}", if inline { " ***" } else { "" }); - let mut out = format!("{tag} AUTHENTICATE XOAUTH2"); + log::trace!("C: {tag} AUTHENTICATE {mechanism}{}", if inline { " ***" } else { "" }); + let mut out = format!("{tag} AUTHENTICATE {mechanism}"); if inline { out.push(' '); - out.push_str(&payload); + out.push_str(payload); } out.push_str("\r\n"); self.wire.write(out.as_bytes())?; self.wire.flush()?; // What each `+` from the server is answered with: the token (unless it went with the - // command), an empty line for the reasons a refusal starts with (JSON in base64), and - // for a question after that, the end of the exchange. - let answers = [(payload.as_str(), "***"), ("", ""), ("*", "*")]; + // command), the mechanism's answer to the reasons a refusal starts with (JSON in base64), + // and for a question after that, the end of the exchange. + let answers = [(payload, "***"), (failure_answer, failure_answer), ("*", "*")]; let mut asked = usize::from(inline); let line = loop { if let Some(line) = self.read_until(&tag, true, &mut ignore)? { @@ -820,6 +857,10 @@ impl Imap { let Some((answer, shown)) = answers.get(asked) else { return Err(ProtoError::Protocol(said!("the server asked for more than a sign-in has"))); }; + // (The go-ahead after the token is the server's reasons for saying no.) + if asked == 1 { + self.sasl_failure = crate::SaslFailure::read(&self.go_ahead); + } asked += 1; log::trace!("C: {shown}"); self.wire.write(format!("{answer}\r\n").as_bytes())?; @@ -830,7 +871,10 @@ impl Imap { _ if asked == answers.len() => Err(ProtoError::Auth(said!("the server asked for more than a user name and access token"))), // Nobody is signed in by a token that was never sent. Status::Ok if asked == 0 => Err(ProtoError::Protocol(said!("the server ended the command early"))), - Status::Ok => self.signed_in(&line), + Status::Ok => { + self.sasl_failure = None; + self.signed_in(&line) + } Status::No => Err(ProtoError::Auth(self.refusal(&line))), _ => Err(ProtoError::Rejected(self.refusal(&line))), } @@ -1341,6 +1385,8 @@ impl Imap { log::trace!("S: {}", for_trace(&self.secrets.hide(&String::from_utf8_lossy(&line)))); } if line.first() == Some(&b'+') { + let text = line.get(1..).unwrap_or_default(); + self.go_ahead = text.get(..text.len().min(crate::oauthbearer::MAX_FAILURE.saturating_mul(2))).unwrap_or_default().to_vec(); return Ok(Response::GoAhead); } let Some(rest) = line.strip_prefix(b"* ") else { diff --git a/crates/proto/src/lib.rs b/crates/proto/src/lib.rs index b197845004..16efb758dc 100644 --- a/crates/proto/src/lib.rs +++ b/crates/proto/src/lib.rs @@ -17,7 +17,10 @@ use mailcraft_i18n::{Arg, Text, said}; pub mod imap; mod line; +mod oauthbearer; pub use line::DamagedStream; +pub use oauthbearer::SaslFailure; +pub(crate) use oauthbearer::{FAILURE_ANSWER, oauthbearer}; pub mod smtp; #[cfg(test)] diff --git a/crates/proto/src/oauthbearer.rs b/crates/proto/src/oauthbearer.rs new file mode 100644 index 0000000000..c3b3d1eff3 --- /dev/null +++ b/crates/proto/src/oauthbearer.rs @@ -0,0 +1,122 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! SASL OAUTHBEARER (RFC 7628): an OAuth 2.0 bearer token in place of a password, the standard +//! way, for IMAP (RFC 3501 AUTHENTICATE) and SMTP (RFC 4954 AUTH). +//! +//! What is sent is the GS2 header (RFC 5801) naming the user, then the server's host and port and +//! the token, each after the byte 0x01: `n,a=,^Ahost=^Aport=^Aauth=Bearer +//! ^A^A`. A server that refuses sends its reasons first, as JSON in base64 (§3.2.2); the +//! client answers them with the single byte 0x01 (§3.2.3), and the refusal follows. +//! +//! The reasons are written by the server and read as hostile: capped, three fields only, each +//! short, with no control characters, and none of them ever shown as it came. + +use crate::ProtoError; +use mailcraft_charset::base64::STANDARD; +use mailcraft_i18n::said; + +/// Longest user name and token together. +const MAX_PAYLOAD: usize = 32 * 1024; +/// Longest host name sent. +const MAX_HOST: usize = 255; +/// Longest reasons read, before and after base64. +pub(crate) const MAX_FAILURE: usize = 4 * 1024; +/// Longest value of one of the reasons kept. +const MAX_FIELD: usize = 512; + +/// What a client answers a server's reasons with: the byte 0x01, in base64 (RFC 7628 §3.2.3). +pub(crate) const FAILURE_ANSWER: &str = "AQ=="; + +/// What SASL OAUTHBEARER sends, in base64. `host` and `port` are the server's, as connected to. +/// A name, host or token that would break out of the message or the line it goes on is refused. +pub(crate) fn oauthbearer(user: &str, host: &str, port: u16, token: &str) -> Result { + if token.is_empty() { + return Err(ProtoError::Auth(said!("there is no access token to sign in with"))); + } + let unsendable = |text: &str| text.bytes().any(|b| matches!(b, 0 | 1 | b'\r' | b'\n')); + if unsendable(user) || unsendable(token) || unsendable(host) { + return Err(ProtoError::Auth(said!("the user name or access token has a character that can't be sent"))); + } + // RFC 6750's token characters: what a bearer token is made of, and nothing that ends the field. + if !token.bytes().all(|b| b.is_ascii_alphanumeric() || matches!(b, b'-' | b'.' | b'_' | b'~' | b'+' | b'/' | b'=')) { + return Err(ProtoError::Auth(said!("the user name or access token has a character that can't be sent"))); + } + if host.len() > MAX_HOST || host.bytes().any(|b| b.is_ascii_whitespace() || b.is_ascii_control()) { + return Err(ProtoError::Auth(said!("the mail server's name can't be sent with a sign-in"))); + } + if user.len().saturating_add(token.len()) > MAX_PAYLOAD { + return Err(ProtoError::Auth(said!("the user name or access token is too long to be sent"))); + } + let user = saslname(user); + let host_field = if host.is_empty() { String::new() } else { format!("host={host}\x01") }; + let port_field = if port == 0 { String::new() } else { format!("port={port}\x01") }; + Ok(STANDARD.encode(format!("n,a={user},\x01{host_field}{port_field}auth=Bearer {token}\x01\x01"))) +} + +/// A name as RFC 5801 writes it in the GS2 header: `,` as `=2C` and `=` as `=3D`. +fn saslname(user: &str) -> String { + let mut out = String::with_capacity(user.len()); + for c in user.chars() { + match c { + ',' => out.push_str("=2C"), + '=' => out.push_str("=3D"), + c => out.push(c), + } + } + out +} + +/// Why a server refused an OAUTHBEARER (or XOAUTH2) sign-in, as far as it can be read: the three +/// fields of RFC 7628 §3.2.2, each checked and short. Nothing else of what it sent is kept. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct SaslFailure { + /// `invalid_token`, `insufficient_scope` or another error code of RFC 6750 §3.1: letters, + /// digits and `_` only, else empty. + pub status: String, + /// The scopes the server says are needed: the characters RFC 6749 §3.3 allows, else empty. + pub scope: String, + /// Where the server says its identity provider describes itself: an `https://` address, + /// else empty. Written by the server: never used without the owner's yes. + pub openid_configuration: String, +} + +impl SaslFailure { + /// The reasons in a server's challenge, given as it came (base64 text, with or without the + /// `+ ` or `334 ` before it taken off). `None` when it isn't base64 of a JSON object, or is + /// longer than reasons are. + pub fn read(challenge: &[u8]) -> Option { + if challenge.len() > MAX_FAILURE.saturating_mul(2) { + return None; + } + let text = std::str::from_utf8(challenge).ok()?.trim(); + let bytes = STANDARD.decode(text).ok()?; + if bytes.len() > MAX_FAILURE { + return None; + } + let json: serde_json::Value = serde_json::from_slice(&bytes).ok()?; + let object = json.as_object()?; + let field = |name: &str| object.get(name).and_then(serde_json::Value::as_str).filter(|v| v.len() <= MAX_FIELD).unwrap_or(""); + let status = field("status"); + let status = if !status.is_empty() && status.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'_') { status } else { "" }; + let scope = field("scope"); + let scope_char = |b: u8| b == b' ' || b == 0x21 || (0x23..=0x5B).contains(&b) || (0x5D..=0x7E).contains(&b); + let scope = if scope.bytes().all(scope_char) { scope.trim() } else { "" }; + let config = field("openid-configuration"); + let config = if config.starts_with("https://") && config.bytes().all(|b| b.is_ascii_graphic()) { config } else { "" }; + Some(SaslFailure { status: status.into(), scope: scope.into(), openid_configuration: config.into() }) + } + + /// Whether the server says the token is no good (expired, or revoked): a fresh one may do. + pub fn token_rejected(&self) -> bool { + self.status == "invalid_token" + } + + /// Whether the server says the token doesn't cover mail: a fresh one won't do, a fresh sign-in may. + pub fn scope_missing(&self) -> bool { + self.status == "insufficient_scope" + } +} + +#[cfg(test)] +#[path = "oauthbearer_tests.rs"] +mod oauthbearer_tests; diff --git a/crates/proto/src/oauthbearer_tests.rs b/crates/proto/src/oauthbearer_tests.rs new file mode 100644 index 0000000000..c7a9148fdd --- /dev/null +++ b/crates/proto/src/oauthbearer_tests.rs @@ -0,0 +1,189 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! SASL OAUTHBEARER (RFC 7628) over IMAP and SMTP, against scripted servers. + +use proptest::prelude::*; + +use super::*; +use crate::imap::Imap; +use crate::script::Script; +use crate::smtp::Smtp; + +const TOKEN: &str = "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhbGljZSJ9.c2ln"; + +fn decoded(payload: &str) -> String { + String::from_utf8(STANDARD.decode(payload).unwrap()).unwrap() +} + +/// What goes out for alice at mail.example.org:993. +fn message() -> String { + oauthbearer("alice@example.org", "mail.example.org", 993, TOKEN).unwrap() +} + +/// The reasons a server gives, in base64. +fn reasons(json: &str) -> String { + STANDARD.encode(json) +} + +#[test] +fn the_message_is_the_gs2_header_then_host_port_and_token() { + assert_eq!(decoded(&message()), format!("n,a=alice@example.org,\x01host=mail.example.org\x01port=993\x01auth=Bearer {TOKEN}\x01\x01")); + // A name with a comma or an equals sign is written as RFC 5801 has it. + let odd = oauthbearer("a,b=c", "mail.example.org", 587, TOKEN).unwrap(); + assert!(decoded(&odd).starts_with("n,a=a=2Cb=3Dc,\x01"), "{}", decoded(&odd)); +} + +#[test] +fn what_would_break_out_of_the_message_is_refused() { + for (user, host, token) in [ + ("alice\x01", "mail.example.org", TOKEN), + ("alice", "mail.example.org", "tok\x01en"), + ("alice\r\n", "mail.example.org", TOKEN), + ("alice", "mail.example.org\r\nA2 LOGOUT", TOKEN), + ("alice", "mail example.org", TOKEN), + ("alice", "mail.example.org", "tok en"), + ("alice", "mail.example.org", "tok,en"), + ("alice", "mail.example.org", ""), + ] { + assert!(matches!(oauthbearer(user, host, 993, token), Err(ProtoError::Auth(_))), "{user:?} {host:?} {token:?}"); + } + assert!(oauthbearer("alice", &"h".repeat(300), 993, TOKEN).is_err()); + assert!(oauthbearer("alice", "mail.example.org", 993, &"t".repeat(40_000)).is_err()); +} + +#[test] +fn imap_sends_the_token_with_the_command_when_the_server_takes_it_that_way() { + let mut s = + Script::new("* OK [CAPABILITY IMAP4rev1 SASL-IR AUTH=OAUTHBEARER AUTH=XOAUTH2] ready\r\nA0001 OK [CAPABILITY IMAP4rev1 IDLE] welcome\r\n"); + let mut imap = Imap::connect(&mut s).unwrap(); + assert!(imap.offers_mechanism("oauthbearer") && imap.offers_mechanism("XOAUTH2") && !imap.offers_mechanism("PLAIN")); + imap.authenticate_oauthbearer("alice@example.org", "mail.example.org", 993, TOKEN).unwrap(); + assert!(imap.is_authenticated()); + assert_eq!(s.sent(), format!("A0001 AUTHENTICATE OAUTHBEARER {}\r\n", message())); + assert!(s.finished()); +} + +#[test] +fn imap_waits_for_the_go_ahead_otherwise() { + let mut s = Script::new("* OK [CAPABILITY IMAP4rev1 AUTH=OAUTHBEARER] ready\r\n+ \r\nA0001 OK welcome\r\n"); + let mut imap = Imap::connect(&mut s).unwrap(); + imap.authenticate_oauthbearer("alice@example.org", "mail.example.org", 993, TOKEN).unwrap(); + // (Then what the server can do once signed in is asked for, as after any sign-in.) + assert!(s.sent().starts_with(&format!("A0001 AUTHENTICATE OAUTHBEARER\r\n{}\r\n", message())), "{}", s.sent()); +} + +#[test] +fn imap_answers_the_reasons_with_0x01_and_keeps_them() { + let why = reasons( + r#"{"status":"invalid_token","scope":"openid mail","openid-configuration":"https://id.example.org/.well-known/openid-configuration"}"#, + ); + let mut s = Script::new(format!( + "* OK [CAPABILITY IMAP4rev1 SASL-IR AUTH=OAUTHBEARER] ready\r\n+ {why}\r\nA0001 NO [AUTHENTICATIONFAILED] {TOKEN} expired\r\n" + )); + let mut imap = Imap::connect(&mut s).unwrap(); + let err = imap.authenticate_oauthbearer("alice@example.org", "mail.example.org", 993, TOKEN).unwrap_err(); + assert!(matches!(&err, ProtoError::Auth(_))); + assert!(!format!("{err} {err:?} {imap:?}").contains(TOKEN)); + let failure = imap.sasl_failure().unwrap().clone(); + drop(imap); + assert_eq!(s.sent(), format!("A0001 AUTHENTICATE OAUTHBEARER {}\r\nAQ==\r\n", message())); + assert!(failure.token_rejected() && !failure.scope_missing()); + assert_eq!( + (failure.scope.as_str(), failure.openid_configuration.as_str()), + ("openid mail", "https://id.example.org/.well-known/openid-configuration") + ); +} + +#[test] +fn imap_refused_without_reasons_or_with_a_server_that_keeps_asking() { + let mut s = Script::new("+ \r\nA0001 NO AUTHENTICATE failed.\r\n"); + let mut imap = Imap::resume(&mut s); + assert_eq!(imap.authenticate_oauthbearer("alice", "mail.example.org", 993, TOKEN), Err(ProtoError::Auth("AUTHENTICATE failed.".into()))); + assert!(imap.sasl_failure().is_none()); + // Reasons that can't be read are no reasons; a third question ends the exchange. + let mut s = Script::new("+ \r\n+ !!!not base64\r\n+ again\r\nA0001 NO cancelled\r\n"); + let mut imap = Imap::resume(&mut s); + assert!(matches!(imap.authenticate_oauthbearer("alice", "mail.example.org", 993, TOKEN), Err(ProtoError::Auth(_)))); + assert!(imap.sasl_failure().is_none()); + assert!(s.sent().ends_with("AQ==\r\n*\r\n"), "{}", s.sent()); + // A fourth is more than a sign-in has. + let mut s = Script::new("+ \r\n+ x\r\n+ y\r\n+ z\r\n"); + assert!(matches!(Imap::resume(&mut s).authenticate_oauthbearer("alice", "mail.example.org", 993, TOKEN), Err(ProtoError::Protocol(_)))); +} + +#[test] +fn smtp_sees_the_offer_and_signs_in() { + let mut s = Script::new("250-mail.example.org\r\n250 AUTH PLAIN OAUTHBEARER\r\n334 \r\n235 2.7.0 ok\r\n"); + let mut smtp = Smtp::resume(&mut s); + let ext = smtp.hello("localhost").unwrap(); + assert!(ext.auth_oauthbearer && !ext.auth_xoauth2); + smtp.auth_oauthbearer("alice@example.org", "mail.example.org", 587, TOKEN).unwrap(); + let sent = s.sent(); + let lines: Vec<&str> = sent.lines().collect(); + let payload = + lines.iter().find_map(|l| l.strip_prefix("AUTH OAUTHBEARER ")).map(str::to_string).or_else(|| lines.get(2).map(|l| l.to_string())).unwrap(); + assert!(decoded(&payload).contains("host=mail.example.org\x01port=587\x01auth=Bearer ")); +} + +#[test] +fn smtp_answers_the_reasons_with_0x01_then_takes_the_refusal() { + let why = reasons(r#"{"status":"insufficient_scope","scope":"mail"}"#); + let mut s = Script::new(format!("250-x\r\n250 AUTH OAUTHBEARER\r\n334 {why}\r\n535 5.7.8 no {TOKEN}\r\n")); + let mut smtp = Smtp::resume(&mut s); + smtp.hello("localhost").unwrap(); + let err = smtp.auth_oauthbearer("alice@example.org", "mail.example.org", 587, TOKEN).unwrap_err(); + assert!(matches!(&err, ProtoError::Auth(_))); + assert!(!format!("{err} {err:?}").contains(TOKEN)); + let failure = smtp.sasl_failure().unwrap().clone(); + drop(smtp); + assert!(s.sent().ends_with("AQ==\r\n"), "{}", s.sent()); + assert!(failure.scope_missing()); + assert_eq!(failure.scope, "mail"); +} + +#[test] +fn smtp_never_shows_the_token_to_a_server_that_doesnt_offer_it() { + let mut s = Script::new("250-x\r\n250 AUTH PLAIN XOAUTH2\r\n"); + let mut smtp = Smtp::resume(&mut s); + smtp.hello("localhost").unwrap(); + assert!(matches!(smtp.auth_oauthbearer("alice", "mail.example.org", 587, TOKEN), Err(ProtoError::Auth(_)))); + assert!(!s.sent().contains("AUTH")); +} + +#[test] +fn reasons_are_read_as_hostile() { + let read = |json: &str| SaslFailure::read(reasons(json).as_bytes()); + // Only what each field may be is kept. + let odd = read(r#"{"status":"invalid token\r\n","scope":"a\"b","openid-configuration":"http://id.example.org/","extra":"x"}"#).unwrap(); + assert_eq!(odd, SaslFailure::default()); + let odd = read(r#"{"status":7,"scope":["mail"],"openid-configuration":"https://id.example.org/a b"}"#).unwrap(); + assert_eq!(odd, SaslFailure::default()); + // Not JSON, not an object, not base64, too long: nothing. + assert!(read("[1,2]").is_none() && read("not json").is_none()); + assert!(SaslFailure::read(b"%%%").is_none()); + assert!(SaslFailure::read(reasons(&format!(r#"{{"status":"{}"}}"#, "a".repeat(5_000))).as_bytes()).is_none()); + // A field longer than any is dropped, the others kept. + let long = read(&format!(r#"{{"status":"invalid_token","scope":"{}"}}"#, "s".repeat(600))).unwrap(); + assert_eq!((long.status.as_str(), long.scope.as_str()), ("invalid_token", "")); +} + +proptest! { + #[test] + fn the_message_never_breaks_a_line_and_carries_what_it_was_given(user in "[ -~]{0,40}", host in "[a-z0-9.-]{0,40}", port in any::(), token in "[A-Za-z0-9._~+/-]{1,80}") { + if let Ok(payload) = oauthbearer(&user, &host, port, &token) { + prop_assert!(!payload.contains(['\r', '\n', '\0'])); + let text = decoded(&payload); + let header = text.split('\x01').next().unwrap(); + let name = header.strip_prefix("n,a=").and_then(|rest| rest.strip_suffix(',')).unwrap(); + prop_assert_eq!(name.replace("=2C", ",").replace("=3D", "="), user); + let auth = format!("auth=Bearer {token}"); + prop_assert!(text.split('\x01').any(|field| field == auth)); + } + } + + #[test] + fn reading_reasons_never_panics(bytes in proptest::collection::vec(any::(), 0..2_000)) { + let _ = SaslFailure::read(&bytes); + let _ = SaslFailure::read(STANDARD.encode(&bytes).as_bytes()); + } +} diff --git a/crates/proto/src/smtp.rs b/crates/proto/src/smtp.rs index 0f33a63f12..cacc3e2ef4 100644 --- a/crates/proto/src/smtp.rs +++ b/crates/proto/src/smtp.rs @@ -1,13 +1,14 @@ // SPDX-FileCopyrightText: MailCraft contributors // SPDX-License-Identifier: MIT OR Apache-2.0 -//! An SMTP client (RFC 5321) with STARTTLS (RFC 3207) and AUTH PLAIN / LOGIN / XOAUTH2 (RFC 4954). +//! An SMTP client (RFC 5321) with STARTTLS (RFC 3207) and AUTH PLAIN / LOGIN / XOAUTH2 / +//! OAUTHBEARER (RFC 4954, RFC 7628). use std::io::{Read, Write}; use mailcraft_charset::base64::STANDARD; use crate::line::Wire; -use crate::{ProtoError, Secrets, for_trace, tidy, xoauth2}; +use crate::{FAILURE_ANSWER, ProtoError, SaslFailure, Secrets, for_trace, oauthbearer, tidy, xoauth2}; use mailcraft_i18n::{Arg, Text, said}; /// Most lines one reply may have. @@ -24,6 +25,8 @@ pub struct Smtp { wire: Wire, ext: Extensions, secrets: Secrets, + /// Why the last token sign-in was refused, when the server said ([`Smtp::sasl_failure`]). + sasl_failure: Option, } /// What the server offered in its answer to EHLO. @@ -34,6 +37,8 @@ pub struct Extensions { pub auth_login: bool, /// The server takes an OAuth access token instead of a password (SASL XOAUTH2). pub auth_xoauth2: bool, + /// The server takes an OAuth access token the standard way (SASL OAUTHBEARER, RFC 7628). + pub auth_oauthbearer: bool, /// The largest message the server takes; `Some(0)` when it names no limit. pub size: Option, pub eight_bit_mime: bool, @@ -73,7 +78,7 @@ impl Smtp { /// Continue on a stream that already greeted (after the caller wrapped it in TLS). pub fn resume(stream: S) -> Self { - Smtp { wire: Wire::new(stream), ext: Extensions::default(), secrets: Secrets::default() } + Smtp { wire: Wire::new(stream), ext: Extensions::default(), secrets: Secrets::default(), sasl_failure: None } } /// What the last [`hello`](Self::hello) learned. @@ -164,30 +169,57 @@ impl Smtp { /// it isn't shown the token. 535 and friends → `ProtoError::Auth`. pub fn auth_xoauth2(&mut self, user: &str, token: &str) -> Result<(), ProtoError> { let payload = xoauth2(user, token)?; - if !self.ext.auth_xoauth2 { + let offered = self.ext.auth_xoauth2; + self.auth_token("XOAUTH2", offered, token, &payload, "") + } + + /// AUTH OAUTHBEARER (RFC 7628): an OAuth access token in place of a password, the standard + /// way. `host` and `port` are the server's, as connected to. A server that doesn't offer it + /// isn't shown the token. 535 and friends → `ProtoError::Auth`, with the server's reasons, + /// when it gave them, in [`Smtp::sasl_failure`]. + pub fn auth_oauthbearer(&mut self, user: &str, host: &str, port: u16, token: &str) -> Result<(), ProtoError> { + let payload = oauthbearer(user, host, port, token)?; + let offered = self.ext.auth_oauthbearer; + self.auth_token("OAUTHBEARER", offered, token, &payload, FAILURE_ANSWER) + } + + /// Why the server refused the last token sign-in, when it said in the way RFC 7628 has it. + pub fn sasl_failure(&self) -> Option<&SaslFailure> { + self.sasl_failure.as_ref() + } + + /// A token sign-in with SASL `mechanism`: `payload` (base64) as the client's message, and + /// `failure_answer` for the server's reasons when it refuses. + fn auth_token(&mut self, mechanism: &str, offered: bool, token: &str, payload: &str, failure_answer: &str) -> Result<(), ProtoError> { + self.sasl_failure = None; + if !offered { return Err(ProtoError::Auth(said!("the server offers no way to sign in with an access token"))); } self.secrets.add(token); - self.secrets.add(&payload); - let line = format!("AUTH XOAUTH2 {payload}"); + self.secrets.add(payload); + let line = format!("AUTH {mechanism} {payload}"); let reply = if line.len() <= MAX_COMMAND { - self.secret_command(&line, "AUTH XOAUTH2 ***")? + self.secret_command(&line, &format!("AUTH {mechanism} ***"))? } else { // Too long for one line, as tokens mostly are: wait for the server to ask (RFC 4954 §4). - let ask = self.command("AUTH XOAUTH2")?; + let ask = self.command(&format!("AUTH {mechanism}"))?; if ask.code != 334 { return Err(self.sign_in_failed(&ask)); } - self.secret_command(&payload, "***")? + self.secret_command(payload, "***")? }; match reply.code { 235 => Ok(()), 334 => { - // A refusal comes in two parts: the reasons (JSON in base64), and, once an empty - // line has acknowledged them, the verdict. - let verdict = self.command("")?; + // A refusal comes in two parts: the reasons (JSON in base64), and, once they + // have been answered as the mechanism has it, the verdict. + self.sasl_failure = reply.lines.first().and_then(|reasons| SaslFailure::read(reasons.as_bytes())); + let verdict = self.command(failure_answer)?; match verdict.code { - 235 => Ok(()), + 235 => { + self.sasl_failure = None; + Ok(()) + } 334 => { let _ = self.command("*"); Err(ProtoError::Auth(said!("the server asked for more than a user name and access token"))) @@ -353,6 +385,7 @@ fn extensions(lines: &[String]) -> Extensions { "PLAIN" => ext.auth_plain = true, "LOGIN" => ext.auth_login = true, "XOAUTH2" => ext.auth_xoauth2 = true, + "OAUTHBEARER" => ext.auth_oauthbearer = true, _ => {} } } diff --git a/crates/proto/src/smtp/tests.rs b/crates/proto/src/smtp/tests.rs index 9d5d361fd6..7bf79f7768 100644 --- a/crates/proto/src/smtp/tests.rs +++ b/crates/proto/src/smtp/tests.rs @@ -26,7 +26,15 @@ fn a_whole_session() { let ext = smtp.hello("[127.0.0.1]").unwrap(); assert_eq!( ext, - Extensions { starttls: true, auth_plain: true, auth_login: true, auth_xoauth2: true, size: Some(35_882_577), eight_bit_mime: true } + Extensions { + starttls: true, + auth_plain: true, + auth_login: true, + auth_xoauth2: true, + auth_oauthbearer: false, + size: Some(35_882_577), + eight_bit_mime: true + } ); assert_eq!(smtp.extensions(), &ext); smtp.auth("ada@example.org", "hunter2").unwrap(); @@ -263,10 +271,21 @@ fn a_client_name_that_could_break_the_line_is_replaced() { fn extensions_are_read_whatever_their_case() { let mut s = Script::new("250-x\r\n250-starttls\r\n250-Size\r\n250-auth plain\r\n250 8bitmime\r\n"); let ext = Smtp::resume(&mut s).hello("localhost").unwrap(); - assert_eq!(ext, Extensions { starttls: true, auth_plain: true, auth_login: false, auth_xoauth2: false, size: Some(0), eight_bit_mime: true }); + assert_eq!( + ext, + Extensions { + starttls: true, + auth_plain: true, + auth_login: false, + auth_xoauth2: false, + auth_oauthbearer: false, + size: Some(0), + eight_bit_mime: true + } + ); let mut s = Script::new("250-x\r\n250 auth=login xoauth2 OAUTHBEARER\r\n"); let ext = Smtp::resume(&mut s).hello("localhost").unwrap(); - assert_eq!(ext, Extensions { auth_login: true, auth_xoauth2: true, ..Default::default() }); + assert_eq!(ext, Extensions { auth_login: true, auth_xoauth2: true, auth_oauthbearer: true, ..Default::default() }); } #[test] diff --git a/crates/ui-egui/src/account_setup.rs b/crates/ui-egui/src/account_setup.rs index e15d7b35a4..2e6542b592 100644 --- a/crates/ui-egui/src/account_setup.rs +++ b/crates/ui-egui/src/account_setup.rs @@ -21,6 +21,7 @@ mod exchange; mod help; +mod oauth_settings; mod senders; use std::sync::mpsc::{Receiver, TryRecvError}; @@ -217,6 +218,10 @@ pub enum Action { Imap, /// Ask the domain's DNS again where its Autodiscover is (Search again). LookAgain, + /// Sign in with an own identity provider (OAuth 2.0) instead of a password. + OwnProvider, + /// Sign in with a password after all. + PasswordInstead, } /// How setting the account up ended, for the last page to say. @@ -381,6 +386,8 @@ pub struct Preset { guessed: (bool, bool), /// Where each of the two servers came from, the incoming first; `None` for a guess. sources: (Option, Option), + /// The identity provider the domain's document names for an OAuth 2.0 sign-in; empty for none. + oauth_issuer: String, } impl Preset { @@ -404,6 +411,7 @@ impl Preset { found, guessed: if found.is_some() { (sources.0.is_none(), sources.1.is_none()) } else { (false, false) }, sources, + oauth_issuer: text("oauthIssuer", 2048), } } @@ -488,6 +496,9 @@ pub struct AccountSetup { client_id: String, /// The Microsoft directory an existing account signs in to. tenant: String, + /// The OAuth settings' fields beside [`AccountSetup::oauth`] (an own identity provider's + /// redirect port, client secret, Discover). + own: oauth_settings::OwnFields, /// What went wrong, shown on the page in view. error: String, /// The page's first field takes the keyboard. @@ -638,6 +649,7 @@ impl AccountSetup { password: Secret::default(), client_id: String::new(), tenant: String::new(), + own: Default::default(), error: String::new(), focus: true, lookup: None, @@ -734,6 +746,7 @@ impl AccountSetup { w.tenant = line(&oauth.tenant, 64); } w.oauth = a.oauth.clone(); + w.own = oauth_settings::OwnFields::of(a.oauth.as_ref()); w.edit = Some(Editing { id: a.id, baseline: w.fields() }); if a.kind.has_offline_window() && !a.is_shared() { w.keep_offline = Some((a.keep_offline, a.keep_offline)); @@ -792,6 +805,10 @@ impl AccountSetup { } if !records.is_empty() { records.insert("username".into(), json!(line(&found.username, LINE))); + if !found.oauth_issuer.is_empty() { + // (Whole, up to the longest address taken: a cut one would name another.) + records.insert("oauthIssuer".into(), json!(line(&found.oauth_issuer, mailcraft_model::oauth::MAX_ENDPOINT))); + } m.insert("found".into(), Value::Object(records)); } } @@ -820,6 +837,9 @@ impl AccountSetup { Some(oauth) => { m.insert("auth".into(), json!("oauth2")); m.insert("provider".into(), json!(oauth.provider.code())); + if oauth.provider == OAuthProvider::Custom { + self.oauth_params(&mut m); + } // Which kind of Microsoft account it is, once a sign-in has said. if let Some(kind) = self.directory.code() { m.insert("directory".into(), json!(kind)); @@ -912,6 +932,7 @@ impl AccountSetup { if self.oauth.is_some() { m.insert("clientId".into(), json!(self.client_id.trim())); m.insert("tenant".into(), json!(self.tenant.trim())); + self.oauth_params(&mut m); } else if self.outgoing.value().is_some() { m.insert("outgoingWithoutSignIn".into(), json!(self.outgoing_without_sign_in)); } @@ -953,6 +974,9 @@ impl AccountSetup { _ => {} } } + if self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom) { + return self.oauth_problem(); + } None } @@ -983,6 +1007,7 @@ impl AccountSetup { self.service = preset.service; self.note = preset.note; self.oauth = preset.oauth.map(|provider| OAuth { provider, ..Default::default() }); + self.own = oauth_settings::OwnFields::offering(preset.oauth_issuer); self.username = preset.username; self.incoming = preset.incoming; self.outgoing = preset.outgoing; @@ -1067,6 +1092,10 @@ impl AccountSetup { self.oauth = None; self.someone_else = None; self.go(Page::Password); + } else if self.oauth.as_ref().is_some_and(|oauth| oauth.provider == OAuthProvider::Custom) { + // Back to its OAuth settings as they were typed, as Cancel Sign-In elsewhere + // does (#1844 review). + self.go(Page::Password); } else { self.go(Page::Address); } @@ -1168,6 +1197,32 @@ impl AccountSetup { self.proceed(app); } } + (Page::Password, Action::OwnProvider) => { + let offered = self.own.offered.clone(); + self.choose_own_provider(&offered); + // (A client secret typed for another provider before is not this one's, #1844 review.) + app.client_secrets.remove(&0); + } + (Page::Password, Action::PasswordInstead) => { + self.oauth = None; + self.own.wipe(); + // (Nor is a client secret typed for that provider kept, #1844 review.) + app.client_secrets.remove(&0); + self.error.clear(); + } + (Page::Password, Action::Go) if self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom) => { + if let Some(problem) = self.settings_problem(true).or_else(|| self.own_sign_in_problem()) { + self.error = problem; + } else if !self.hosts_to_ask().is_empty() { + self.go(Page::ServerConsent); + } else { + self.start_own_sign_in(app); + } + } + (Page::ServerConsent, Action::Go) if self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom) => { + self.agreed_hosts.extend(self.hosts_to_ask()); + self.start_own_sign_in(app); + } (Page::Password, Action::Go) => { // Do not let an Enter key or a command bypass the OAuth-first choice and // add a Google account without the owner selecting app-password setup. @@ -1393,6 +1448,14 @@ impl AccountSetup { } } + /// A new account with its own identity provider: its client secret where the sign-in finds + /// it, then the provider's page. + fn start_own_sign_in(&mut self, app: &mut MailApp) { + self.oauth = self.oauth_now(); + self.keep_client_secret(app, 0); + self.start_sign_in(app); + } + /// Send the owner to the provider's page. fn start_sign_in(&mut self, app: &mut MailApp) { let Some(oauth) = self.oauth.clone() else { return }; @@ -1530,7 +1593,9 @@ impl AccountSetup { /// signed in as somebody other than the address typed is not added: the owner is asked /// whether to sign in again, set up that account, or confirm a personal custom-domain alias. fn add_signed_in(&mut self, app: &mut MailApp, tokens: mailcraft_model::sync::Tokens) { - if tokens.someone_else(self.email.trim(), "") { + // (An own identity provider's names needn't be the address: its mail servers judge the token.) + let own = self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom); + if !own && tokens.someone_else(self.email.trim(), "") { self.someone_else = Some(tokens); self.go(Page::SomeoneElse); return; @@ -1660,12 +1725,18 @@ impl AccountSetup { self.error = problem; return false; } + // (As it was: a client secret kept under settings that change goes with them, #1844 review.) + let before = app.session.mailbox.account(id).cloned(); if let Some((command, params)) = self.edit_command() && let Err(e) = app.execute(command, params) { self.error = e; return false; } + self.keep_client_secret(app, id); + if let Some(before) = before { + app.drop_stale_client_secret(&before); + } if let Some((_, ask)) = self.ask_conversation.filter(|(was, ask)| was != ask) { if let Err(e) = app.execute("account.edit", json!({"id": id, "askBeforeDeletingConversation": ask})) { self.error = e; @@ -1730,6 +1801,7 @@ impl AccountSetup { Page::Checking => self.poll_check(app), Page::ExchangeChecking | Page::ExchangeConsent => self.poll_exchange(app), Page::Exchange => self.poll_look_again(), + Page::Password | Page::Settings => self.poll_discover(), _ => {} } } @@ -1845,6 +1917,8 @@ impl AccountSetup { } else if self.oauth.as_ref().is_some_and(|oauth| oauth.provider == OAuthProvider::Google) { self.oauth = None; self.go(Page::Password); + } else if self.oauth.as_ref().is_some_and(|oauth| oauth.provider == OAuthProvider::Custom) { + self.go(Page::Password); } else { self.go(Page::Address); } @@ -1917,6 +1991,7 @@ impl AccountSetup { app.cancel_admin_consent(); } self.forget_password(); + app.client_secrets.remove(&0); } /// A wizard that went while its owner was in the browser, in a way it couldn't see, left that @@ -2005,19 +2080,22 @@ impl AccountSetup { (!named.is_empty()).then(|| fmt(why, &[("domain", &domain), ("hosts", &named.join(", "))])) }) .collect(); + // (Signing in with an own identity provider, the mail servers get a token from it, not + // the password: said as it is, #1844 review.) + let token = self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom); page(ui, &t, |ui| { - heading(ui, tl!("Send your password to another server?"), &t); + heading(ui, if token { tl!("Send your sign-in to another server?") } else { tl!("Send your password to another server?") }, &t); for why in &whys { ui.label(RichText::new(why).font(medium(13.0)).color(t.text)); } - note( - ui, - &fmt( - tl!("If you go on, your user name and password are sent to {hosts}. Go on only if you know it is your provider's."), - &[("hosts", &hosts)], - ), - t.text_dim, - ); + let what = if token { + tl!( + "If you go on, you sign in on your identity provider's page and the access token it gives is sent to {hosts}. Go on only if you know it is your provider's." + ) + } else { + tl!("If you go on, your user name and password are sent to {hosts}. Go on only if you know it is your provider's.") + }; + note(ui, &fmt(what, &[("hosts", &hosts)]), t.text_dim); note(ui, tl!("If you don't, nothing is sent, and you can change the servers in Server settings."), t.text_dim); }); let (mut yes, mut no) = (false, false); @@ -2146,6 +2224,10 @@ impl AccountSetup { }; let mut offered = None; let mut change_method = None; + // An own identity provider instead of a password: for a new account on servers nobody + // here knows the sign-in of (a provider this program knows has its own). + let own = self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom); + let can_own = self.edit.is_none() && !oauth_first && !google && (own || (self.oauth.is_none() && self.service.is_empty())); page(ui, &t, |ui| { heading(ui, &title, &t); note(ui, &shown(self.email.trim(), 120), t.text_dim); @@ -2234,12 +2316,29 @@ impl AccountSetup { } note(ui, tl!("Use a Google app password, not your everyday Google account password."), t.text_dim); } - if asks { + if own { + self.oauth_section(app, ui, pass); + if button(ui, tl!("Use a password instead"), false, true).clicked() { + change_method = Some(Action::PasswordInstead); + } + } else if asks { self.password_field(ui, pass, app.secret_watch(), ""); note(ui, kept_where(app), t.text_dim); } else { note(ui, tl!("This build can't connect to mail servers. The account can still be added."), t.text_dim); } + if can_own && !own && app.services.sign_in.is_some() { + if !self.own.offered.is_empty() { + note( + ui, + &fmt(tl!("{domain} says its mail signs in with an identity provider (OAuth 2.0)."), &[("domain", &domain)]), + t.text_dim, + ); + } + if button(ui, tl!("Sign in with your identity provider (OAuth 2.0) instead"), false, true).clicked() { + change_method = Some(Action::OwnProvider); + } + } } ui.add_space(2.0); disclosure(ui, tl!("Change account settings"), &mut self.settings_open, &t); @@ -2253,7 +2352,7 @@ impl AccountSetup { ui.hyperlink(GOOGLE_APP_PASSWORDS); }); } - let ready = !asks || !self.password.0.is_empty(); + let ready = own || !asks || !self.password.0.is_empty(); let (mut go, mut back, mut google_sign_in) = (false, false, false); strip(ui, self.page, |ui| { if oauth_first { @@ -2472,11 +2571,8 @@ impl AccountSetup { } else if !self.graph { self.settings(ui, pass); } - if let Some(oauth) = &self.oauth { - field(ui, pass, "clientId", tl!("Application (client) ID"), &mut self.client_id, tl!("The one in File › Options"), 200); - if oauth.provider == OAuthProvider::Microsoft { - field(ui, pass, "tenant", tl!("Tenant"), &mut self.tenant, "common", 64); - } + if self.oauth.is_some() { + self.oauth_section(app, ui, pass); } if let Some((_, keep)) = self.keep_offline.as_mut() { caption(ui, tl!("Mail to keep offline"), &t); @@ -2916,6 +3012,9 @@ mod tests { mod help; /// Explicit confirmation of personal Outlook.com custom-domain aliases. mod legacy_alias; + /// An account with its own identity provider: the OAuth settings, Discover, the client + /// secret, and a Microsoft or Google account set up for an own provider. + mod own_provider; /// An outgoing server that needs no sign-in (#836). mod relay_without_sign_in; /// The password's eye (#438). @@ -3187,6 +3286,7 @@ mod tests { }), outgoing: None, username: "%EMAILLOCALPART%".into(), + oauth_issuer: String::new(), }; let (_, params) = w.preset_command(Some(&found), None).unwrap(); assert_eq!( @@ -3337,6 +3437,7 @@ mod tests { incoming: Some(provider::FoundServer { server: Server { host: long.clone(), port: 993, security: Security::Tls }, via: Via::Srv }), outgoing: None, username: long.clone(), + oauth_issuer: long.clone(), }; let (_, params) = w.preset_command(Some(&hostile), None).unwrap(); let passed = params["mx"].as_array().unwrap(); diff --git a/crates/ui-egui/src/account_setup/oauth_settings.rs b/crates/ui-egui/src/account_setup/oauth_settings.rs new file mode 100644 index 0000000000..eeb38f3faa --- /dev/null +++ b/crates/ui-egui/src/account_setup/oauth_settings.rs @@ -0,0 +1,516 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! The OAuth settings of an account that signs in on its provider's page: every value its sign-in +//! uses, shown, and those that are the account's own, entered, saved and edited. +//! +//! Microsoft's and Google's values are built in ([`OAuthProvider::defaults`]): they are shown as +//! they are used and only the client id, Microsoft's tenant and the redirect port can change. To +//! use other addresses, scopes or a mechanism the account becomes one with its own identity +//! provider, after a question, starting from the values it had: so that what may be sent to +//! Microsoft's and Google's servers is never loosened from here. +//! +//! An own identity provider (Keycloak, Authentik and the like, in front of the owner's own IMAP +//! and SMTP servers) has every value typed, or its addresses found from its issuer (Discover: +//! only the issuer's address goes out, and only when the owner presses it). Its client secret, +//! when it has one, is typed here and kept in the system's credential store alone; the mailbox +//! says only that there is one. Saving goes through `account.add` and `account.edit`. + +use mailcraft_model::{ClientAuth, OAuthProvider, SaslChoice}; + +use super::*; + +/// What the OAuth settings keep beside the account's [`OAuth`] while the dialog is open. +#[derive(Default)] +pub(super) struct OwnFields { + /// The redirect port as typed; empty for any free one. + pub(super) port: String, + /// A client secret typed here, to keep in place of the one there is; empty for no change. + secret: Secret, + /// Its eye was clicked: it is shown. + reveal: bool, + /// The owner asked to forget the client secret there is. + forget_secret: bool, + /// The identity provider's description, while it is fetched, with the issuer it was asked + /// of: an answer for an issuer the owner has changed since is let go of (#1844 review). + discovering: Option<(String, Receiver>)>, + /// What Discover found, said in a line; or why it found nothing. + found: String, + /// The issuer and addresses Discover last found: they hold while the issuer stays the same. + discovered: Option, + /// The hosts of the found addresses outside the issuer's own domain, and whether the owner + /// agreed to them. Each needs the agreement while an address found on it is used as found + /// ([`OwnFields::outside_in_use`]); one typed over by the owner doesn't. + outside: Vec, + agreed: bool, + /// The question whether a Microsoft or Google account is to use its own identity provider. + asking: bool, + /// The owner said yes: saving sets it up for its own identity provider (`asCustom`). + pub(super) as_custom: bool, + /// The identity provider the domain's own document names, when it does: offered. + pub(super) offered: String, +} + +/// What Discover found for an issuer: its addresses as found. +#[derive(Clone, Default)] +struct Discovered { + issuer: String, + authorize: String, + token: String, + revoke: String, +} + +/// The host of an address, lower case; empty when it has none. +fn host_of(address: &str) -> String { + let rest = address.split("://").nth(1).unwrap_or(""); + let authority = rest.split(['/', '?', '#']).next().unwrap_or(""); + // (An IPv6 address is in brackets, colons and all; Discover names it without them.) + let host = match authority.strip_prefix('[') { + Some(inside) => inside.split(']').next().unwrap_or(""), + None => authority.split(':').next().unwrap_or(""), + }; + host.to_ascii_lowercase() +} + +impl OwnFields { + /// The hosts outside the issuer's domain that an address still used as Discover found it is + /// on: what the owner has to agree to (#1844 review: an address typed over needs no + /// agreement, the others still do). + fn outside_in_use(&self, oauth: &OAuth) -> Vec { + let Some(found) = &self.discovered else { return self.outside.clone() }; + let as_found = [(&oauth.authorize, &found.authorize), (&oauth.token, &found.token), (&oauth.revoke, &found.revoke)]; + self.outside + .iter() + .filter(|h| { + as_found.iter().any(|(now, then)| now.trim() == then.trim() && !then.trim().is_empty() && host_of(then) == h.to_ascii_lowercase()) + }) + .cloned() + .collect() + } + + pub(super) fn of(oauth: Option<&OAuth>) -> OwnFields { + OwnFields { port: oauth.and_then(|o| o.redirect_port).map(|p| p.to_string()).unwrap_or_default(), ..OwnFields::default() } + } + + /// Nothing typed yet, with the identity provider the domain's document named offered. + pub(super) fn offering(issuer: String) -> OwnFields { + OwnFields { offered: issuer, ..OwnFields::default() } + } + + /// The client secret typed, if any. + pub(super) fn typed_secret(&self) -> &str { + &self.secret.0 + } + + /// Blank what was typed of the secret. + pub(super) fn wipe(&mut self) { + self.secret.wipe(); + } +} + +/// Takes away from `oauth` what Discover found for `found`'s issuer, once the issuer is another: +/// each address still as found, and how the provider was to be spoken to. What the owner typed +/// over stays. +fn forget_discovered(oauth: &mut OAuth, found: &Discovered) { + for (now, then) in [(&mut oauth.authorize, &found.authorize), (&mut oauth.token, &found.token), (&mut oauth.revoke, &found.revoke)] { + if now.trim() == then.trim() { + now.clear(); + } + } + (oauth.client_auth, oauth.issuer_in_response, oauth.base_scopes) = (ClientAuth::default(), false, None); +} + +/// The redirect port as typed: `Ok(None)` for any free one. +fn port(text: &str) -> Result, ()> { + match text.trim() { + "" => Ok(None), + digits => digits.parse::().ok().filter(|p| *p != 0).map(Some).ok_or(()), + } +} + +impl AccountSetup { + /// Set the account up to sign in with an own identity provider, from nothing (or the issuer + /// the domain's document offered, when the owner takes it). + pub(super) fn choose_own_provider(&mut self, issuer: &str) { + self.forget_password(); + self.oauth = Some(OAuth { issuer: issuer.to_string(), ..OAuth::custom() }); + self.client_id.clear(); + let offered = std::mem::take(&mut self.own.offered); + self.own = OwnFields { offered, ..OwnFields::default() }; + self.error.clear(); + } + + /// The account's sign-in settings as the fields have them now. + pub(super) fn oauth_now(&self) -> Option { + let mut oauth = self.oauth.clone()?; + oauth.client_id = self.client_id.trim().to_string(); + if oauth.provider == OAuthProvider::Microsoft { + oauth.tenant = self.tenant.trim().to_string(); + } + oauth.redirect_port = port(&self.own.port).unwrap_or(oauth.redirect_port); + if oauth.provider == OAuthProvider::Custom { + let still_kept = oauth.has_secret && !self.own.forget_secret && self.secret_settings_unchanged(&oauth); + oauth.has_secret = !self.own.typed_secret().is_empty() || still_kept; + } + Some(oauth) + } + + /// Whether the settings a kept client secret is kept under (the identity provider, its token + /// and revocation addresses, the client and the mail servers) are as they were when Account + /// Settings opened: when one changes the secret isn't found under the new ones, and has to be + /// typed again (#1844 review). A new account has none kept. + fn secret_settings_unchanged(&self, oauth: &OAuth) -> bool { + let Some(edit) = self.edit.as_ref() else { return true }; + let was = |key: &str| edit.baseline.get(key).cloned().unwrap_or(serde_json::Value::Null); + let text = |value: &str| serde_json::Value::String(value.trim().to_string()); + was("issuer") == text(&oauth.issuer) + && was("tokenUrl") == text(&oauth.token) + && was("revokeUrl") == text(&oauth.revoke) + && was("clientId") == text(&self.client_id) + && was("incoming") == self.incoming.value().unwrap_or(serde_json::Value::Null) + && was("outgoing") == self.outgoing.value().unwrap_or(serde_json::Value::Null) + } + + /// What keeps the OAuth settings from being saved, in the interface's language. + pub(super) fn oauth_problem(&self) -> Option { + let oauth = self.oauth_now()?; + if port(&self.own.port).is_err() { + return Some(tl!("The redirect port is a number from 1 to 65535, or empty for any free one").to_string()); + } + if self.own.discovering.is_some() { + return Some(tl!("Wait for your identity provider's addresses").to_string()); + } + if !self.own.outside_in_use(&oauth).is_empty() && !self.own.agreed { + return Some(tl!("Agree to the addresses outside your identity provider's domain, or enter others").to_string()); + } + let secret = self.own.typed_secret(); + if secret.len() > 1024 || !secret.bytes().all(|b| b.is_ascii_graphic()) { + return Some(tl!("The client secret can only be letters, digits and punctuation").to_string()); + } + oauth.check().err().map(|why| why.to_string()) + } + + /// What signing in needs that the settings don't have yet, before a new account's sign-in. + pub(super) fn own_sign_in_problem(&self) -> Option { + if let Some(problem) = self.oauth_problem() { + return Some(problem); + } + let oauth = self.oauth_now()?; + oauth.ready().err().map(|_| tl!("Find your identity provider's addresses with Discover, or enter them").to_string()) + } + + /// The OAuth settings, as `account.add` and `account.edit` take them. + pub(super) fn oauth_params(&self, m: &mut Map) { + let Some(oauth) = self.oauth_now() else { return }; + m.insert("redirectPort".into(), json!(oauth.redirect_port)); + if oauth.provider != OAuthProvider::Custom { + return; + } + m.insert("clientId".into(), json!(oauth.client_id)); + if self.own.as_custom { + m.insert("asCustom".into(), json!(true)); + } + for (key, value) in [ + ("issuer", &oauth.issuer), + ("authorizeUrl", &oauth.authorize), + ("tokenUrl", &oauth.token), + ("revokeUrl", &oauth.revoke), + ("scopes", &oauth.scopes), + ] { + m.insert(key.into(), json!(value.trim())); + } + m.insert("mechanism".into(), json!(oauth.mechanism.code())); + m.insert("clientAuth".into(), json!(oauth.client_auth.code())); + m.insert("issuerInResponse".into(), json!(oauth.issuer_in_response)); + m.insert("baseScopes".into(), json!(oauth.base_scopes)); + m.insert("hasSecret".into(), json!(oauth.has_secret)); + } + + /// Keep the client secret typed (or forget the one there is) for `account`, once the + /// settings that name it are saved (0: the account being set up, until it exists). + pub(super) fn keep_client_secret(&mut self, app: &mut MailApp, account: Id) { + if !self.oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom) { + return; + } + let setup = self.oauth.clone().filter(|_| account == 0); + if !self.own.typed_secret().is_empty() { + let secret = self.own.typed_secret().to_string(); + match &setup { + Some(oauth) => app.set_setup_client_secret(oauth, &secret), + None => app.set_client_secret(account, &secret), + } + self.own.wipe(); + // (A replacement typed over a Forget ticked before is kept, not forgotten again.) + self.own.forget_secret = false; + } else if self.own.forget_secret { + match &setup { + Some(oauth) => app.set_setup_client_secret(oauth, ""), + None => app.set_client_secret(account, ""), + } + self.own.forget_secret = false; + } + } + + /// Take in what Discover found, once it has. + pub(super) fn poll_discover(&mut self) { + let answer = match self.own.discovering.as_ref().map(|(_, rx)| rx.try_recv()) { + Some(Err(TryRecvError::Empty)) | None => return, + Some(Ok(answer)) => answer, + Some(Err(TryRecvError::Disconnected)) => Err(tl!("Finding the addresses stopped unexpectedly").to_string()), + }; + let asked = self.own.discovering.take().map(|(issuer, _)| issuer).unwrap_or_default(); + let Some(oauth) = self.oauth.as_mut().filter(|o| o.provider == OAuthProvider::Custom) else { return }; + // (Found for an issuer the owner has changed since: not this one's addresses.) + if asked != oauth.issuer.trim() { + return; + } + match answer { + Ok(found) => { + (oauth.authorize, oauth.token, oauth.revoke) = (line(&found.authorize, 2048), line(&found.token, 2048), line(&found.revoke, 2048)); + (oauth.client_auth, oauth.issuer_in_response) = (found.client_auth, found.issuer_in_response); + oauth.base_scopes = found.base_scopes.clone(); + let host = |address: &str| address.split("://").nth(1).and_then(|rest| rest.split(['/', '?', ':']).next()).unwrap_or("").to_string(); + let mut said = fmt( + tl!("Found: sign-in at {signIn}, tokens from {token}."), + &[("signIn", &shown(&host(&oauth.authorize), 80)), ("token", &shown(&host(&oauth.token), 80))], + ); + if found.no_refresh { + said.push(' '); + said.push_str(tl!("It hands out no refresh tokens: you'll be asked to sign in again each time a sign-in runs out.")); + } + self.own.found = said; + self.own.outside = found.outside.iter().take(8).map(|h| line(h, 253)).collect(); + self.own.agreed = false; + self.own.discovered = + Some(Discovered { issuer: asked, authorize: oauth.authorize.clone(), token: oauth.token.clone(), revoke: oauth.revoke.clone() }); + } + Err(why) => self.own.found = fmt(tl!("No addresses found: {reason}"), &[("reason", &shown(&why, 200))]), + } + } + + /// The OAuth settings section of a page, for an account that signs in on its provider's page. + pub(super) fn oauth_section(&mut self, app: &MailApp, ui: &mut Ui, pass: &mut Pass) { + let t = pass.t; + let Some(provider) = self.oauth.as_ref().map(|o| o.provider) else { return }; + caption(ui, tl!("OAuth settings"), &t); + if provider != OAuthProvider::Custom { + // (No list of where its token goes: Microsoft's and Google's also go to their own + // services besides the mail servers, Microsoft Graph for one, #1844 review.) + self.built_in_fields(ui, pass, provider); + return; + } + self.own_provider_fields(app, ui, pass); + // The servers an own provider's token is for: never chosen here, they follow the server + // settings, and it is sent nowhere else. + let mut servers: Vec = + [self.incoming.host.trim(), self.outgoing.host.trim()].into_iter().filter(|h| !h.is_empty()).map(|h| shown(h, 80)).collect(); + servers.dedup(); + let servers = if servers.is_empty() { tl!("the incoming and outgoing servers above").to_string() } else { servers.join(", ") }; + note(ui, &fmt(tl!("The sign-in is only sent to: {servers}"), &[("servers", &servers)]), t.text_dim); + if [&self.incoming.host, &self.outgoing.host].into_iter().any(|host| mailcraft_model::is_microsoft_or_google_host(host)) { + note( + ui, + tl!( + "A sign-in with your own identity provider is never sent to Microsoft's or Google's mail servers: change the servers above to your own." + ), + t.orange, + ); + } + } + + /// Microsoft's or Google's built-in values, shown; the client id, tenant and port, edited. + fn built_in_fields(&mut self, ui: &mut Ui, pass: &mut Pass, provider: OAuthProvider) { + let t = pass.t; + let profile = if provider == OAuthProvider::Google { tl!("Google (built in)") } else { tl!("Microsoft 365 or Outlook.com (built in)") }; + note(ui, profile, t.text); + let used = provider.defaults(&self.tenant); + for (label, value) in [ + (tl!("Identity provider"), used.issuer.as_str()), + (tl!("Sign-in address"), used.authorize.as_str()), + (tl!("Token address"), used.token.as_str()), + (tl!("Scopes"), used.scopes.as_str()), + (tl!("Mechanism"), used.mechanism.code()), + ] { + note(ui, &format!("{label}: {}", shown(value, 200)), t.text_dim); + } + field(ui, pass, "clientId", tl!("Application (client) ID"), &mut self.client_id, tl!("The one in File › Options"), 200); + if provider == OAuthProvider::Microsoft { + field(ui, pass, "tenant", tl!("Tenant"), &mut self.tenant, "common", 64); + } + // (Only an account with IMAP and SMTP servers can: a Microsoft account kept in step + // through Graph has none, and an own provider's token goes to its own servers, #1844 + // review.) + if self.incoming.host.trim().is_empty() || self.outgoing.host.trim().is_empty() { + return; + } + // Nor while they are Microsoft's or Google's: an own provider's token is never sent there, + // so the servers change first (#1844 review). + if [&self.incoming.host, &self.outgoing.host].into_iter().any(|host| mailcraft_model::is_microsoft_or_google_host(host)) { + note( + ui, + &fmt( + tl!( + "To sign in with your own identity provider, first change the incoming and outgoing servers to your own: a sign-in from it is never sent to {provider}'s servers." + ), + &[("provider", provider.label())], + ), + t.text_dim, + ); + self.own.asking = false; + return; + } + if !self.own.asking { + if button(ui, tl!("Use your own identity provider instead…"), false, true).clicked() { + self.own.asking = true; + } + return; + } + let question = fmt( + tl!( + "These settings will no longer be {provider}'s: MailCraft will treat this account as one with your own identity provider, starting from the values above, and you'll sign in again." + ), + &[("provider", provider.label())], + ); + note(ui, &question, t.orange); + let (mut yes, mut no) = (false, false); + ui.horizontal(|ui| { + yes = button(ui, tl!("Use my own identity provider"), true, true).clicked(); + no = button(ui, tl!("Keep the built-in settings"), false, true).clicked(); + }); + if yes { + let mut oauth = self.oauth_now().unwrap_or_default(); + let used = oauth.effective(); + let extra = used + .scopes + .split_ascii_whitespace() + .filter(|s| !mailcraft_model::oauth::CUSTOM_SCOPE.split(' ').any(|c| c == *s)) + .collect::>() + .join(" "); + oauth = OAuth { + provider: OAuthProvider::Custom, + client_id: used.client_id.clone(), + issuer: used.issuer, + authorize: used.authorize, + token: used.token, + revoke: used.revoke, + scopes: extra, + mechanism: used.mechanism, + client_auth: used.client_auth, + redirect_port: oauth.redirect_port, + ..OAuth::default() + }; + self.client_id = used.client_id; + self.oauth = Some(oauth); + (self.own.as_custom, self.own.asking) = (true, false); + } else if no { + self.own.asking = false; + } + } + + /// An own identity provider's values, every one entered here. + fn own_provider_fields(&mut self, app: &MailApp, ui: &mut Ui, pass: &mut Pass) { + let t = pass.t; + note(ui, tl!("Your own identity provider"), t.text); + if !self.own.offered.is_empty() && self.oauth.as_ref().is_some_and(|o| o.issuer.trim().is_empty()) { + note(ui, &fmt(tl!("Your domain names {issuer} for signing in."), &[("issuer", &shown(&self.own.offered, 120))]), t.text_dim); + if button(ui, tl!("Use it"), false, true).clicked() + && let Some(oauth) = self.oauth.as_mut() + { + oauth.issuer = self.own.offered.clone(); + } + } + let has_secret = self.oauth.as_ref().is_some_and(|o| o.has_secret); + // (One kept for settings that have changed since is not kept for these, #1844 review.) + let kept_for_others = has_secret && self.oauth.as_ref().is_some_and(|o| !self.secret_settings_unchanged(o)); + let Some(oauth) = self.oauth.as_mut() else { return }; + field(ui, pass, "issuer", tl!("Identity provider (issuer)"), &mut oauth.issuer, "https://id.example.org/realms/mail", 2048); + // Another issuer: what Discover found for the one before isn't its (#1844 review). + if let Some(found) = self.own.discovered.clone().filter(|found| found.issuer != oauth.issuer.trim()) { + forget_discovered(oauth, &found); + (self.own.discovered, self.own.found, self.own.agreed) = (None, String::new(), false); + self.own.outside.clear(); + } + let can_discover = app.services.oauth_discover.is_some() && !oauth.issuer.trim().is_empty() && self.own.discovering.is_none(); + let mut discover = false; + ui.horizontal(|ui| { + discover = button(ui, tl!("Discover"), false, can_discover) + .on_hover_text(tl!("Find the sign-in and token addresses from the identity provider's address. Only that address is sent.")) + .clicked(); + if self.own.discovering.is_some() { + ui.spinner(); + } + }); + if discover && let Some(start) = app.services.oauth_discover.as_ref() { + let issuer = oauth.issuer.trim().to_string(); + self.own.discovering = Some((issuer.clone(), start(issuer))); + self.own.found.clear(); + } + if !self.own.found.is_empty() { + note(ui, &self.own.found, t.text_dim); + } + let outside = self.oauth.as_ref().map(|o| self.own.outside_in_use(o)).unwrap_or_default(); + if !outside.is_empty() { + let hosts = outside.join(", "); + note(ui, &fmt(tl!("These addresses are outside your identity provider's domain: {hosts}"), &[("hosts", &hosts)]), t.orange); + ui.checkbox(&mut self.own.agreed, tl!("I trust these addresses")); + } + let Some(oauth) = self.oauth.as_mut() else { return }; + // (An address typed by hand is the owner's own: nothing to agree to for it; the ones still + // as Discover found them keep asking, [`OwnFields::outside_in_use`].) + field(ui, pass, "authorizeUrl", tl!("Sign-in address"), &mut oauth.authorize, "https://…/auth", 2048); + field(ui, pass, "tokenUrl", tl!("Token address"), &mut oauth.token, "https://…/token", 2048); + field(ui, pass, "revokeUrl", tl!("Revocation address (optional)"), &mut oauth.revoke, "https://…/revoke", 2048); + field(ui, pass, "clientId", tl!("Client ID"), &mut self.client_id, tl!("The one registered for MailCraft"), 200); + caption(ui, tl!("Client secret (optional)"), &t); + let hint = if has_secret && !self.own.forget_secret && !kept_for_others { + tl!("Kept: type a new one to replace it") + } else { + tl!("Only if your provider gave one") + }; + let resp = secret_field::field(ui, &mut self.own.secret.0, &mut self.own.reveal, app.secret_watch(), FIELD_MARGIN, |edit| { + edit.id(field_id(("account", "clientSecret"))).char_limit(1024).hint_text(hint.to_owned()) + }); + pass.field(&resp); + if kept_for_others && !self.own.forget_secret && self.own.typed_secret().is_empty() { + note( + ui, + tl!( + "The client secret is kept for the settings as they were: enter it again to use it with these, or it is forgotten when you save." + ), + t.orange, + ); + } else if has_secret { + ui.checkbox(&mut self.own.forget_secret, tl!("Forget the client secret")); + } + note( + ui, + tl!("Kept in your system's credential store, never in the mailbox. A desktop program can't really keep it secret from you."), + t.text_dim, + ); + let Some(oauth) = self.oauth.as_mut() else { return }; + // RFC 6749 §2.3.1: the header is what every provider takes; Discover says when it is the form. + caption(ui, tl!("Client secret sent"), &t); + let sent = |way: ClientAuth| match way { + ClientAuth::Basic => tl!("In the Authorization header (client_secret_basic)"), + ClientAuth::Post => tl!("In the form (client_secret_post)"), + }; + egui::ComboBox::from_id_salt(field_id(("account", "clientAuth"))).selected_text(sent(oauth.client_auth)).show_ui(ui, |ui| { + for way in [ClientAuth::Basic, ClientAuth::Post] { + ui.selectable_value(&mut oauth.client_auth, way, sent(way)); + } + }); + field(ui, pass, "scopes", tl!("Extra scopes"), &mut oauth.scopes, tl!("Asked for besides openid email offline_access"), 1024); + field(ui, pass, "redirectPort", tl!("Redirect port"), &mut self.own.port, tl!("Automatic"), 5); + note(ui, tl!("Register http://127.0.0.1 with any port (or the one above) as the redirect address."), t.text_dim); + caption(ui, tl!("Mechanism"), &t); + let label = |choice: SaslChoice| match choice { + SaslChoice::Auto => tl!("Automatic (OAUTHBEARER, else XOAUTH2)"), + SaslChoice::OAuthBearer => "OAUTHBEARER", + SaslChoice::XOAuth2 => "XOAUTH2", + }; + egui::ComboBox::from_id_salt(field_id(("account", "mechanism"))).selected_text(label(oauth.mechanism)).show_ui(ui, |ui| { + for choice in [SaslChoice::Auto, SaslChoice::OAuthBearer, SaslChoice::XOAuth2] { + ui.selectable_value(&mut oauth.mechanism, choice, label(choice)); + } + }); + } +} diff --git a/crates/ui-egui/src/account_setup/tests/autodiscover.rs b/crates/ui-egui/src/account_setup/tests/autodiscover.rs index 0acf3b3676..e7f8651dd1 100644 --- a/crates/ui-egui/src/account_setup/tests/autodiscover.rs +++ b/crates/ui-egui/src/account_setup/tests/autodiscover.rs @@ -325,6 +325,7 @@ fn imap_after_the_question_takes_the_servers_the_domain_s_own_records_name() { incoming: server("imap.lumen.example", 993, Security::Tls), outgoing: server("smtp.lumen.example", 465, Security::Tls), username: String::new(), + oauth_issuer: String::new(), }; discoveries(&mut a, Some(Ok(discovered))); autodiscovers(&mut a, Some(Ok(vec![HOSTED_AUTODISCOVER]))); diff --git a/crates/ui-egui/src/account_setup/tests/found_servers.rs b/crates/ui-egui/src/account_setup/tests/found_servers.rs index 020a042a0a..ab2ac4f558 100644 --- a/crates/ui-egui/src/account_setup/tests/found_servers.rs +++ b/crates/ui-egui/src/account_setup/tests/found_servers.rs @@ -33,6 +33,7 @@ fn servers_found_in_the_domains_records_are_shown_to_check_and_said_to_be_found( incoming: found("mail.lumen.example", 993, Security::Tls, Via::Srv), outgoing: found("mail.lumen.example", 587, Security::StartTls, Via::Srv), username: String::new(), + oauth_issuer: String::new(), }; let mut h = with_found(a, discovered); let w = wizard(&h).unwrap(); @@ -75,6 +76,7 @@ fn a_server_outside_the_domain_is_named_before_the_password_goes_there() { incoming: found(incoming, 993, Security::Tls, Via::Srv), outgoing: found(outgoing, 465, Security::Tls, Via::Srv), username: String::new(), + oauth_issuer: String::new(), }; let mut h = with_found(a, discovered); assert_eq!(wizard(&h).map(|w| w.found), Some(Some(Via::Srv))); @@ -113,6 +115,7 @@ fn a_host_the_owner_typed_is_their_own_and_what_is_not_found_is_said_to_be_a_gue incoming: found("imap.hosted.example", 993, Security::Tls, Via::Srv), outgoing: None, username: String::new(), + oauth_issuer: String::new(), }; let mut h = with_found(a, discovered); let w = wizard(&h).unwrap(); @@ -140,6 +143,7 @@ fn servers_from_a_published_document_or_the_isp_database_say_so_and_sign_in_as_i incoming: found("mail.lumen.example", 993, Security::Tls, via), outgoing: found("mail.lumen.example", 465, Security::Tls, via), username: "%EMAILLOCALPART%".into(), + oauth_issuer: String::new(), }; let mut h = with_found(a, discovered); let w = wizard(&h).unwrap(); @@ -164,6 +168,7 @@ fn a_server_outside_the_domain_is_named_whatever_named_it() { incoming: found("imap.hosted.example", 993, Security::Tls, via), outgoing: found("smtp.hosted.example", 465, Security::Tls, via), username: "%EMAILADDRESS%".into(), + oauth_issuer: String::new(), }; let mut h = with_found(a, discovered); assert_eq!(wizard(&h).map(|w| (w.found, w.username.clone())), Some((Some(via), "noor@lumen.example".to_string()))); @@ -192,6 +197,7 @@ fn each_server_is_said_to_come_from_the_source_that_named_it() { incoming: found("imap.lumen.example", 993, Security::Tls, Via::Autoconfig), outgoing: found("smtp.hosted.example", 465, Security::Tls, Via::Ispdb), username: String::new(), + oauth_issuer: String::new(), }; let mut h = with_found(a, discovered); assert_eq!(wizard(&h).map(|w| (w.found, w.guessed)), Some((Some(Via::Autoconfig), false))); diff --git a/crates/ui-egui/src/account_setup/tests/google_oauth_first_tests.rs b/crates/ui-egui/src/account_setup/tests/google_oauth_first_tests.rs index beee6d77e3..52d7fdadca 100644 --- a/crates/ui-egui/src/account_setup/tests/google_oauth_first_tests.rs +++ b/crates/ui-egui/src/account_setup/tests/google_oauth_first_tests.rs @@ -235,7 +235,7 @@ fn google_desktop_requires_registration_and_keeps_password_as_default() { let seen: Log<(String, OAuthProvider, String, String, bool)> = Default::default(); let written = seen.clone(); app.services.sign_in = Some(Box::new(move |request: SignInRequest| { - written.lock().unwrap().push((request.email, request.oauth.provider, request.oauth.client_id, request.google_client_secret, request.graph)); + written.lock().unwrap().push((request.email, request.oauth.provider, request.oauth.client_id, request.client_secret, request.graph)); mpsc::channel().1 })); let mut wizard = AccountSetup::open(&app, &json!({"email": "one@gmail.com"})).unwrap(); diff --git a/crates/ui-egui/src/account_setup/tests/own_provider.rs b/crates/ui-egui/src/account_setup/tests/own_provider.rs new file mode 100644 index 0000000000..2c728d9a39 --- /dev/null +++ b/crates/ui-egui/src/account_setup/tests/own_provider.rs @@ -0,0 +1,359 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! An account that signs in with an own identity provider (OAuth 2.0): set up from Add Account +//! with Discover and a client secret, and a built-in account turned into one after a question. +//! Invented example.org addresses; nothing leaves the test. + +use mailcraft_model::{ClientAuth, OAuthProvider, SaslChoice}; + +use super::*; +use crate::OAuthFound; + +const ISSUER: &str = "https://id.example.org/realms/mail"; + +type Requests = Log<(OAuth, String)>; + +/// A host that signs owners in and says yes; the log is the settings and client secret each +/// sign-in was handed. +fn signing_in(app: &mut MailApp) -> Requests { + let asked: Requests = Default::default(); + let log = asked.clone(); + app.services.sign_in = Some(Box::new(move |req: SignInRequest| { + log.lock().unwrap().push((req.oauth.clone(), req.client_secret.clone())); + let (tx, rx) = mpsc::channel(); + tx.send(Ok(signed_in("Alice"))).unwrap(); + rx + })); + asked +} + +/// A host that finds the identity provider's addresses; the log is the issuers it was asked about. +fn discovering(app: &mut MailApp, outside: &[&str]) -> Log { + let asked: Log = Default::default(); + let log = asked.clone(); + let outside: Vec = outside.iter().map(|h| h.to_string()).collect(); + app.services.oauth_discover = Some(Box::new(move |issuer: String| { + log.lock().unwrap().push(issuer.clone()); + let (tx, rx) = mpsc::channel(); + tx.send(Ok(OAuthFound { + authorize: format!("{issuer}/protocol/openid-connect/auth"), + // (Outside hosts are those of addresses found, as Discover finds them: the token + // address on the first, when there is one.) + token: outside.first().map_or_else(|| format!("{issuer}/protocol/openid-connect/token"), |host| format!("https://{host}/token")), + revoke: String::new(), + outside: outside.clone(), + no_refresh: false, + // A provider that lists only the form for a secret, and names itself in its answers. + client_auth: ClientAuth::Post, + issuer_in_response: true, + // And one that lists its scopes without offline_access. + base_scopes: Some("openid email".into()), + })) + .unwrap(); + rx + })); + asked +} + +/// The window with the wizard open, tall enough for every OAuth setting to be on screen. +fn open_tall(mut app: MailApp, mut params: Value) -> Harness<'static, MailApp> { + params["name"] = json!("account"); + app.execute("ui.dialog", params).unwrap(); + window(app, (1280.0, 2400.0)) +} + +/// The wizard on the password page for an address at a domain nobody knows. +fn at_password(a: MailApp) -> Harness<'static, MailApp> { + let mut h = open_tall(a, json!({})); + connect(&mut h, "alice@unknown.example"); + assert_eq!(page(&h), Some(Page::Password)); + h +} + +#[test] +fn a_new_account_signs_in_with_its_own_identity_provider_found_from_its_issuer() { + let mut a = app(false); + let requests = signing_in(&mut a); + let asked = discovering(&mut a, &[]); + let mut h = at_password(a); + click(&mut h, "Sign in with your identity provider (OAuth 2.0) instead"); + assert!(wizard(&h).unwrap().oauth.as_ref().is_some_and(|o| o.provider == OAuthProvider::Custom)); + assert!(says(&h, "Your own identity provider")); + // The issuer, then Discover: only the issuer goes out. + wizard_mut(&mut h).oauth.as_mut().unwrap().issuer = ISSUER.into(); + h.run_steps(2); + click(&mut h, "Discover"); + h.run_steps(3); + assert_eq!(*asked.lock().unwrap(), [ISSUER]); + let oauth = wizard(&h).unwrap().oauth.clone().unwrap(); + assert_eq!(oauth.token, format!("{ISSUER}/protocol/openid-connect/token")); + assert!(says(&h, "Found: sign-in at id.example.org")); + // How it takes a secret and that it names itself come with the addresses (RFC 6749 §2.3.1, RFC 9207). + assert_eq!((oauth.client_auth, oauth.issuer_in_response), (ClientAuth::Post, true)); + assert_eq!(oauth.base_scopes.as_deref(), Some("openid email")); + assert!(says(&h, "Client secret sent")); + // The client, and its secret typed in the masked field. + wizard_mut(&mut h).client_id = "mailcraft".into(); + type_password(&mut h); + click(&mut h, "Connect"); + // Signed in with the settings on screen and the secret typed. + let requests = requests.lock().unwrap().clone(); + assert_eq!(requests.len(), 1, "{:?}", wizard(&h).map(|w| w.error.clone())); + let (sent, secret) = &requests[0]; + assert_eq!((sent.provider, sent.client_id.as_str(), secret.as_str()), (OAuthProvider::Custom, "mailcraft", TYPED)); + // The account is there, with its own provider and the word that a secret is kept. + let account = h.state().session.mailbox.accounts.iter().find(|x| x.email == "alice@unknown.example").cloned().expect("the account is added"); + let oauth = account.oauth.clone().unwrap(); + assert_eq!((oauth.provider, oauth.issuer.as_str(), oauth.has_secret), (OAuthProvider::Custom, ISSUER, true)); + assert_eq!((oauth.client_auth, oauth.issuer_in_response, sent.client_auth), (ClientAuth::Post, true, ClientAuth::Post)); + // The secret is the account's for the session; never in the mailbox, a command's answer or Debug. + assert_eq!(h.state().client_secret_of(account.id), TYPED); + let mailbox = serde_json::to_string(&h.state().session.mailbox).unwrap(); + let listed = h.state_mut().execute("account.list", json!({})).unwrap().to_string(); + assert!(!mailbox.contains(TYPED) && !listed.contains(TYPED) && !format!("{account:?}").contains(TYPED)); +} + +#[test] +fn addresses_outside_the_providers_domain_are_agreed_to_first() { + let mut a = app(false); + let requests = signing_in(&mut a); + discovering(&mut a, &["tokens.example.net"]); + let mut h = at_password(a); + click(&mut h, "Sign in with your identity provider (OAuth 2.0) instead"); + wizard_mut(&mut h).oauth.as_mut().unwrap().issuer = ISSUER.into(); + wizard_mut(&mut h).client_id = "mailcraft".into(); + h.run_steps(2); + click(&mut h, "Discover"); + h.run_steps(3); + assert!(says(&h, "tokens.example.net")); + click(&mut h, "Connect"); + assert!(requests.lock().unwrap().is_empty()); + assert!(wizard(&h).unwrap().error.contains("outside"), "{}", wizard(&h).unwrap().error); + h.get_by_role_and_label(Role::CheckBox, "I trust these addresses").click(); + h.run_steps(3); + click(&mut h, "Connect"); + assert_eq!(requests.lock().unwrap().len(), 1); +} + +#[test] +fn settings_that_cant_be_used_are_said_and_nothing_is_signed_in() { + let mut a = app(false); + let requests = signing_in(&mut a); + let mut h = at_password(a); + click(&mut h, "Sign in with your identity provider (OAuth 2.0) instead"); + // No client id; no addresses; an address that isn't https; a port that isn't one. + click(&mut h, "Connect"); + assert!(!wizard(&h).unwrap().error.is_empty()); + wizard_mut(&mut h).client_id = "mailcraft".into(); + click(&mut h, "Connect"); + assert!(wizard(&h).unwrap().error.contains("Discover"), "{}", wizard(&h).unwrap().error); + { + let w = wizard_mut(&mut h); + let oauth = w.oauth.as_mut().unwrap(); + oauth.authorize = "https://id.example.org/auth".into(); + oauth.token = "http://id.example.org/token".into(); + } + click(&mut h, "Connect"); + assert!(wizard(&h).unwrap().error.contains("https"), "{}", wizard(&h).unwrap().error); + wizard_mut(&mut h).oauth.as_mut().unwrap().token = "https://id.example.org/token".into(); + wizard_mut(&mut h).own.port = "70000".into(); + click(&mut h, "Connect"); + assert!(wizard(&h).unwrap().error.contains("redirect port"), "{}", wizard(&h).unwrap().error); + assert!(requests.lock().unwrap().is_empty()); + // A password instead, after all. + click(&mut h, "Use a password instead"); + assert!(wizard(&h).unwrap().oauth.is_none()); +} + +#[test] +fn a_google_account_becomes_one_with_its_own_provider_only_after_the_question() { + let mut a = app(false); + let id = a + .execute( + "account.add", + json!({"email": "ada@gmail.example", "incoming": {"host": "imap.gmail.com"}, "outgoing": {"host": "smtp.gmail.com"}, "auth": "oauth2", "provider": "google"}), + ) + .unwrap()["id"] + .as_u64() + .unwrap(); + let mut h = open_tall(a, json!({"id": id})); + assert_eq!(page(&h), Some(Page::Settings)); + // Its built-in values are shown. + assert!(says(&h, "Google (built in)") && says(&h, "https://oauth2.googleapis.com/token")); + // Where a built-in provider's token goes isn't only the mail servers: no list claims so. + assert!(!says(&h, "The sign-in is only sent to")); + // While its servers are Gmail's it can't be one: an own provider's sign-in never goes there, + // and the owner is told to change the servers first (#1844 review). + assert!(says(&h, "first change the incoming and outgoing servers to your own")); + assert!(h.query_by_role_and_label(Role::Button, "Use your own identity provider instead…").is_none()); + { + let w = wizard_mut(&mut h); + w.incoming.host = "mail.example.org".into(); + w.outgoing.host = "mail.example.org".into(); + } + h.run_steps(3); + assert!(!says(&h, "first change the incoming and outgoing servers to your own")); + click(&mut h, "Use your own identity provider instead…"); + assert!(says(&h, "will no longer be Google's")); + click(&mut h, "Keep the built-in settings"); + assert_eq!(wizard(&h).unwrap().oauth.as_ref().unwrap().provider, OAuthProvider::Google); + click(&mut h, "Use your own identity provider instead…"); + click(&mut h, "Use my own identity provider"); + // Google's client is the build's: an own provider needs its own before anything is saved. + assert!(wizard(&h).unwrap().edit_command().is_none()); + wizard_mut(&mut h).client_id = "my-own-client".into(); + let (_, params) = wizard(&h).unwrap().edit_command().expect("a change to save"); + assert_eq!((params["asCustom"].as_bool(), params["provider"].as_str()), (Some(true), None)); + assert_eq!(params["tokenUrl"], "https://oauth2.googleapis.com/token"); + click(&mut h, "Save"); + let oauth = h.state().session.mailbox.account(id).unwrap().oauth.clone().unwrap(); + assert_eq!((oauth.provider, oauth.client_id.as_str(), oauth.mechanism), (OAuthProvider::Custom, "my-own-client", SaslChoice::XOAuth2)); + let saved = h.state().session.mailbox.account(id).unwrap(); + assert_eq!(saved.microsoft_or_google_server(), None); +} + +/// A Microsoft account kept in step through Microsoft Graph has no mail servers, and its token goes +/// to Graph: its settings never say the sign-in goes only to some mail servers (#1844 review). +#[test] +fn a_microsoft_account_on_graph_names_no_servers_its_sign_in_is_only_sent_to() { + let mut a = app(false); + let id = a.execute("account.add", json!({"email": "ada@example.org", "kind": "microsoft"})).unwrap()["id"].as_u64().unwrap(); + let h = open_tall(a, json!({"id": id})); + assert_eq!(page(&h), Some(Page::Settings)); + assert!(!says(&h, "The sign-in is only sent to")); +} + +#[test] +fn an_own_providers_settings_are_edited_and_its_secret_replaced_or_forgotten() { + let mut a = app(false); + let id = a + .execute( + "account.add", + json!({"email": "alice@example.org", "incoming": {"host": "mail.example.org"}, "outgoing": {"host": "mail.example.org"}, "auth": "oauth2", "provider": "custom", "clientId": "mailcraft", "issuer": ISSUER, "authorizeUrl": format!("{ISSUER}/auth"), "tokenUrl": format!("{ISSUER}/token"), "hasSecret": true}), + ) + .unwrap()["id"] + .as_u64() + .unwrap(); + let mut h = open_tall(a, json!({"id": id})); + assert!(says(&h, "Your own identity provider") && says(&h, "The sign-in is only sent to: mail.example.org")); + // Nothing changed: nothing to save. + assert!(wizard(&h).unwrap().edit_command().is_none()); + wizard_mut(&mut h).oauth.as_mut().unwrap().mechanism = SaslChoice::OAuthBearer; + type_password(&mut h); + click(&mut h, "Save"); + let oauth = h.state().session.mailbox.account(id).unwrap().oauth.clone().unwrap(); + assert_eq!((oauth.mechanism, oauth.has_secret), (SaslChoice::OAuthBearer, true)); + assert_eq!(h.state().client_secret_of(id), TYPED); + // Forgotten. + let mut h = open_tall(app_with(h), json!({"id": id})); + h.get_by_role_and_label(Role::CheckBox, "Forget the client secret").click(); + h.run_steps(3); + click(&mut h, "Save"); + assert!(!h.state().session.mailbox.account(id).unwrap().oauth.as_ref().unwrap().has_secret); + assert_eq!(h.state().client_secret_of(id), ""); +} + +/// A kept client secret is kept for the settings it was given with: when the revocation address +/// (or the issuer, the token address, the client or a server) changes, the dialog says it has to +/// be entered again, and saving without it says none is kept (#1844 review). +#[test] +fn a_secret_kept_for_settings_that_change_is_asked_for_again() { + let mut a = app(false); + let id = a + .execute( + "account.add", + json!({"email": "alice@example.org", "incoming": {"host": "mail.example.org"}, "outgoing": {"host": "mail.example.org"}, "auth": "oauth2", "provider": "custom", "clientId": "mailcraft", "issuer": ISSUER, "authorizeUrl": format!("{ISSUER}/auth"), "tokenUrl": format!("{ISSUER}/token"), "hasSecret": true}), + ) + .unwrap()["id"] + .as_u64() + .unwrap(); + let mut h = open_tall(a, json!({"id": id})); + assert!(!says(&h, "enter it again to use it with these")); + wizard_mut(&mut h).oauth.as_mut().unwrap().revoke = format!("{ISSUER}/revoke"); + h.run_steps(3); + assert!(says(&h, "enter it again to use it with these")); + let (_, params) = wizard(&h).unwrap().edit_command().expect("a change to save"); + assert_eq!(params["hasSecret"], false); + click(&mut h, "Save"); + assert!(!h.state().session.mailbox.account(id).unwrap().oauth.as_ref().unwrap().has_secret); +} + +/// The app a harness holds, for another dialog. +fn app_with(h: Harness<'static, MailApp>) -> MailApp { + let mut a = h.into_state(); + a.dialog = None; + a +} + +#[test] +fn removing_the_account_gives_the_refresh_token_back_where_the_provider_says() { + let mut a = app(false); + let given: Log<(String, String, String)> = Default::default(); + let log = given.clone(); + a.services.revoke_sign_in = Some(Box::new(move |oauth: OAuth, secret: String, refresh: String| { + log.lock().unwrap().push((oauth.revoke, secret, refresh)); + })); + let add = |a: &mut MailApp, revoke: &str| { + let v = json!({"email": "alice@example.org", "incoming": {"host": "mail.example.org"}, "outgoing": {"host": "mail.example.org"}, "auth": "oauth2", "provider": "custom", "clientId": "mailcraft", "issuer": ISSUER, "authorizeUrl": format!("{ISSUER}/auth"), "tokenUrl": format!("{ISSUER}/token"), "revokeUrl": revoke, "hasSecret": true}); + a.execute("account.add", v).unwrap()["id"].as_u64().unwrap() + }; + let id = add(&mut a, &format!("{ISSUER}/revoke")); + a.adopt_tokens(id, signed_in("Alice")); + a.set_client_secret(id, TYPED); + a.execute("account.remove", json!({"id": id})).unwrap(); + assert_eq!(*given.lock().unwrap(), [(format!("{ISSUER}/revoke"), TYPED.to_string(), "ref-1".to_string())]); + assert_eq!(a.client_secret_of(id), ""); + // A provider that names nowhere to give it back is told nothing. + let id = add(&mut a, ""); + a.adopt_tokens(id, signed_in("Alice")); + a.execute("account.remove", json!({"id": id})).unwrap(); + assert_eq!(given.lock().unwrap().len(), 1); +} + +/// An address typed over needs no agreement; one still as Discover found it on an outside host +/// does (#1844 review). +#[test] +fn only_an_outside_address_still_as_found_needs_the_agreement() { + let mut a = app(false); + let requests = signing_in(&mut a); + discovering(&mut a, &["tokens.example.net"]); + let mut h = at_password(a); + click(&mut h, "Sign in with your identity provider (OAuth 2.0) instead"); + wizard_mut(&mut h).oauth.as_mut().unwrap().issuer = ISSUER.into(); + wizard_mut(&mut h).client_id = "mailcraft".into(); + h.run_steps(2); + click(&mut h, "Discover"); + h.run_steps(3); + // The sign-in address typed over: the outside token address still asks. + wizard_mut(&mut h).oauth.as_mut().unwrap().authorize = format!("{ISSUER}/other/auth"); + h.run_steps(2); + click(&mut h, "Connect"); + assert!(requests.lock().unwrap().is_empty()); + assert!(wizard(&h).unwrap().error.contains("outside"), "{}", wizard(&h).unwrap().error); + // The token address typed over too: nothing left to agree to. + wizard_mut(&mut h).oauth.as_mut().unwrap().token = format!("{ISSUER}/other/token"); + h.run_steps(2); + click(&mut h, "Connect"); + assert_eq!(requests.lock().unwrap().len(), 1); +} + +/// What Discover found for one issuer isn't kept once the issuer is another (#1844 review). +#[test] +fn another_issuer_takes_away_what_discover_found() { + let mut a = app(false); + let _requests = signing_in(&mut a); + discovering(&mut a, &[]); + let mut h = at_password(a); + click(&mut h, "Sign in with your identity provider (OAuth 2.0) instead"); + wizard_mut(&mut h).oauth.as_mut().unwrap().issuer = ISSUER.into(); + wizard_mut(&mut h).client_id = "mailcraft".into(); + h.run_steps(2); + click(&mut h, "Discover"); + h.run_steps(3); + assert!(!wizard(&h).unwrap().oauth.as_ref().unwrap().token.is_empty()); + wizard_mut(&mut h).oauth.as_mut().unwrap().issuer = "https://id.example.org/realms/other".into(); + h.run_steps(2); + let oauth = wizard(&h).unwrap().oauth.clone().unwrap(); + assert!(oauth.token.is_empty() && oauth.authorize.is_empty(), "{oauth:?}"); + assert!(!oauth.issuer_in_response && oauth.base_scopes.is_none()); +} diff --git a/crates/ui-egui/src/agent_gate_binding_tests.rs b/crates/ui-egui/src/agent_gate_binding_tests.rs index 70cb1016b3..e3b98e1d7b 100644 --- a/crates/ui-egui/src/agent_gate_binding_tests.rs +++ b/crates/ui-egui/src/agent_gate_binding_tests.rs @@ -167,6 +167,7 @@ const ROWS: &[(&str, &str, Setup)] = &[ ("account.edit", r#"{"id": $account, "name": "X"}"#, Setup::None), ("account.remove", r#"{"id": $account}"#, Setup::None), ("account.forgetEwsCertificate", r#"{"id": $account}"#, Setup::None), + ("account.oauthRestoreDefaults", r#"{"id": $account}"#, Setup::None), ("account.davSet", r#"{"id": $account, "calendarHomes": ["https://dav.example.org/cal/"]}"#, Setup::None), ("account.davOff", r#"{"id": $account}"#, Setup::None), ("account.graphSwitch", r#"{"account": $account}"#, Setup::None), diff --git a/crates/ui-egui/src/client_secret_store_tests.rs b/crates/ui-egui/src/client_secret_store_tests.rs new file mode 100644 index 0000000000..3859d209e1 --- /dev/null +++ b/crates/ui-egui/src/client_secret_store_tests.rs @@ -0,0 +1,317 @@ +// SPDX-FileCopyrightText: MailCraft contributors +// SPDX-License-Identifier: MIT OR Apache-2.0 +//! An own identity provider's client secret is remembered in the credential store, so that the +//! refresh after a restart carries it: without it a confidential client is refused +//! (`invalid_client`) although the sign-in it renews worked. Invented example.org values; nothing +//! leaves the test. + +use std::collections::HashMap; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, Instant}; + +use mailcraft_engine::Session; +use mailcraft_host::SecretError; +use mailcraft_host::secrets::OAUTH_CLIENT; +use mailcraft_model::Id; +use serde_json::json; + +use crate::{MailApp, SecretStore, Services, SignInRequest}; + +const NOW: i64 = 1_791_993_600; +const ISSUER: &str = "https://id.example.org/realms/mail"; +const SECRET: &str = "not-a-real-client-secret"; + +#[derive(Default)] +struct Store { + held: Mutex>, +} + +impl SecretStore for Store { + fn get(&self, key: &str) -> Option { + self.held.lock().ok()?.get(key).cloned() + } + fn set(&self, key: &str, secret: &str) -> Result<(), SecretError> { + self.held.lock().map_err(|_| SecretError::Refused)?.insert(key.into(), secret.into()); + Ok(()) + } + fn delete(&self, key: &str) { + if let Ok(mut held) = self.held.lock() { + held.remove(key); + } + } +} + +fn app(store: &Arc, session: Session) -> MailApp { + let mut a = MailApp::new(session, Services::default()); + a.autosave = false; + a.services.secrets = Some(store.clone()); + a +} + +fn own_account(a: &mut MailApp) -> Id { + let v = json!({"email": "alice@example.org", "incoming": {"host": "mail.example.org"}, "outgoing": {"host": "mail.example.org"}, + "auth": "oauth2", "provider": "custom", "clientId": "mailcraft", "issuer": ISSUER, + "authorizeUrl": format!("{ISSUER}/auth"), "tokenUrl": format!("{ISSUER}/token"), "hasSecret": true}); + a.execute("account.add", v).unwrap()["id"].as_u64().unwrap() +} + +/// What the background read of the credential store brings at a start, taken in. +fn read_store(a: &mut MailApp) { + a.start_secret_read(false); + let until = Instant::now() + Duration::from_secs(5); + while a.secret_read.is_some() && Instant::now() < until { + a.poll_secret_read(); + std::thread::yield_now(); + } + assert!(a.secret_read.is_none(), "the read of the credential store never ended"); +} + +#[test] +fn the_client_secret_is_in_the_store_and_back_after_a_restart() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let id = own_account(&mut a); + a.set_client_secret(id, SECRET); + let key = MailApp::secret_key(OAUTH_CLIENT, a.session.mailbox.account(id).unwrap()); + assert_eq!(store.get(&key).as_deref(), Some(SECRET), "the client secret wasn't remembered"); + // A restart: the same mailbox, nothing in memory but what the store gives back. + let mailbox = a.session.mailbox.clone(); + let mut b = app(&store, Session::at(mailbox, NOW, 0)); + assert_eq!(b.client_secret_of(id), ""); + read_store(&mut b); + assert_eq!(b.client_secret_of(id), SECRET); +} + +#[test] +fn nothing_is_remembered_when_sign_ins_are_not() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + a.ui.remember_sign_in = false; + let id = own_account(&mut a); + a.set_client_secret(id, SECRET); + assert!(store.held.lock().unwrap().is_empty()); + // Still there for this session. + assert_eq!(a.client_secret_of(id), SECRET); +} + +/// A host that counts the sign-ins it is handed (and never answers them). +fn counting(a: &mut MailApp) -> Arc> { + let asked = Arc::new(Mutex::new(0)); + let count = asked.clone(); + a.services.sign_in = Some(Box::new(move |_req: SignInRequest| { + *count.lock().unwrap() += 1; + std::sync::mpsc::channel().1 + })); + asked +} + +#[test] +fn a_client_whose_secret_isnt_here_is_said_so_and_the_provider_never_asked() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let asked = counting(&mut a); + // As a file from a build that never stored the secret has it: it says there is one. + let id = own_account(&mut a); + let oauth = a.session.mailbox.account(id).unwrap().oauth.clone().unwrap(); + let error = a.begin_sign_in(id, oauth.clone(), "alice@example.org", "a-refresh-token".into(), false, false).unwrap_err(); + assert!(error.contains("client secret for alice@example.org isn't stored") && error.contains("Account Settings"), "{error}"); + assert_eq!(*asked.lock().unwrap(), 0, "the provider was asked without the secret"); + // While the credential store is still being read, that is what is said. + a.start_secret_read(false); + assert!(a.secret_read.is_some()); + let waiting = a.begin_sign_in(id, oauth.clone(), "alice@example.org", "a-refresh-token".into(), true, false).unwrap_err(); + assert!(waiting.contains("credential store"), "{waiting}"); + read_store(&mut a); + // Entered again: the sign-in goes ahead, with it. + a.set_client_secret(id, SECRET); + a.begin_sign_in(id, oauth, "alice@example.org", "a-refresh-token".into(), false, false).unwrap(); + assert_eq!(*asked.lock().unwrap(), 1); +} + +#[test] +fn a_public_client_needs_no_secret() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let asked = counting(&mut a); + let id = own_account(&mut a); + a.execute("account.edit", json!({"id": id, "hasSecret": false})).unwrap(); + let oauth = a.session.mailbox.account(id).unwrap().oauth.clone().unwrap(); + a.begin_sign_in(id, oauth, "alice@example.org", "a-refresh-token".into(), false, false).unwrap(); + assert_eq!(*asked.lock().unwrap(), 1); + assert!(a.session.sync_status.contains("browser"), "{}", a.session.sync_status); +} + +/// A client secret kept under settings that then change isn't left behind in the credential +/// store, where it would never be found again (#1844 review). +#[test] +fn a_secret_kept_under_settings_that_changed_is_taken_out_of_the_store() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let id = own_account(&mut a); + a.set_client_secret(id, SECRET); + let before = a.session.mailbox.account(id).cloned().unwrap(); + let old = MailApp::secret_key(OAUTH_CLIENT, &before); + assert!(store.get(&old).is_some()); + a.execute("account.edit", json!({"id": id, "tokenUrl": format!("{ISSUER}/other-token")})).unwrap(); + a.drop_stale_client_secret(&before); + assert!(store.get(&old).is_none(), "left behind under the old settings"); + // Unchanged settings keep it. + a.set_client_secret(id, SECRET); + let kept = a.session.mailbox.account(id).cloned().unwrap(); + a.execute("account.edit", json!({"id": id, "displayName": "Alice"})).unwrap(); + a.drop_stale_client_secret(&kept); + assert!(store.get(&MailApp::secret_key(OAUTH_CLIENT, &kept)).is_some()); +} + +/// Restoring a Microsoft or Google account's default OAuth settings takes away its own client id: +/// a refresh token held for the other client is let go of with it, so the next renewal doesn't +/// send it for the wrong client (#1844 review). +#[test] +fn restoring_the_default_oauth_settings_lets_go_of_the_sign_in_for_the_other_client() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let v = json!({"email": "ada@gmail.example", "incoming": {"host": "imap.gmail.com"}, "outgoing": {"host": "smtp.gmail.com"}, + "auth": "oauth2", "provider": "google", "clientId": "my-own-client.apps.example"}); + let id = a.execute("account.add", v).unwrap()["id"].as_u64().unwrap(); + let held = mailcraft_model::sync::Tokens { access: "access".into(), refresh: "refresh".into(), expires_at: NOW + 3_600, ..Default::default() }; + a.tokens.insert(id, held); + a.execute("account.oauthRestoreDefaults", json!({"id": id})).unwrap(); + assert!(a.tokens.get(&id).is_none_or(|t| t.refresh.is_empty()), "the refresh token for the other client is still held"); +} + +/// A client secret typed while setting up an account goes to it only when it was typed for the +/// settings the account has: one typed for a provider given up on since goes nowhere (#1844 +/// review). +#[test] +fn a_setup_secret_typed_for_other_settings_is_not_adopted() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let id = own_account(&mut a); + let mut other = a.session.mailbox.account(id).unwrap().oauth.clone().unwrap(); + other.token = "https://elsewhere.example.org/token".into(); + a.set_setup_client_secret(&other, SECRET); + let tokens = mailcraft_model::sync::Tokens { access: "access".into(), refresh: "refresh".into(), expires_at: NOW + 3_600, ..Default::default() }; + a.adopt_tokens(id, tokens.clone()); + assert_eq!(a.client_secret_of(id), ""); + assert!(!a.client_secrets.contains_key(&0), "the setup secret is let go of either way"); + assert!(store.get(&MailApp::secret_key(OAUTH_CLIENT, a.session.mailbox.account(id).unwrap())).is_none()); + // Typed for the settings it has: it is the account's. + let own = a.session.mailbox.account(id).unwrap().oauth.clone().unwrap(); + a.set_setup_client_secret(&own, SECRET); + a.adopt_tokens(id, tokens); + assert_eq!(a.client_secret_of(id), SECRET); +} + +/// A renewal after a refused token that the owner calls off lets go of its mark, so that the next +/// run may renew again: the answer that would have cleared it is never read (#1844 review). +#[test] +fn a_cancelled_renewal_after_a_refused_token_may_be_tried_again() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let id = own_account(&mut a); + let (_kept, rx) = std::sync::mpsc::channel(); + a.signing_in = Some(crate::SigningIn { + graph: false, + favorites: false, + quiet: true, + account: id, + snapshot: a.session.mailbox.account(id).cloned(), + shared: None, + sync: false, + browser: true, + opening: a.session.openings(), + rx, + cancel: Arc::new(std::sync::atomic::AtomicBool::new(false)), + }); + a.token_retried.insert(id); + a.execute("ui.cancelSignIn", json!({})).unwrap(); + assert!(!a.token_retried.contains(&id)); +} + +/// A renewal after a refused token that can't start (another account's sign-in is waiting) marks +/// nothing and ends nothing: the other account keeps its one retry, never a second (#1844 review). +#[test] +fn a_renewal_that_cant_start_leaves_another_accounts_retry_alone() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let first = own_account(&mut a); + let v = json!({"email": "bo@example.org", "incoming": {"host": "mail.example.org"}, "outgoing": {"host": "mail.example.org"}, + "auth": "oauth2", "provider": "custom", "clientId": "mailcraft", "issuer": ISSUER, + "authorizeUrl": format!("{ISSUER}/auth"), "tokenUrl": format!("{ISSUER}/token")}); + let second = a.execute("account.add", v).unwrap()["id"].as_u64().unwrap(); + let (_kept, rx) = std::sync::mpsc::channel(); + a.signing_in = Some(crate::SigningIn { + graph: false, + favorites: false, + quiet: true, + account: first, + snapshot: a.session.mailbox.account(first).cloned(), + shared: None, + sync: false, + browser: false, + opening: a.session.openings(), + rx, + cancel: Arc::new(std::sync::atomic::AtomicBool::new(false)), + }); + a.token_retried.insert(first); + a.tokens.insert(second, mailcraft_model::sync::Tokens { refresh: "not-a-real-refresh-token".into(), ..Default::default() }); + a.retry_refused_token(second, true); + assert!(a.token_retried.contains(&first), "the first account's retry was ended"); + assert!(!a.token_retried.contains(&second), "a renewal that never started was marked"); + // Nor when this build can't sign in at all. + a.signing_in = None; + a.retry_refused_token(second, true); + assert_eq!(a.token_retried.iter().copied().collect::>(), [first]); +} + +/// One run of `account` handed over to the window as it ends: refused (a sign-in error) or not, +/// called off to go on at once or not. +fn end_run(a: &mut MailApp, account: Id, refused: bool, called_off: bool) { + let (tx, rx) = std::sync::mpsc::channel(); + let email = a.session.mailbox.account(account).unwrap().email.clone(); + let errors = if refused { vec!["The server refused the sign-in".to_string()] } else { Vec::new() }; + tx.send(mailcraft_model::sync::SyncResult { account, email, errors, ..Default::default() }).unwrap(); + a.sync_run = Some((account, None, called_off, true)); + a.sync_rx = Some(crate::MailRun::Imap { account, opening: a.session.openings(), rx }); + a.poll_sync(); + assert!(a.sync_rx.is_none(), "the run didn't end"); +} + +/// A run after a renewal that is called off to go on at once is the same Send/Receive: it keeps +/// the account's one retry, so a refusal in the run that goes on renews no second time. The run +/// that goes on ends it, and a Send/Receive called off before it went on leaves none behind +/// (#1844 review). +#[test] +fn a_run_called_off_to_go_on_keeps_its_one_retry() { + let store = Arc::new(Store::default()); + let mut a = app(&store, Session::at(mailcraft_engine::sample::mailbox(NOW, 0), NOW, 0)); + let id = own_account(&mut a); + a.tokens.insert( + id, + mailcraft_model::sync::Tokens { access: "not-a-real-access-token".into(), refresh: "not-a-real-refresh-token".into(), ..Default::default() }, + ); + a.token_retried.insert(id); + end_run(&mut a, id, true, true); + assert!(a.token_retried.contains(&id), "the retry was let go of while the run goes on"); + // The run that goes on has a token to go with, so it starts no second renewal. + assert_eq!(a.tokens[&id].access, "not-a-real-access-token", "the run that goes on would renew again"); + assert_eq!(a.session.driver.round.queue.front().copied(), Some((id, true)), "the run doesn't go on"); + assert!(a.signing_in.is_none(), "renewed a second time in the same Send/Receive"); + // The run that goes on is refused again: no renewal, and the mark ends with it. + a.session.driver.round.queue.clear(); + end_run(&mut a, id, true, false); + assert!(!a.token_retried.contains(&id)); + assert!(a.signing_in.is_none(), "renewed a second time in the same Send/Receive"); + assert!(a.tokens[&id].access.is_empty(), "the refused token was kept for the next Send/Receive"); + // Called off to go on, then the Send/Receive is stopped while it waits its turn behind + // another account's run: the next one may renew again. + a.token_retried.insert(id); + end_run(&mut a, id, false, true); + assert!(a.token_retried.contains(&id)); + let other = a.session.mailbox.accounts.iter().map(|x| x.id).find(|x| *x != id).unwrap(); + let (_tx, rx) = std::sync::mpsc::channel(); + a.sync_run = Some((other, None, false, true)); + a.sync_rx = Some(crate::MailRun::Imap { account: other, opening: a.session.openings(), rx }); + a.execute("ui.cancelSync", json!({})).unwrap(); + assert!(!a.token_retried.contains(&id), "a run that never went on kept its mark"); +} diff --git a/crates/ui-egui/src/google_credential_security_tests.rs b/crates/ui-egui/src/google_credential_security_tests.rs index 88e1322000..5631ae247e 100644 --- a/crates/ui-egui/src/google_credential_security_tests.rs +++ b/crates/ui-egui/src/google_credential_security_tests.rs @@ -601,7 +601,7 @@ fn google_security_microsoft_command_skips_google_by_default() { assert_eq!(requests[0].account, microsoft); assert_eq!(requests[0].oauth.provider, mailcraft_model::OAuthProvider::Microsoft); assert!(requests[0].graph); - assert!(requests[0].google_client_secret.is_empty()); + assert!(requests[0].client_secret.is_empty()); } /// Reject Google's explicit id without asking the host or store, even while Google is signing in. @@ -682,7 +682,7 @@ fn google_security_microsoft_command_accepts_explicit_microsoft_accounts() { assert_eq!(requests[0].mail_write, graph_mail); assert!(!requests[0].quiet); assert!(requests[0].refresh.is_empty()); - assert!(requests[0].google_client_secret.is_empty()); + assert!(requests[0].client_secret.is_empty()); assert!(a.signing_in.as_ref().unwrap().browser); } } diff --git a/crates/ui-egui/src/idle_watch.rs b/crates/ui-egui/src/idle_watch.rs index 13f722d0b1..0f67679fbc 100644 --- a/crates/ui-egui/src/idle_watch.rs +++ b/crates/ui-egui/src/idle_watch.rs @@ -196,7 +196,7 @@ impl MailApp { let a = self.session.mailbox.account(account)?; let mut request = SyncRequest { account: a.clone(), ..Default::default() }; if a.oauth.is_some() { - let token = self.tokens.get(&account).filter(|t| t.fresh(mailcraft_time::now() + 600))?; + let token = self.tokens.get(&account).filter(|t| t.fresh_for(mailcraft_time::now(), 600))?; request.access_token = token.access.clone(); } else { request.password = self.passwords.get(&account).filter(|p| !p.is_empty())?.clone(); diff --git a/crates/ui-egui/src/inbox_pass.rs b/crates/ui-egui/src/inbox_pass.rs index ba75ba58f5..8b6688c4c4 100644 --- a/crates/ui-egui/src/inbox_pass.rs +++ b/crates/ui-egui/src/inbox_pass.rs @@ -207,7 +207,7 @@ impl MailApp { // A check every minute goes with the token it had a minute ago while that is still good, // as the calendar's job does: one request, not two. let access = if check { - self.graph_tokens.get(&account).filter(|t| t.fresh(mailcraft_time::now() + 60)).map(|t| t.access.clone()).unwrap_or_default() + self.graph_tokens.get(&account).filter(|t| t.fresh_for(mailcraft_time::now(), 60)).map(|t| t.access.clone()).unwrap_or_default() } else { String::new() }; diff --git a/crates/ui-egui/src/jobs.rs b/crates/ui-egui/src/jobs.rs index 2da23c0e96..717f83246c 100644 --- a/crates/ui-egui/src/jobs.rs +++ b/crates/ui-egui/src/jobs.rs @@ -145,6 +145,7 @@ impl MailApp { self.session.driver.round.queue.clear(); self.session.driver.round.inbox_queue.clear(); self.session.driver.round.push_only_next.clear(); + self.token_retried.clear(); self.shared_checking.clear(); self.session.sync_progress = Default::default(); self.session.sync_status.clear(); diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 2acaf4eabb..9069b8aaca 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -87,6 +87,8 @@ pub mod chrome; mod clicks; #[cfg(test)] mod clicks_tests; +#[cfg(test)] +mod client_secret_store_tests; pub mod close_to_tray; #[cfg(test)] mod close_to_tray_tests; @@ -470,6 +472,14 @@ pub struct Services { /// records, RFC 6186, #1063; what it publishes for mail programs; Mozilla's ISP database, /// #1112), for the owner to confirm. Only the domain is given, never the mailbox name. pub discover: Option Receiver>>>, + /// Desktop: find an own identity provider's sign-in, token and revocation addresses from its + /// issuer, on a background thread (OpenID Connect Discovery, RFC 8414). Only the issuer's + /// address goes out; only when the owner presses Discover. + pub oauth_discover: Option Receiver>>>, + /// Desktop: give an own identity provider a refresh token back (RFC 7009) on a thread of its + /// own, with the account's sign-in settings and its client secret (empty for none), when the + /// account is removed. Best effort: nothing waits for it, and nothing it says is shown. + pub revoke_sign_in: Option>, /// Desktop: ask the DNS, on a background thread, for the hosts a domain names for /// Autodiscover (its `_autodiscover._tcp` SRV record and the alias of `autodiscover.`), /// so account setup can tell an address on an Exchange server from one on an IMAP server. @@ -814,6 +824,26 @@ pub trait PictureCache { fn clear(&self) -> Result<(), String>; } +/// What an own identity provider says of itself ([`Services::oauth_discover`]). +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct OAuthFound { + pub authorize: String, + pub token: String, + /// Empty when it names none. + pub revoke: String, + /// The hosts of those addresses outside the issuer's own domain, for the owner to agree to. + pub outside: Vec, + /// It says it hands out no refresh tokens: the owner signs in again each time a token runs out. + pub no_refresh: bool, + /// How it takes a client secret (RFC 6749 §2.3.1): in the header unless it lists only the form. + pub client_auth: mailcraft_model::ClientAuth, + /// It says its page names itself when it sends the owner back (RFC 9207). + pub issuer_in_response: bool, + /// Which of the standard scopes it is asked for: `None` for all of them, else those it lists + /// ([`mailcraft_model::oauth::base_scopes_for`]). + pub base_scopes: Option, +} + /// What the host needs to sign an account's owner in ([`Services::sign_in`]). A sign-in on the /// provider's page that ends without tokens in one of the ways the window has something of its /// own to say about is answered with exactly [`approval::NEEDS_APPROVAL`], @@ -828,9 +858,11 @@ pub struct SignInRequest { pub email: String, /// A refresh token from earlier in this session to try first; empty when there is none. pub refresh: String, - /// Google Desktop registration's installed-app secret for this one sign-in. Never stored - /// in a mailbox or passed to an IMAP/SMTP server; not an owner credential. - pub google_client_secret: String, + /// The client secret for this one sign-in: Google Desktop registration's installed-app + /// secret, or the one registered at an own identity provider (from the system's credential + /// store, or typed this session); empty for none. Sent to the provider's token address alone; + /// never stored in a mailbox or passed to an IMAP/SMTP server. + pub client_secret: String, /// Set when the owner gives up waiting, for the host to stop too. pub cancel: std::sync::Arc, /// Nobody asked for this (a Send/Receive that started by itself): renew with the refresh @@ -1718,6 +1750,11 @@ pub struct MailApp { /// What the credential store gave back for each key this session, read in the background /// ([`secret_read`]); only what was found. The window asks this, never the store. secret_cache: std::collections::HashMap, + /// The client secrets typed this session for accounts that sign in with an own identity + /// provider (0: the account being set up), each with the settings it was typed for + /// ([`mailcraft_model::OAuth::binding`]): used only with those, never with a provider's + /// changed settings (#1844 review). Never saved; redacted from `Debug`. + pub(crate) client_secrets: std::collections::HashMap, /// The background read of the store under way, with the opening it was started for. secret_read: Option<(u64, std::sync::mpsc::Receiver)>, /// The opening, and whether remembering was on, when the store was last read by itself. @@ -1827,6 +1864,10 @@ pub struct MailApp { sync_run: Option<(Id, Option, bool, bool)>, /// A piece of the run in flight said the server refused the sign-in. sync_refused: bool, + /// The accounts whose access token a server refused during a run, renewed and tried once more + /// in the same Send/Receive: a second refusal waits for the next one, never a third try. Each + /// account's own: another account's renewal neither replaces nor ends it (#1844 review). + token_retried: std::collections::HashSet, /// The password the run in flight went with, until the system is asked to remember it: once /// a run (#802). sync_password: Option, @@ -2073,6 +2114,7 @@ impl MailApp { ews_certificate: Default::default(), secrets_opening: 0, secret_cache: Default::default(), + client_secrets: Default::default(), secret_read: None, secrets_asked: None, sync_after_secrets: Vec::new(), @@ -2119,6 +2161,7 @@ impl MailApp { sync_totals: Default::default(), sync_run: None, sync_refused: false, + token_retried: Default::default(), sync_password: None, jmap_refused: Default::default(), control_rx: None, @@ -2628,7 +2671,8 @@ impl MailApp { } else { None }; - let edited = if matches!(id, "account.edit" | "account.davSet" | "account.davOff" | "account.graphSwitch") { + // (Restoring the default OAuth settings may change the client a sign-in is for, #1844 review.) + let edited = if matches!(id, "account.edit" | "account.oauthRestoreDefaults" | "account.davSet" | "account.davOff" | "account.graphSwitch") { // (`account.graphSwitch` names its account `account`.) let key = if id == "account.graphSwitch" { "account" } else { "id" }; params.get(key).and_then(Value::as_u64).and_then(|a| self.session.mailbox.account(a)).cloned() @@ -2708,6 +2752,9 @@ impl MailApp { self.graph_tokens.remove(&account); self.passwords.remove(&account); self.dav_passwords.retain(|(id, _), _| *id != account); + // An own identity provider is given its refresh token back, when it says where + // (RFC 7009): on a thread of the host's, best effort; it is forgotten here either way. + self.revoke_own_sign_in(&gone); self.tokens.remove(&account); self.jmap_refused.remove(&account); self.ews_unreadable.remove(&account); @@ -3157,6 +3204,7 @@ impl MailApp { self.pause_fetch(); self.session.driver.round.queue.clear(); self.session.driver.round.inbox_queue.clear(); + self.forget_retries_not_under_way(); // (Nor does a run called off for something else go on after.) if let Some((_, _, called_off, _)) = self.sync_run.as_mut() { *called_off = false; @@ -3181,6 +3229,9 @@ impl MailApp { Some(s) => { s.cancel.store(true, std::sync::atomic::Ordering::Relaxed); self.session.sync_status = tl!("Sign-in cancelled").to_string(); + // A renewal after a refused token that was called off: the next run may try + // again (its answer, which would have said so, is never read now, #1844 review). + self.token_retried.remove(&s.account); // The one page for an older sign-in: what waited for it takes it as a no (not // put again by itself), and a shared mailbox being added is taken off again // with the reason, not left checking. @@ -3266,8 +3317,8 @@ impl MailApp { && Self::secret_key("refresh", before) == Self::secret_key("refresh", after) && before.incoming.as_ref().map(|s| s.security) == after.incoming.as_ref().map(|s| s.security) && before.outgoing.as_ref().map(|s| s.security) == after.outgoing.as_ref().map(|s| s.security) - && before.oauth.as_ref().map(|o| (o.provider, o.client_id.as_str(), o.tenant.as_str())) - == after.oauth.as_ref().map(|o| (o.provider, o.client_id.as_str(), o.tenant.as_str())) + && before.oauth.as_ref().map(|o| (o.provider, o.client_id.as_str(), o.tenant.as_str(), o.binding())) + == after.oauth.as_ref().map(|o| (o.provider, o.client_id.as_str(), o.tenant.as_str(), o.binding())) } /// Stop only this account's pending sign-in and remove its waiting text. @@ -3277,6 +3328,7 @@ impl MailApp { { pending.cancel.store(true, std::sync::atomic::Ordering::Relaxed); self.session.sync_status.clear(); + self.token_retried.remove(&account); } } @@ -3469,7 +3521,7 @@ impl MailApp { /// account `account` of this mailbox, with the servers it has now: that account's own, never /// one found by its address (another may have it too, with other servers, AU3-03). fn remembered(&self, kind: &str, account: Id) -> Option { - if !matches!(kind, "password" | "refresh") || !self.ui.remember_sign_in || self.unconfirmed { + if !matches!(kind, "password" | "refresh" | mailcraft_host::secrets::OAUTH_CLIENT) || !self.ui.remember_sign_in || self.unconfirmed { return None; } let a = self.session.mailbox.account(account)?; @@ -3481,7 +3533,14 @@ impl MailApp { /// Have the operating system remember a secret for the account `account`, when the owner /// wants that: under that account's own name. fn remember(&mut self, kind: &str, account: Id, secret: &str) { - if !matches!(kind, "password" | "refresh") || !self.ui.remember_sign_in || secret.is_empty() || self.data_removed || self.unconfirmed { + // (The client secret too: without it a confidential client's refresh fails after a + // restart, though the sign-in it renews worked.) + if !matches!(kind, "password" | "refresh" | mailcraft_host::secrets::OAUTH_CLIENT) + || !self.ui.remember_sign_in + || secret.is_empty() + || self.data_removed + || self.unconfirmed + { return; } let Some(account) = self.session.mailbox.account(account) else { return }; @@ -3516,7 +3575,7 @@ impl MailApp { pub(crate) fn forget_every_secret(&mut self) -> Vec { let mut keys: Vec = std::mem::take(&mut self.ui.remembered_keys); for a in &self.session.mailbox.accounts { - for kind in ["password", "refresh"] { + for kind in ["password", "refresh", mailcraft_host::secrets::OAUTH_CLIENT] { keys.extend(Self::secret_keys_of(kind, a)); } keys.extend(Self::dav_secret_keys(a)); @@ -3573,7 +3632,8 @@ impl MailApp { let Some(store) = &self.services.secrets else { return }; let mut gone = Vec::new(); let dav = if with_dav { Self::dav_secret_keys(a) } else { Vec::new() }; - let named = ["password", "refresh"].into_iter().flat_map(|kind| Self::secret_keys_of(kind, a)).chain(dav); + let named = + ["password", "refresh", mailcraft_host::secrets::OAUTH_CLIENT].into_iter().flat_map(|kind| Self::secret_keys_of(kind, a)).chain(dav); for key in named { store.delete(&key); if store.get(&key).is_none() { @@ -3624,6 +3684,114 @@ impl MailApp { ) } + /// The client secret of `account` (0 for the one being set up): [`Self::client_secret_for`] + /// the account, or what was typed for the one being set up. For tests: the window asks with + /// the account, or the settings, in hand. + #[cfg(test)] + pub(crate) fn client_secret_of(&self, account: Id) -> String { + match self.session.mailbox.account(account) { + Some(a) => self.client_secret_for(a), + None => self.typed_client_secret(account, None), + } + } + + /// The client secret of the account `a` (one being removed, say), an account that signs in with + /// an own identity provider: typed this session for its settings as they are, else what the + /// credential store gave back under them; empty for none. + pub(crate) fn client_secret_for(&self, a: &mailcraft_model::Account) -> String { + let typed = self.typed_client_secret(a.id, a.oauth.as_ref()); + if !typed.is_empty() { + return typed; + } + if !a.oauth.as_ref().is_some_and(|o| o.has_secret) { + return String::new(); + } + self.secret_cache.get(&Self::secret_key(mailcraft_host::secrets::OAUTH_CLIENT, a)).cloned().unwrap_or_default() + } + + /// The client secret typed this session for `account`, when it was typed for `oauth` as it + /// is (any, when `None`); else empty. + fn typed_client_secret(&self, account: Id, oauth: Option<&mailcraft_model::OAuth>) -> String { + match self.client_secrets.get(&account) { + Some((bound, secret)) if oauth.is_none_or(|o| o.binding() == *bound) => secret.clone(), + _ => String::new(), + } + } + + /// Keep `secret`, typed for the account being set up with the settings `oauth`; an empty one + /// forgets any (#1844 review: a secret typed for one provider never goes to another). + pub(crate) fn set_setup_client_secret(&mut self, oauth: &mailcraft_model::OAuth, secret: &str) { + if secret.is_empty() { + self.client_secrets.remove(&0); + } else { + self.client_secrets.insert(0, (oauth.binding(), secret.to_string())); + } + } + + /// Keep the client secret the owner typed for `account` (0 for the one being set up): in + /// memory for the session, and in the credential store when sign-ins are remembered. An empty + /// one forgets it. + pub(crate) fn set_client_secret(&mut self, account: Id, secret: &str) { + if secret.is_empty() { + self.client_secrets.remove(&account); + if let Some(a) = self.session.mailbox.account(account).cloned() { + let keys = Self::secret_keys_of(mailcraft_host::secrets::OAUTH_CLIENT, &a); + for key in &keys { + self.secret_cache.remove(key); + } + if let Some(store) = &self.services.secrets { + for key in keys { + store.delete(&key); + } + } + } + return; + } + let bound = self.session.mailbox.account(account).and_then(|a| a.oauth.as_ref()).map(mailcraft_model::OAuth::binding).unwrap_or_default(); + self.client_secrets.insert(account, (bound, secret.to_string())); + if account != 0 { + self.remember(mailcraft_host::secrets::OAUTH_CLIENT, account, secret); + } + } + + /// Forget, in the credential store, the client secret kept for `before` (the account as it was + /// before its settings were saved) under names it no longer has: its own provider's settings + /// changed, or it signs in otherwise now. A secret is kept under the settings it is for, so + /// one under old settings would never be found again, only left behind (#1844 review). + pub(crate) fn drop_stale_client_secret(&mut self, before: &mailcraft_model::Account) { + if !before.oauth.as_ref().is_some_and(|o| o.provider == mailcraft_model::OAuthProvider::Custom && o.has_secret) { + return; + } + let now = self.session.mailbox.account(before.id).map(|a| Self::secret_keys_of(mailcraft_host::secrets::OAUTH_CLIENT, a)).unwrap_or_default(); + let stale: Vec = + Self::secret_keys_of(mailcraft_host::secrets::OAUTH_CLIENT, before).into_iter().filter(|k| !now.contains(k)).collect(); + for key in &stale { + self.secret_cache.remove(key); + } + if let Some(store) = &self.services.secrets { + for key in stale { + store.delete(&key); + } + } + } + + /// Hand an own identity provider's refresh token for `gone`, an account being removed, to the + /// host to give back (`Services::revoke_sign_in`), with its client secret. Nothing when it + /// names nowhere to give it back, or there is none. + fn revoke_own_sign_in(&mut self, gone: &mailcraft_model::Account) { + let Some(oauth) = gone.oauth.clone().filter(|o| o.provider == mailcraft_model::OAuthProvider::Custom && !o.revoke.trim().is_empty()) else { + return; + }; + let kept = self.tokens.get(&gone.id).map(|t| t.refresh.clone()).filter(|r| !r.is_empty()); + let refresh = kept.or_else(|| self.secret_cache.get(&Self::secret_key("refresh", gone)).cloned()).unwrap_or_default(); + // (Read through `gone`: the account is no longer in the mailbox, #1844 review.) + let secret = self.client_secret_for(gone); + self.client_secrets.remove(&gone.id); + if let (false, Some(revoke)) = (refresh.is_empty(), self.services.revoke_sign_in.as_ref()) { + revoke(oauth, secret, refresh); + } + } + /// The host's Desktop registration value. UI preferences never supply or retain it. pub(crate) fn google_client_secret(&self) -> &str { &self.services.google_client_secret @@ -3666,15 +3834,41 @@ impl MailApp { }; let cancel = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(false)); let browser = refresh.is_empty(); - let waiting = if browser { tl!("Sign in on the page that opened in your browser…") } else { tl!("Renewing the sign-in…") }; - let google_client_secret = - if oauth.provider == mailcraft_model::OAuthProvider::Google { self.google_client_secret().to_string() } else { String::new() }; + // (A renewal the provider refuses goes on to its page when the owner asked for the run: + // the words say so, so that a wait for the browser never looks like a renewal stuck.) + let waiting = if browser { + tl!("Sign in on the page that opened in your browser…") + } else if quiet { + tl!("Renewing the sign-in…") + } else { + tl!("Renewing the sign-in… If it can't be renewed, sign in on the page that opens in your browser.") + }; + let client_secret = match oauth.provider { + mailcraft_model::OAuthProvider::Google => self.google_client_secret().to_string(), + mailcraft_model::OAuthProvider::Custom => match self.session.mailbox.account(account) { + Some(a) => self.client_secret_for(a), + // (The account being set up: typed for these very settings, or none.) + None => self.typed_client_secret(account, Some(&oauth)), + }, + mailcraft_model::OAuthProvider::Microsoft => String::new(), + }; + // An own provider's client that has a secret, with none here: asking the provider without + // it only brings back a refusal that blames the client id. Said as it is instead. + if oauth.provider == mailcraft_model::OAuthProvider::Custom && oauth.has_secret && client_secret.is_empty() { + if self.secret_read.is_some() { + return Err(tl!("Waiting for the system's credential store…").to_string()); + } + return Err(i18n::fmt( + tl!("The client secret for {account} isn't stored on this computer: enter it again in Account Settings (File › Info)"), + &[("account", email)], + )); + } let request = SignInRequest { account, oauth: self.effective_oauth(oauth), email: email.to_string(), refresh, - google_client_secret, + client_secret, cancel: cancel.clone(), quiet, graph, @@ -3721,6 +3915,21 @@ impl MailApp { if self.signed_in_as_other(account, &tokens) { return; } + // The client secret typed while it was set up is the account's now, if it was typed for + // the settings the account has: one typed for other settings (a provider given up on + // since) goes nowhere (#1844 review). + let settings = self + .session + .mailbox + .account(account) + .and_then(|a| a.oauth.as_ref()) + .filter(|o| o.provider == mailcraft_model::OAuthProvider::Custom) + .map(mailcraft_model::OAuth::binding); + if let Some((bound, secret)) = self.client_secrets.remove(&0) + && settings.is_some_and(|settings| settings == bound) + { + self.set_client_secret(account, &secret); + } self.remember("refresh", account, &tokens.refresh); self.note_directory(account, &tokens.tenant); self.tokens.insert(account, tokens); @@ -3871,7 +4080,16 @@ impl MailApp { // Good for the whole run: Microsoft ends an IMAP session the moment its token runs // out, folders still to go. ponytail: ten minutes covers a run; a longer first // download still meets the end, and the next run renews. - match self.tokens.get(&account).filter(|t| t.fresh(mailcraft_time::now() + 600)).map(|t| t.access.clone()) { + // (A run that goes on after its Send/Receive already renewed once goes with the token + // it has, refused or not: a second refusal waits for the next Send/Receive, #1844 + // review.) + let retried = self.token_retried.contains(&account); + match self + .tokens + .get(&account) + .filter(|t| t.fresh_for(mailcraft_time::now(), 600) || (retried && !t.access.is_empty())) + .map(|t| t.access.clone()) + { Some(access) => request.access_token = access, None => { self.begin_sign_in(account, oauth, &address, refresh, quiet, false)?; @@ -3984,7 +4202,7 @@ impl MailApp { // Nobody asked for this run: no page is put in front of the owner. Ok(MailStart::Quiet { address }) => return Err(i18n::fmt(tl!("Use Send/Receive to sign in to {address}"), &[("address", &address)])), Ok(MailStart::SignIn { oauth, address }) => { - self.begin_sign_in(account, oauth, &address, String::new(), false, true)?; + self.begin_sign_in(account, *oauth, &address, String::new(), false, true)?; return Ok(json!({"pending": "signIn", "account": account})); } Err(MailRefusal::AccountGone) => return Err(tl!("The account is gone").to_string()), @@ -4104,6 +4322,8 @@ impl MailApp { self.tokens.clear(); self.graph_tokens.clear(); self.jmap_refused.clear(); + // (Typed for the old mailbox's accounts, whose ids another mailbox may reuse.) + self.client_secrets.clear(); self.jmap_send_asks.clear(); self.ews_unreadable.clear(); self.ews_signed_in.clear(); @@ -4693,7 +4913,10 @@ impl MailApp { Ok(tokens) => { self.remember("refresh", account, &tokens.refresh); self.tokens.insert(account, tokens); - if let Err(e) = self.start_sync(&json!({"account": account})) { + // (A renewal nobody asked for goes on as quietly as it began: no page opens for + // the run after it, #1844 review.) + if let Err(e) = self.start_sync(&json!({"account": account, "quiet": !asked_for})) { + self.token_retried.remove(&account); self.session.sync_status.clear(); self.status(e); } @@ -4713,6 +4936,8 @@ impl MailApp { // merely because the sign-in window was closed or the network failed. tokens.access.clear(); } + // A renewal after a refused token that came to nothing: the next run may try again. + self.token_retried.remove(&account); self.session.sync_status.clear(); self.note_sync_problems(account, std::slice::from_ref(&e), false); self.sign_in_came_to_nothing(account, &e, asked_for); @@ -4720,6 +4945,32 @@ impl MailApp { } } + /// A server refused an account's access token during a run (it ran out early, or the provider + /// revoked it): the token is renewed with the refresh token at once and the run goes again, + /// once, rather than leaving the mail for the next Send/Receive. Only for an account that + /// signs in on a provider's page and has a refresh token to renew with; a run nobody asked + /// for never opens the browser for it (a renewal refused then waits for the owner). + fn retry_refused_token(&mut self, account: Id, quiet: bool) { + let Some(a) = self.session.mailbox.account(account) else { return }; + let Some(oauth) = a.oauth.clone() else { return }; + let address = a.email.clone(); + let kept = self.tokens.get(&account).map(|t| t.refresh.clone()).filter(|r| !r.is_empty()); + let Some(refresh) = kept.or_else(|| self.remembered("refresh", account)) else { return }; + if self.sync_rx.is_some() || self.graph_rx.is_some() || self.offline() { + return; + } + log::info!("send/receive: the server refused the access token; renewing it and trying once more"); + // (Marked only once the renewal is on its way, and only for this account: one that + // can't start, another account's sign-in waiting, say, leaves every other account's mark + // as it was. Its words are not logged: they may name the address, #1844 review.) + match self.begin_sign_in(account, oauth, &address, refresh, quiet, false) { + Ok(()) => { + self.token_retried.insert(account); + } + Err(_) => log::warn!("send/receive: the renewal after a refused token didn't start"), + } + } + /// A sign-in of an account that exists (to its mail, or for its calendar and contacts) /// brought no tokens: `error` says why, in the status bar. When it is that an administrator /// of the organisation has to approve MailCraft first, and the owner had asked for the @@ -4864,6 +5115,15 @@ impl MailApp { imap.or(graph).or_else(|| self.signing_in.as_ref().filter(|s| !s.graph && !s.favorites).map(|s| s.account)) } + /// The Send/Receive that waited is called off: a mark for a renewal after a refused token is + /// kept only for the account whose run or renewal is still under way (its end lets go of it). + /// One whose run was called off to go on, and now never does, may renew again next time. + pub(crate) fn forget_retries_not_under_way(&mut self) { + let running = self.sync_running_account(); + let renewing = self.signing_in.as_ref().map(|s| s.account); + self.token_retried.retain(|a| Some(*a) == running || Some(*a) == renewing); + } + /// Skip: leave an account that waits its turn out of the run under way. fn skip_sync(&mut self, p: &Value) -> Result { use mailcraft_engine::cmd::sync_progress::RunState; @@ -4876,6 +5136,8 @@ impl MailApp { if !self.session.driver.round.skip(account) { return Err(i18n::fmt(tl!("{name} isn't waiting its turn in a Send/Receive"), &[("name", &name)])); } + // (A run called off after a renewal that was to go on doesn't now: the next one may renew.) + self.token_retried.remove(&account); self.session.sync_progress.skip(account); Ok(json!({"skipped": account})) } @@ -5012,11 +5274,19 @@ impl MailApp { self.session.send_run_answered(account); // Called off so that what the owner did could go out: the next run starts at once, // tells the server first, and carries on bringing mail down. - if let Some((whose, _, true, quiet)) = self.sync_run.take() { + let run = self.sync_run.take(); + let called_off = matches!(run, Some((_, _, true, _))); + if let Some((whose, _, true, quiet)) = run { self.session.driver.round.queue.push_front((whose, quiet)); } + let quiet = run.is_none_or(|(_, _, _, quiet)| quiet); + // (Only this account's run ends the one retry it had: another account's leaves it, + // #1844 review. A run called off to go on at once keeps it: the run that goes on is + // the same Send/Receive, and a second refusal there waits for the next one.) + let retried = if called_off { self.token_retried.contains(&account) } else { self.token_retried.remove(&account) }; let totals = std::mem::take(&mut self.sync_totals); - if std::mem::take(&mut self.sync_refused) { + let refused = std::mem::take(&mut self.sync_refused); + if refused { // Forget the password so the next try asks again, and the access token so the // next try renews it (the refresh token stays for that). self.passwords.remove(&account); @@ -5025,7 +5295,11 @@ impl MailApp { store.delete(&key); self.secret_cache.remove(&key); } - if let Some(tokens) = self.tokens.get_mut(&account) { + // (Kept for a run called off to go on after this Send/Receive's one renewal: the + // run that goes on uses it rather than renewing a second time, #1844 review.) + if !(called_off && retried) + && let Some(tokens) = self.tokens.get_mut(&account) + { tokens.access.clear(); } } else if totals.errors.is_empty() { @@ -5042,6 +5316,10 @@ impl MailApp { self.status(summary); self.note_pushed(account); self.graph_switch_after_sync(account, totals.errors.is_empty() && !totals.stopped); + // (Not after the owner stopped the run.) + if refused && !retried && !called_off && !totals.stopped { + self.retry_refused_token(account, quiet); + } return; } } diff --git a/crates/ui-egui/src/secret_read.rs b/crates/ui-egui/src/secret_read.rs index 2ba5555a6b..8be1e02619 100644 --- a/crates/ui-egui/src/secret_read.rs +++ b/crates/ui-egui/src/secret_read.rs @@ -94,6 +94,14 @@ impl MailApp { }) }) .collect(); + // The client secret of an account that signs in with an own identity provider and has one. + let clients = self + .session + .mailbox + .accounts + .iter() + .filter(|a| a.oauth.as_ref().is_some_and(|o| o.has_secret && o.provider == mailcraft_model::OAuthProvider::Custom)); + asks.extend(clients.map(|a| Ask { key: Self::secret_key(mailcraft_host::secrets::OAUTH_CLIENT, a), old: None })); // The addresses of the calendars subscribed to, which may hold a secret (#209): kept like a password. let subscribed = self .session @@ -192,9 +200,14 @@ impl MailApp { if a.kind == mailcraft_model::AccountKind::Jmap { return false; } - if a.oauth.is_some() { + if let Some(oauth) = &a.oauth { let kept = self.tokens.get(&account).or(self.graph_tokens.get(&account)).is_some_and(|t| !t.refresh.is_empty()); - !kept && !self.secret_cache.contains_key(&Self::secret_key("refresh", a)) + // An own provider's client secret is asked for too: a refresh token alone can't be used. + let client_missing = oauth.provider == mailcraft_model::OAuthProvider::Custom + && oauth.has_secret + && !self.client_secrets.contains_key(&account) + && !self.secret_cache.contains_key(&Self::secret_key(mailcraft_host::secrets::OAUTH_CLIENT, a)); + client_missing || !kept && !self.secret_cache.contains_key(&Self::secret_key("refresh", a)) } else { !self.passwords.contains_key(&account) && !self.secret_cache.contains_key(&Self::secret_key("password", a)) } diff --git a/crates/ui-egui/src/secrets_binding_tests.rs b/crates/ui-egui/src/secrets_binding_tests.rs index f8f4e1e495..2547fbfb27 100644 --- a/crates/ui-egui/src/secrets_binding_tests.rs +++ b/crates/ui-egui/src/secrets_binding_tests.rs @@ -353,8 +353,13 @@ fn the_secret_cache_and_the_old_names_are_used_only_where_they_are_listed() { let allowed: &[(&str, &str, usize)] = &[ ("lib.rs", "legacy_secret_key(", 2), ("secret_read.rs", "legacy_secret_key(", 1), - ("lib.rs", "secret_cache.get(", 2), - ("secret_read.rs", "secret_cache.contains_key(", 2), + // (And the client secret of an account with its own identity provider, read where a + // sign-in is handed to the host, `client_secret_of`; and its refresh token, given back + // to the provider when the account is removed, `revoke_own_sign_in`.) + ("lib.rs", "secret_cache.get(", 4), + // (Whether the read brought the refresh token, the password, and an own identity + // provider's client secret, by the account's own names, `store_may_know`.) + ("secret_read.rs", "secret_cache.contains_key(", 3), // A subscribed calendar's address is kept like a password (#209): found again by the name // that holds its host (`subscribed_address`), and moved into memory for the session when // remembering is switched off (`keep_read_subscription_addresses`): two reads. diff --git a/crates/ui-egui/src/send_receive.rs b/crates/ui-egui/src/send_receive.rs index 3941f3c734..1c831d7f0b 100644 --- a/crates/ui-egui/src/send_receive.rs +++ b/crates/ui-egui/src/send_receive.rs @@ -81,6 +81,7 @@ fn went_offline(app: &mut MailApp) { } app.session.driver.round.queue.clear(); app.session.driver.round.inbox_queue.clear(); + app.forget_retries_not_under_way(); app.pause_fetch(); // (A sender's image being looked up stops before its next request; none is kept.) app.sender_images = crate::sender_images::SenderImages::default(); diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index e40a849463..4876ce131e 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -692,16 +692,37 @@ fn send_receive_signs_in_first_for_an_account_without_a_password() { a.poll_sync(); assert_eq!((asked.lock().unwrap().len(), synced.lock().unwrap().len()), (1, 2)); - // The server refuses the token: the next run renews it with the refresh token. + // The server refuses the token: the same Send/Receive renews it with the refresh token and + // goes again, nobody having to press anything. refuse.store(true, Ordering::Relaxed); a.execute("ui.sync", json!({"account": id})).unwrap(); + refuse.store(false, Ordering::Relaxed); + *answer.lock().unwrap() = Some(good("tok-2")); + a.poll_sync(); + assert!(a.signing_in(), "the refused token is renewed at once"); + a.poll_sign_in(); + assert!(a.syncing(), "and the run goes again"); + a.poll_sync(); + assert_eq!(asked.lock().unwrap().last().unwrap().1, "ref-1"); + assert_eq!(synced.lock().unwrap().last().unwrap().0, "tok-2"); + assert!(!a.signing_in() && !a.syncing()); + + // Refused again with the renewed token: tried once more, never in a loop; the next + // Send/Receive renews it. + let (signs, runs) = (asked.lock().unwrap().len(), synced.lock().unwrap().len()); + refuse.store(true, Ordering::Relaxed); + *answer.lock().unwrap() = Some(good("tok-x")); + a.execute("ui.sync", json!({"account": id})).unwrap(); a.poll_sync(); + a.poll_sign_in(); + a.poll_sync(); + assert!(!a.signing_in() && !a.syncing(), "a second refusal waits for the next Send/Receive"); + assert_eq!((asked.lock().unwrap().len(), synced.lock().unwrap().len()), (signs + 1, runs + 2)); refuse.store(false, Ordering::Relaxed); *answer.lock().unwrap() = Some(good("tok-2")); assert_eq!(a.execute("ui.sync", json!({"account": id})).unwrap()["pending"], "signIn"); a.poll_sign_in(); a.poll_sync(); - assert_eq!(asked.lock().unwrap().last().unwrap().1, "ref-1"); assert_eq!(synced.lock().unwrap().last().unwrap().0, "tok-2"); // A token that runs out before a run could be over is renewed first, not taken along. @@ -712,12 +733,12 @@ fn send_receive_signs_in_first_for_an_account_without_a_password() { a.poll_sync(); assert_eq!(synced.lock().unwrap().last().unwrap().0, "tok-3"); - // Microsoft ends the session when the token runs out during the run: the next run renews it. + // Microsoft ends the session when the token runs out during the run: renewed, and the run + // goes again. *error.lock().unwrap() = Some("Couldn't open \"Inbox\": the server ended the session: Session invalidated - AccessTokenExpired".into()); a.execute("ui.sync", json!({"account": id})).unwrap(); - a.poll_sync(); *answer.lock().unwrap() = Some(good("tok-4")); - assert_eq!(a.execute("ui.sync", json!({"account": id})).unwrap()["pending"], "signIn"); + a.poll_sync(); a.poll_sign_in(); a.poll_sync(); assert_eq!(synced.lock().unwrap().last().unwrap().0, "tok-4"); @@ -726,10 +747,10 @@ fn send_receive_signs_in_first_for_an_account_without_a_password() { // the network); the host decides when the provider has refused it for good. refuse.store(true, Ordering::Relaxed); a.execute("ui.sync", json!({"account": id})).unwrap(); - a.poll_sync(); refuse.store(false, Ordering::Relaxed); *answer.lock().unwrap() = Some(Err("Microsoft didn't sign you in: the request was declined".into())); - a.execute("ui.sync", json!({"account": id})).unwrap(); + a.poll_sync(); + assert!(a.signing_in()); a.status_msg = None; a.poll_sign_in(); assert!(!a.signing_in() && !a.syncing()); diff --git a/docs/architecture.md b/docs/architecture.md index 15955541aa..59f2d579db 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -36,10 +36,10 @@ egui, eframe, winit or rfd. | L2 | `tnef` | Reader of TNEF streams (`winmail.dat`, `application/ms-tnef`) from [MS-OXTNEF]: the files of their attachments and the plain text of their message, with what isn't read (attached messages, OLE objects, attachments with no data, attributes with a wrong checksum) named; every length checked against what is left, nothing opened inside another stream, caps on attributes, files, properties and values, and never more out than went in; no I/O of its own, builds for wasm. `mime` adds the files before the stream, which it keeps | | L2 | `openpgp` | Checking OpenPGP Digital signatures (#30) on rPGP: a PGP/MIME message over its signed part's canonical bytes (RFC 3156) or a cleartext-signed text (RFC 9580 §7), with the four results (verified, valid but not verified, changed after signing, can't be checked; MD5, SHA-1, DSA and RSA under 2048 bits refused), and what of the message it covers: only a whole message is Verified; Public keys from attached `application/pgp-keys` parts and the `Autocrypt:` header, their self-signatures checked; whether a key is Verified is the caller's answer (no web of trust). MIME, armour and the cleartext framework read here with every size, count and depth capped; no I/O and no clock of its own, builds for wasm | | L2 | `smime` | S/MIME (RFC 8551) Digital signatures checked (#30), from RFC 5652 (CMS), RFC 5280 (X.509) and the algorithms' RFCs: the signer's digest against the message's, the signature (RSA of 2048 bits or more, ECDSA on P-256 or P-384, over SHA-2), and whether the certificate rests on a trust anchor the host hands in, is for signing mail and is for the From address; the same four results as OpenPGP; revocation isn't checked. No I/O, hostile input bounded | -| L3 | `proto` | IMAP4rev1 and SMTP clients over any `Read + Write` stream (no sockets, so they test against scripted transcripts and build for wasm) | +| L3 | `proto` | IMAP4rev1 and SMTP clients over any `Read + Write` stream (no sockets, so they test against scripted transcripts and build for wasm), signing in with a password, or a token through SASL XOAUTH2 or OAUTHBEARER (RFC 7628, with a server's refusal reasons read as hostile) | | L3 | `dav` | Bounded DAV XML and byte-preserving iCalendar/vCard edits over model snapshots; no sockets or browser APIs, builds for wasm; its requests are run by `net` (`mailcraft_net::dav`: the only crate of the layer that may use it) | | L3 | `assuan` | The Assuan protocol and gpg-agent over any `Read + Write` stream, so that OpenPGP keys stay in GnuPG (smartcards included) and MailCraft never sees a PIN: lines of at most 1000 bytes, percent-escaping, `D`/`S`/`OK`/`ERR`/`INQUIRE`, every size and count capped; gpg-agent's `HAVEKEY`, `KEYINFO`, `READKEY`, signing a SHA-256/384/512 digest (`PKSIGN`) and decrypting a session key (`PKDECRYPT`, answering `INQUIRE CIPHERTEXT`), with the hints its own pinentry needs; a bounded canonical S-expression reader; Assuan's socket files (a redirect, Windows' loopback port and nonce). No sockets: the desktop program finds the agent with `gpgconf` and opens it (`apps/mailcraft/src/gpg_agent.rs`); builds for wasm, which never uses it (#30) | -| L3 | `net` | TCP + TLS (rustls), sending through SMTP, two-way IMAP synchronisation, OAuth sign-in, MX and Autodiscover SRV lookup, Microsoft Graph (`graph`), one HTTPS exchange with an Exchange server that can trust one certificate by its fingerprint, and a held connection that carries the legs of an NTLM sign-in on one socket and names its certificate's hash for channel binding (`https`); empty on wasm | +| L3 | `net` | TCP + TLS (rustls), sending through SMTP, two-way IMAP synchronisation, OAuth sign-in (Microsoft, Google, and the owner's own identity provider, whose addresses `oauth::discovery` finds from its issuer), MX and Autodiscover SRV lookup, Microsoft Graph (`graph`), one HTTPS exchange with an Exchange server that can trust one certificate by its fingerprint, and a held connection that carries the legs of an NTLM sign-in on one socket and names its certificate's hash for channel binding (`https`); empty on wasm | | L3 | `ews` | Exchange Web Services (Microsoft's public documentation only) without sockets or browser APIs: the SOAP request writer, a hostile XML reader, the response-code and `ErrorServerBusy` judgement and `GetFolder`, Autodiscover as a state machine the host drives (the order of places, redirects, the owner's say for another host, Exchange Online told apart), Basic credentials, NTLMv2 written from MS-NLMP (the three legs, MIC, channel binding; MD4, MD5 and HMAC from RustCrypto) and the choice of NTLM or Basic from what the server offers, and mail down: `SyncFolderHierarchy`, `SyncFolderItems` and `GetItem` with their answer readers, and `sync_mail`/`fetch_messages`, which run them over any `HttpExchange` and hand the run back in pieces (waiting for a busy server through a hook the host gives); the program does the exchange (`HttpExchange`); a strict in-process stand-in of Exchange Web Services and of Autodiscover for tests (`stand-in` feature) (#252); going up: changes of messages and folders, drafts kept in the server's Drafts and found again by a marker, sending, never repeated after a lost answer (`changes`, `compose`, `up`); NTLM or Basic chosen from the server's offer (`auth`) | | L3 | `jmap` | JMAP (RFC 8620, 8621) without sockets or browser APIs: builds each HTTP request and judges the answer, the program does the exchange (`HttpExchange`); an in-process server for tests (`stand-in` feature). The browser build runs it over `fetch` (M6, [jmap.md](jmap.md)) | | L4 | `engine` | `Session` (mailbox, selection, view, the message being written, undo), the **command registry** (`cmd/*.rs`), the message list (`list.rs`), the Outlook feature catalog (`catalog.rs`), the sample mailbox, file dispatch (`io.rs`) | diff --git a/docs/gaps.md b/docs/gaps.md index c2f48e0508..9d143ed298 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -18,7 +18,7 @@ this code base. |---|---|---|---|---|---|---| | 1 | **Limited live interoperability.** MailCraft is in daily use on one Microsoft 365 mailbox. Windows acceptance now also covers Gmail/Workspace OAuth, real app-password authentication, restart/reconnect and explicit conversion with downloaded mail preserved; SMTP authentication was checked without sending. Other providers, self-hosted servers, real outbound delivery for this Google contribution and other desktop platforms still need broader acceptance. Automated tests remain synthetic; no CI job runs against a mail server in a container | B | `crates/net/src/fake.rs`; [Google acceptance scope](google-accounts.md#what-has-been-verified-and-what-has-not) | People on untested servers, platforms or organisation policies | 20–40 | [ROADMAP.md](../ROADMAP.md#the-beta-checklist) | | 2 | **Two-way sync has gaps.** Read marks, flags, moves, permanent deletes, folders created by a move and a copy of sent mail go to the server, and so does mail moved (by the owner or a rule) or copied in from another account or from this computer, its original removed from its own server once the copy is there (#451); a run arrives in pieces with progress and can be called off; folder renames, moves and deletes, drafts written here (by Save Draft, or every five minutes by themselves, #286: they stay in Drafts here), copies within an account, imported mail (mail imported into an account's folder is kept on this computer, in Imported, #1401), categories and importance are not sent over IMAP. A Microsoft account is kept in step through Microsoft Graph instead (R3; one added before switches when its owner says so, R3.7): its folders both ways, by server id, made, renamed, moved and deleted as Outlook does (R3.1); its mail down by delta and fetched whole (R3.2); and the changes made here to its messages up: read, flag with its dates, categories (merged with the server's) and importance, moves, copies, Delete into Deleted Items and Delete for good, twenty to a `$batch`, refusals put back and said, and a move into a local folder removing the server's copy only once the whole message is saved here (R3.3). Drafts and sending still go the old way (R3.4). New mail on an account whose server offers IDLE arrives within moments, through one extra connection kept open on the Inbox (#276; the others keep to the timer), messages over 25 MB are kept as a header with a note, and undoing a move or delete after it reached the server is not possible over IMAP (through Graph it is sent as the reverse change, R3.5) | B | `crates/net/src/push.rs`, `sync.rs`; `apply_sync_part` in `crates/engine/src/cmd/account.rs` | Anyone who organises folders or keeps drafts on two devices | 20–35 | [ROADMAP.md](../ROADMAP.md#the-beta-checklist) | -| 3 | **Microsoft sign-in needs administrator consent for some; Google public rollout needs the official registration and verification.** The Microsoft publisher remains unverified. Desktop Gmail/Workspace OAuth now has scoped live Windows acceptance with a development registration: OAuth-first setup, explicit app-password fallback, account-isolated refresh credentials and opt-in conversion. Existing accounts are unchanged unless their owner converts them. OAuth uses the primary Google account address; Workspace aliases are not accepted as account identities. The maintainer-owned Google Desktop registration and public restricted-scope verification remain outstanding; test-user access does not override Workspace policy. Other providers still take a password | B | `crates/net/src/oauth.rs`; [Google account guide](google-accounts.md); synthetic OAuth/IMAP/SMTP tests; publishing/verification status | People in organisations that restrict consent; Google users outside development access | 10–20 | [ROADMAP.md](../ROADMAP.md#the-beta-checklist) | +| 3 | **Microsoft sign-in needs administrator consent for some; Google public rollout needs the official registration and verification.** The Microsoft publisher remains unverified. Desktop Gmail/Workspace OAuth now has scoped live Windows acceptance with a development registration: OAuth-first setup, explicit app-password fallback, account-isolated refresh credentials and opt-in conversion. Existing accounts are unchanged unless their owner converts them. OAuth uses the primary Google account address; Workspace aliases are not accepted as account identities. The maintainer-owned Google Desktop registration and public restricted-scope verification remain outstanding; test-user access does not override Workspace policy. Other hosted providers still take a password; a self-hosted IMAP server behind the owner's own identity provider (Keycloak, Authentik…) can sign in with it ([own identity providers](oauth-servers.md)), tested against synthetic servers only so far, with no sign-in for the command line without a browser | B | `crates/net/src/oauth.rs`; [Google account guide](google-accounts.md); synthetic OAuth/IMAP/SMTP tests; publishing/verification status | People in organisations that restrict consent; Google users outside development access | 10–20 | [ROADMAP.md](../ROADMAP.md#the-beta-checklist) | | 4 | **Sign-ins remembered on Linux are not yet proven across a restart.** A password or refresh token goes to Windows Credential Manager, the macOS keychain, or on Linux and FreeBSD the desktop's Secret Service (GNOME Keyring, KWallet; R5, pure Rust over D-Bus) (File › Options to switch off). A round trip through GNOME Keyring is tested by hand; remembered across a restart on GNOME and on KDE is still to be seen. Where no Secret Service runs, or it stays locked, the program asks at each start and says why once a session. OpenBSD and NetBSD have no store | | `apps/mailcraft/src/secrets.rs` | Linux and BSD users | 1–2 | [ui-parity.md](ui-parity.md) | | 5 | **Microsoft Graph is used for a little; JMAP in the browser build only; no CalDAV or CardDAV, and Exchange servers for mail only.** For accounts that sign in with Microsoft, Graph sends mail, brings the contacts down (read-only) and keeps the account's calendars both ways: appointments, repeating series, meetings (invitations, updates and cancellations sent by the server after the owner's yes), answers to invitations and categories. What is still missing is in [calendar-parity.md](calendar-parity.md): Find a Time over several days, shared calendars, and none of it has met the real service beyond one mailbox. Other providers have no server calendar or contacts, but a calendar on the web can be subscribed to (an `.ics` address, https or webcal, read-only under Other Calendars and refreshed every hour: Internet Calendars, #209); shared mailboxes are read through Graph for any work or school Microsoft account (#70: read through Graph, searched, counted on their own and put among the Favorites; what is changed in them goes up to their own address, deleted mail to their own Deleted Items, and undo with it; mail moves and copies between a shared mailbox and its owner's mailbox or another of his shared mailboxes, made in the destination at its own address and the original removed only once the copy is there; mail written in them is from their address, kept in their own Drafts and sent through them, once the owner has allowed sending from shared mailboxes; each with signatures of its own; their calendars are read once ticked, with the owner's permission asked for by itself and free/busy-only ones drawn as blocks, but not changed from here yet), and the browser build connects only to JMAP servers: the mailboxes, the newest messages and their marks come down, the marks, moves between the server's folders and deletions made here go up, and mail is sent through the server (#1074: an alias with an identity of its own on the server isn't sent from, and who got a blind copy isn't kept after sending), and its contacts are kept in step both ways where the server offers them (#1068, #1076: every address book, shared ones with the rights they give, only the fields changed sent; groups and photos not read); what is changed in folders doesn't go up yet (it can't open the sockets IMAP and SMTP need; [jmap.md](jmap.md)); an Exchange server account (an organisation's own Exchange Server, Grommunio or SmarterMail, reached through Exchange Web Services, #252) (what has been seen on Grommunio, and what has not: [exchange-servers.md](exchange-servers.md)) is a kind of account anyone can add, for its mail only (its calendar and contacts are not kept in step yet), and reads its mail down, and takes up what is changed in it, drafts and sent mail (Send/Receive brings its folders and messages as headers and a preview, then whole messages within Mail to keep offline, from the sync states the server gave; Basic over TLS or NTLMv2 on one held connection, one certificate trusted by its fingerprint; added from Add Account's explicit Exchange server choice: the address and a password, and Server settings for the server's address and the user name; nothing is sent until Connect; the server is found by Autodiscover or taken as typed, the owner is asked (naming the host whole) before the sign-in goes to a host outside their mail domain, and inside it to any host but its Autodiscover host and the hosts its SRV record names (the domain's own name is often a web site, AU3-V1), a mailbox in Microsoft 365 is offered as a Microsoft account with no password sent, the account is tried with one request for its Inbox before it is added, a certificate the system doesn't trust is shown and trusted for that account by its fingerprint only on the owner's tick (asked again from File › Info when it changes, never for an expired or wrong-name one), the password is remembered with the system's credential store when the owner lets it be, and File › Info shows the server, the user name, how it signed in and the trusted certificate, with Forget): Kerberos and modern sign-in are not built, Autodiscover can't sign in with NTLM (a server that wants it is set up by typing its address), a message moved on the server comes as a new one, and one over about 12 MB is not downloaded whole. The DAV foundation has collection/resource snapshots, preserving iCalendar/vCard document edits and a bounded XML reader (`mailcraft-dav`, #376); it does not discover servers, upload changes or sync calendars and contacts. | B | `crates/net/src/graph.rs`, `crates/engine/src/cmd/remote.rs`, `crates/dav` | Anyone who runs meetings from here; everyone not on Microsoft; everyone on the web build | 50–100 | [ROADMAP.md](../ROADMAP.md#after-beta) | | 6 | **HTML mail is close, not exact.** Tables, colours, alignment, sizes, lists, quotes and pictures are shown, adjusted for the dark theme, with nothing run; pictures on the web come only when the owner asks for them, and are kept on this computer for 30 days (`apps/mailcraft/src/picture_cache.rs`); pictures written into the message (`data:`) are shown as attached ones are (#533), and a reply or forward carries them in the original, each as a part of its own as Outlook sends them (#602); a message's `