nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
/// We accept an OIDC access token issued by a trusted identity provider to refresh a Nominal access token.
/// The access token is validated and exchanged for a Nominal access token. To be used in this endpoint,
/// the OIDC access token must contain an email claim.
/// The org rid from the expiring session should be provided to deconflict if the user is a member of
/// multiple orgs.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct RefreshAccessTokenRequest {
    #[builder(into)]
    #[serde(rename = "accessToken")]
    access_token: String,
    #[builder(default, into)]
    #[serde(rename = "orgRid", skip_serializing_if = "Option::is_none", default)]
    org_rid: Option<super::super::authentication::api::OrgRid>,
}
impl RefreshAccessTokenRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(access_token: impl Into<String>) -> Self {
        Self::builder().access_token(access_token).build()
    }
    #[inline]
    pub fn access_token(&self) -> &str {
        &*self.access_token
    }
    #[inline]
    pub fn org_rid(&self) -> Option<&super::super::authentication::api::OrgRid> {
        self.org_rid.as_ref().map(|o| &*o)
    }
}