44 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
55 *
66 * The version of the OpenAPI document: 0.1.0
7- *
7+ *
88 * Generated by: https://openapi-generator.tech
99 */
1010
11-
1211use reqwest;
1312
14- use crate :: apis:: ResponseContent ;
15- use super :: { Error , configuration} ;
16-
13+ use super :: { configuration, Error } ;
14+ use crate :: { apis:: ResponseContent , propelauth:: auth:: AUTH_HOSTNAME_HEADER } ;
1715
1816/// struct for typed errors of method [`token_verification_metadata`]
1917#[ derive( Debug , Clone , Serialize , Deserialize ) ]
@@ -23,24 +21,33 @@ pub enum TokenVerificationMetadataError {
2321 UnknownValue ( serde_json:: Value ) ,
2422}
2523
26-
27- pub async fn token_verification_metadata ( configuration : & configuration:: Configuration ) -> Result < crate :: models:: AuthTokenVerificationMetadata , Error < TokenVerificationMetadataError > > {
24+ pub async fn token_verification_metadata (
25+ configuration : & configuration:: Configuration ,
26+ ) -> Result < crate :: models:: AuthTokenVerificationMetadata , Error < TokenVerificationMetadataError > > {
2827 let local_var_configuration = configuration;
2928
3029 // unbox the parameters
3130
32-
3331 let local_var_client = & local_var_configuration. client ;
3432
35- let local_var_uri_str = format ! ( "{}/api/backend/v1/token_verification_metadata" , local_var_configuration. base_path) ;
36- let mut local_var_req_builder = local_var_client. request ( reqwest:: Method :: GET , local_var_uri_str. as_str ( ) ) ;
33+ let local_var_uri_str = format ! (
34+ "{}/api/backend/v1/token_verification_metadata" ,
35+ local_var_configuration. base_path
36+ ) ;
37+ let mut local_var_req_builder =
38+ local_var_client. request ( reqwest:: Method :: GET , local_var_uri_str. as_str ( ) ) ;
3739
3840 if let Some ( ref local_var_user_agent) = local_var_configuration. user_agent {
39- local_var_req_builder = local_var_req_builder. header ( reqwest:: header:: USER_AGENT , local_var_user_agent. clone ( ) ) ;
41+ local_var_req_builder =
42+ local_var_req_builder. header ( reqwest:: header:: USER_AGENT , local_var_user_agent. clone ( ) ) ;
4043 }
4144 if let Some ( ref local_var_token) = local_var_configuration. bearer_access_token {
4245 local_var_req_builder = local_var_req_builder. bearer_auth ( local_var_token. to_owned ( ) ) ;
4346 } ;
47+ local_var_req_builder = local_var_req_builder. header (
48+ AUTH_HOSTNAME_HEADER ,
49+ local_var_configuration. auth_hostname . to_owned ( ) ,
50+ ) ;
4451
4552 let local_var_req = local_var_req_builder. build ( ) ?;
4653 let local_var_resp = local_var_client. execute ( local_var_req) . await ?;
@@ -51,9 +58,13 @@ pub async fn token_verification_metadata(configuration: &configuration::Configur
5158 if !local_var_status. is_client_error ( ) && !local_var_status. is_server_error ( ) {
5259 serde_json:: from_str ( & local_var_content) . map_err ( Error :: from)
5360 } else {
54- let local_var_entity: Option < TokenVerificationMetadataError > = serde_json:: from_str ( & local_var_content) . ok ( ) ;
55- let local_var_error = ResponseContent { status : local_var_status, content : local_var_content, entity : local_var_entity } ;
61+ let local_var_entity: Option < TokenVerificationMetadataError > =
62+ serde_json:: from_str ( & local_var_content) . ok ( ) ;
63+ let local_var_error = ResponseContent {
64+ status : local_var_status,
65+ content : local_var_content,
66+ entity : local_var_entity,
67+ } ;
5668 Err ( Error :: ResponseError ( local_var_error) )
5769 }
5870}
59-
0 commit comments