#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SamlRequest {
#[prost(string, tag="1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub creation_date: ::core::option::Option<::pbjson_types::Timestamp>,
#[prost(string, tag="3")]
pub issuer: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub assertion_consumer_service: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub relay_state: ::prost::alloc::string::String,
#[prost(string, tag="6")]
pub binding: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationError {
#[prost(enumeration="ErrorReason", tag="1")]
pub error: i32,
#[prost(string, optional, tag="2")]
pub error_description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorReason {
Unspecified = 0,
VersionMissmatch = 1,
AuthNFailed = 2,
InvalidAttrNameOrValue = 3,
InvalidNameidPolicy = 4,
RequestDenied = 5,
RequestUnsupported = 6,
UnsupportedBinding = 7,
}
impl ErrorReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ERROR_REASON_UNSPECIFIED",
Self::VersionMissmatch => "ERROR_REASON_VERSION_MISSMATCH",
Self::AuthNFailed => "ERROR_REASON_AUTH_N_FAILED",
Self::InvalidAttrNameOrValue => "ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE",
Self::InvalidNameidPolicy => "ERROR_REASON_INVALID_NAMEID_POLICY",
Self::RequestDenied => "ERROR_REASON_REQUEST_DENIED",
Self::RequestUnsupported => "ERROR_REASON_REQUEST_UNSUPPORTED",
Self::UnsupportedBinding => "ERROR_REASON_UNSUPPORTED_BINDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ERROR_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"ERROR_REASON_VERSION_MISSMATCH" => Some(Self::VersionMissmatch),
"ERROR_REASON_AUTH_N_FAILED" => Some(Self::AuthNFailed),
"ERROR_REASON_INVALID_ATTR_NAME_OR_VALUE" => Some(Self::InvalidAttrNameOrValue),
"ERROR_REASON_INVALID_NAMEID_POLICY" => Some(Self::InvalidNameidPolicy),
"ERROR_REASON_REQUEST_DENIED" => Some(Self::RequestDenied),
"ERROR_REASON_REQUEST_UNSUPPORTED" => Some(Self::RequestUnsupported),
"ERROR_REASON_UNSUPPORTED_BINDING" => Some(Self::UnsupportedBinding),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSamlRequestRequest {
#[prost(string, tag="1")]
pub saml_request_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSamlRequestResponse {
#[prost(message, optional, tag="1")]
pub saml_request: ::core::option::Option<SamlRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateResponseRequest {
#[prost(string, tag="1")]
pub saml_request_id: ::prost::alloc::string::String,
#[prost(oneof="create_response_request::ResponseKind", tags="2, 3")]
pub response_kind: ::core::option::Option<create_response_request::ResponseKind>,
}
pub mod create_response_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ResponseKind {
#[prost(message, tag="2")]
Session(super::Session),
#[prost(message, tag="3")]
Error(super::AuthorizationError),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Session {
#[prost(string, tag="1")]
pub session_id: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub session_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateResponseResponse {
#[prost(message, optional, tag="1")]
pub details: ::core::option::Option<super::super::object::v2::Details>,
#[prost(string, tag="2")]
pub url: ::prost::alloc::string::String,
#[prost(oneof="create_response_response::Binding", tags="3, 4")]
pub binding: ::core::option::Option<create_response_response::Binding>,
}
pub mod create_response_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Binding {
#[prost(message, tag="3")]
Redirect(super::RedirectResponse),
#[prost(message, tag="4")]
Post(super::PostResponse),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RedirectResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostResponse {
#[prost(string, tag="1")]
pub relay_state: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub saml_response: ::prost::alloc::string::String,
}
include!("zitadel.saml.v2.tonic.rs");