]> git.proxmox.com Git - proxmox-openid-rs.git/commitdiff
return Url as string
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 21 Jun 2021 12:12:13 +0000 (14:12 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 21 Jun 2021 12:12:13 +0000 (14:12 +0200)
To make perl bindings simple.

debian/control
src/lib.rs

index efdaf0cbaed8b1bb09e8178bf82937e85dd63543..dd4a239efb320734480522e4762e8b66150f428c 100644 (file)
@@ -45,10 +45,10 @@ Provides:
  librust-proxmox-openid+default-dev (= ${binary:Version}),
  librust-proxmox-openid-0-dev (= ${binary:Version}),
  librust-proxmox-openid-0+default-dev (= ${binary:Version}),
- librust-proxmox-openid-0.1-dev (= ${binary:Version}),
- librust-proxmox-openid-0.1+default-dev (= ${binary:Version}),
- librust-proxmox-openid-0.1.0-dev (= ${binary:Version}),
- librust-proxmox-openid-0.1.0+default-dev (= ${binary:Version})
+ librust-proxmox-openid-0.2-dev (= ${binary:Version}),
+ librust-proxmox-openid-0.2+default-dev (= ${binary:Version}),
+ librust-proxmox-openid-0.2.0-dev (= ${binary:Version}),
+ librust-proxmox-openid-0.2.0+default-dev (= ${binary:Version})
 Description: Rust crate "proxmox-openid" - Rust source code
  This package contains the source for the Rust proxmox-openid crate, packaged by
  debcargo for use with cargo and dh-cargo.
index bf9c0568e0d36fe36c5b33d204a6f8693612591a..a1614cd61ba66a45a18fa370ed02c03dda12c800 100644 (file)
@@ -2,7 +2,6 @@ use std::path::Path;
 
 use anyhow::{format_err, Error};
 use serde::{Deserialize, Serialize};
-use url::Url;
 
 mod 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 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())
             .url();
 
-        Ok(authorize_url.into())
+        Ok(authorize_url.to_string())
     }
 
     pub fn verify_public_auth_state(