Compare commits
No commits in common. "8860efa82e61cd0d389b97f00e24a57562b1a569" and "1f50e4d82bc3a73b66016e84d9f34af75e6910df" have entirely different histories.
8860efa82e
...
1f50e4d82b
@ -127,7 +127,7 @@ The project depends on `openconnect >= 8.20`, `webkit2gtk`, `libsecret`, `libaya
|
|||||||
|
|
||||||
## About Trial
|
## About Trial
|
||||||
|
|
||||||
The CLI version is always free, while the GUI version is paid. There are two trial modes for the GUI version:
|
The CLI version is always free, while the GUI version is paid. There two trial modes for the GUI version:
|
||||||
|
|
||||||
1. 10-day trial: You can use the GUI stable release for 10 days after the installation.
|
1. 10-day trial: You can use the GUI stable release for 10 days after the installation.
|
||||||
2. 14-day trial: Each beta release has a fresh trial period (at most 14 days) after released.
|
2. 14-day trial: Each beta release has a fresh trial period (at most 14 days) after released.
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 14 KiB |
@ -1,6 +1,5 @@
|
|||||||
use std::process::Stdio;
|
use std::process::Stdio;
|
||||||
|
|
||||||
use anyhow::bail;
|
|
||||||
use tokio::process::Command;
|
use tokio::process::Command;
|
||||||
|
|
||||||
use crate::{auth::SamlAuthResult, credential::Credential, GP_AUTH_BINARY};
|
use crate::{auth::SamlAuthResult, credential::Credential, GP_AUTH_BINARY};
|
||||||
@ -130,13 +129,12 @@ impl<'a> SamlAuthLauncher<'a> {
|
|||||||
.wait_with_output()
|
.wait_with_output()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let Ok(auth_result) = serde_json::from_slice::<SamlAuthResult>(&output.stdout) else {
|
let auth_result = serde_json::from_slice::<SamlAuthResult>(&output.stdout)
|
||||||
bail!("Failed to parse auth data")
|
.map_err(|_| anyhow::anyhow!("Failed to parse auth data"))?;
|
||||||
};
|
|
||||||
|
|
||||||
match auth_result {
|
match auth_result {
|
||||||
SamlAuthResult::Success(auth_data) => Credential::try_from(auth_data),
|
SamlAuthResult::Success(auth_data) => Credential::try_from(auth_data),
|
||||||
SamlAuthResult::Failure(msg) => bail!(msg),
|
SamlAuthResult::Failure(msg) => Err(anyhow::anyhow!(msg)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|