pdk-contracts-lib 1.9.1-alpha.2

PDK Contracts Library
Documentation
// Copyright (c) 2026, Salesforce, Inc.,
// All rights reserved.
// For full license text, see the LICENSE.txt file

use serde::Serialize;

#[derive(Serialize, Debug)]
pub struct LoginPayload {
    grant_type: String,
    client_id: String,
    client_secret: String,
}

impl LoginPayload {
    pub fn new(client_id: &str, client_secret: &str) -> Self {
        Self {
            grant_type: String::from("client_credentials"),
            client_id: client_id.to_string(),
            client_secret: client_secret.to_string(),
        }
    }
}