This commit is contained in:
Roderick van Domburg 2022-08-25 21:01:39 +02:00
parent dbf71c0dff
commit 42a665fb0d
No known key found for this signature in database
GPG key ID: FE2585E713F9F30A
3 changed files with 4 additions and 5 deletions

View file

@ -2,7 +2,7 @@ use std::{fmt, path::PathBuf, str::FromStr};
use url::Url;
pub const KEYMASTER_CLIENT_ID: &str = "65b708073fc0480ea92a077233ca87bd";
const KEYMASTER_CLIENT_ID: &str = "65b708073fc0480ea92a077233ca87bd";
#[derive(Clone, Debug)]
pub struct SessionConfig {

View file

@ -19,7 +19,6 @@ use thiserror::Error;
use crate::{
apresolve::SocketAddress,
cdn_url::CdnUrl,
config::KEYMASTER_CLIENT_ID,
error::ErrorKind,
protocol::{
canvaz::EntityCanvazRequest,
@ -120,7 +119,7 @@ impl SpClient {
message.set_request_type(ClientTokenRequestType::REQUEST_CLIENT_DATA_REQUEST);
let client_data = message.mut_client_data();
client_data.set_client_id(KEYMASTER_CLIENT_ID.to_string());
client_data.set_client_id(self.session().client_id());
client_data.set_client_version(version::SEMVER.to_string());
let connectivity_data = client_data.mut_connectivity_sdk_data();

View file

@ -13,7 +13,7 @@ use std::time::{Duration, Instant};
use serde::Deserialize;
use thiserror::Error;
use crate::{config::KEYMASTER_CLIENT_ID, Error};
use crate::Error;
component! {
TokenProvider : TokenProviderInner {
@ -65,7 +65,7 @@ impl TokenProvider {
// scopes must be comma-separated
pub async fn get_token(&self, scopes: &str) -> Result<Token, Error> {
let client_id = KEYMASTER_CLIENT_ID;
let client_id = self.session().client_id();
if client_id.is_empty() {
return Err(Error::invalid_argument("Client ID cannot be empty"));
}