mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-17 18:45:02 +00:00
return Url as string
To make perl bindings simple.
This commit is contained in:
parent
cc64c7e35d
commit
ac034c72da
8
debian/control
vendored
8
debian/control
vendored
@ -45,10 +45,10 @@ Provides:
|
|||||||
librust-proxmox-openid+default-dev (= ${binary:Version}),
|
librust-proxmox-openid+default-dev (= ${binary:Version}),
|
||||||
librust-proxmox-openid-0-dev (= ${binary:Version}),
|
librust-proxmox-openid-0-dev (= ${binary:Version}),
|
||||||
librust-proxmox-openid-0+default-dev (= ${binary:Version}),
|
librust-proxmox-openid-0+default-dev (= ${binary:Version}),
|
||||||
librust-proxmox-openid-0.1-dev (= ${binary:Version}),
|
librust-proxmox-openid-0.2-dev (= ${binary:Version}),
|
||||||
librust-proxmox-openid-0.1+default-dev (= ${binary:Version}),
|
librust-proxmox-openid-0.2+default-dev (= ${binary:Version}),
|
||||||
librust-proxmox-openid-0.1.0-dev (= ${binary:Version}),
|
librust-proxmox-openid-0.2.0-dev (= ${binary:Version}),
|
||||||
librust-proxmox-openid-0.1.0+default-dev (= ${binary:Version})
|
librust-proxmox-openid-0.2.0+default-dev (= ${binary:Version})
|
||||||
Description: Rust crate "proxmox-openid" - Rust source code
|
Description: Rust crate "proxmox-openid" - Rust source code
|
||||||
This package contains the source for the Rust proxmox-openid crate, packaged by
|
This package contains the source for the Rust proxmox-openid crate, packaged by
|
||||||
debcargo for use with cargo and dh-cargo.
|
debcargo for use with cargo and dh-cargo.
|
||||||
|
@ -2,7 +2,6 @@ use std::path::Path;
|
|||||||
|
|
||||||
use anyhow::{format_err, Error};
|
use anyhow::{format_err, Error};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use url::Url;
|
|
||||||
|
|
||||||
mod http_client;
|
mod http_client;
|
||||||
pub use http_client::http_client;
|
pub use http_client::http_client;
|
||||||
@ -115,7 +114,7 @@ impl OpenIdAuthenticator {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn authorize_url(&self, state_dir: &str, realm: &str) -> Result<Url, Error> {
|
pub fn authorize_url(&self, state_dir: &str, realm: &str) -> Result<String, Error> {
|
||||||
|
|
||||||
let private_auth_state = PrivateAuthState::new();
|
let private_auth_state = PrivateAuthState::new();
|
||||||
let public_auth_state = private_auth_state.public_state_string(realm.to_string())?;
|
let public_auth_state = private_auth_state.public_state_string(realm.to_string())?;
|
||||||
@ -137,7 +136,7 @@ impl OpenIdAuthenticator {
|
|||||||
.set_pkce_challenge(private_auth_state.pkce_challenge())
|
.set_pkce_challenge(private_auth_state.pkce_challenge())
|
||||||
.url();
|
.url();
|
||||||
|
|
||||||
Ok(authorize_url.into())
|
Ok(authorize_url.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn verify_public_auth_state(
|
pub fn verify_public_auth_state(
|
||||||
|
Loading…
Reference in New Issue
Block a user