#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AutoRetrievalInfo {
#[prost(string, tag = "1")]
pub app_signature_hash: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMfaPhoneRequestInfo {
#[prost(string, tag = "1")]
pub phone_number: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub ios_receipt: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub ios_secret: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub recaptcha_token: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub auto_retrieval_info: ::core::option::Option<AutoRetrievalInfo>,
#[prost(string, tag = "6")]
pub safety_net_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMfaPhoneResponseInfo {
#[prost(string, tag = "1")]
pub session_info: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinalizeMfaPhoneRequestInfo {
#[prost(string, tag = "1")]
pub session_info: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub android_verification_proof: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub phone_number: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinalizeMfaPhoneResponseInfo {
#[prost(string, tag = "1")]
pub android_verification_proof: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub android_verification_proof_expire_time: ::core::option::Option<
::prost_types::Timestamp,
>,
#[prost(string, tag = "3")]
pub phone_number: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinalizeMfaSignInRequest {
#[prost(string, tag = "2")]
pub mfa_pending_credential: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub tenant_id: ::prost::alloc::string::String,
#[prost(oneof = "finalize_mfa_sign_in_request::VerificationInfo", tags = "3")]
pub verification_info: ::core::option::Option<
finalize_mfa_sign_in_request::VerificationInfo,
>,
}
pub mod finalize_mfa_sign_in_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum VerificationInfo {
#[prost(message, tag = "3")]
PhoneVerificationInfo(super::FinalizeMfaPhoneRequestInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinalizeMfaSignInResponse {
#[prost(string, tag = "1")]
pub id_token: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub refresh_token: ::prost::alloc::string::String,
#[prost(oneof = "finalize_mfa_sign_in_response::AuxiliaryAuthInfo", tags = "3")]
pub auxiliary_auth_info: ::core::option::Option<
finalize_mfa_sign_in_response::AuxiliaryAuthInfo,
>,
}
pub mod finalize_mfa_sign_in_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AuxiliaryAuthInfo {
#[prost(message, tag = "3")]
PhoneAuthInfo(super::FinalizeMfaPhoneResponseInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMfaSignInRequest {
#[prost(string, tag = "2")]
pub mfa_pending_credential: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub mfa_enrollment_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub tenant_id: ::prost::alloc::string::String,
#[prost(oneof = "start_mfa_sign_in_request::SignInInfo", tags = "4")]
pub sign_in_info: ::core::option::Option<start_mfa_sign_in_request::SignInInfo>,
}
pub mod start_mfa_sign_in_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SignInInfo {
#[prost(message, tag = "4")]
PhoneSignInInfo(super::StartMfaPhoneRequestInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMfaSignInResponse {
#[prost(oneof = "start_mfa_sign_in_response::ResponseInfo", tags = "1")]
pub response_info: ::core::option::Option<start_mfa_sign_in_response::ResponseInfo>,
}
pub mod start_mfa_sign_in_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ResponseInfo {
#[prost(message, tag = "1")]
PhoneResponseInfo(super::StartMfaPhoneResponseInfo),
}
}
pub mod authentication_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AuthenticationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AuthenticationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AuthenticationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
AuthenticationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn finalize_mfa_sign_in(
&mut self,
request: impl tonic::IntoRequest<super::FinalizeMfaSignInRequest>,
) -> std::result::Result<
tonic::Response<super::FinalizeMfaSignInResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.identitytoolkit.v2.AuthenticationService/FinalizeMfaSignIn",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.identitytoolkit.v2.AuthenticationService",
"FinalizeMfaSignIn",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn start_mfa_sign_in(
&mut self,
request: impl tonic::IntoRequest<super::StartMfaSignInRequest>,
) -> std::result::Result<
tonic::Response<super::StartMfaSignInResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.identitytoolkit.v2.AuthenticationService/StartMfaSignIn",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.identitytoolkit.v2.AuthenticationService",
"StartMfaSignIn",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinalizeMfaEnrollmentRequest {
#[prost(string, tag = "1")]
pub id_token: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub tenant_id: ::prost::alloc::string::String,
#[prost(oneof = "finalize_mfa_enrollment_request::VerificationInfo", tags = "4")]
pub verification_info: ::core::option::Option<
finalize_mfa_enrollment_request::VerificationInfo,
>,
}
pub mod finalize_mfa_enrollment_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum VerificationInfo {
#[prost(message, tag = "4")]
PhoneVerificationInfo(super::FinalizeMfaPhoneRequestInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinalizeMfaEnrollmentResponse {
#[prost(string, tag = "1")]
pub id_token: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub refresh_token: ::prost::alloc::string::String,
#[prost(oneof = "finalize_mfa_enrollment_response::AuxiliaryAuthInfo", tags = "3")]
pub auxiliary_auth_info: ::core::option::Option<
finalize_mfa_enrollment_response::AuxiliaryAuthInfo,
>,
}
pub mod finalize_mfa_enrollment_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AuxiliaryAuthInfo {
#[prost(message, tag = "3")]
PhoneAuthInfo(super::FinalizeMfaPhoneResponseInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMfaEnrollmentRequest {
#[prost(string, tag = "1")]
pub id_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub tenant_id: ::prost::alloc::string::String,
#[prost(oneof = "start_mfa_enrollment_request::EnrollmentInfo", tags = "3")]
pub enrollment_info: ::core::option::Option<
start_mfa_enrollment_request::EnrollmentInfo,
>,
}
pub mod start_mfa_enrollment_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EnrollmentInfo {
#[prost(message, tag = "3")]
PhoneEnrollmentInfo(super::StartMfaPhoneRequestInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMfaEnrollmentResponse {
#[prost(oneof = "start_mfa_enrollment_response::EnrollmentResponse", tags = "1")]
pub enrollment_response: ::core::option::Option<
start_mfa_enrollment_response::EnrollmentResponse,
>,
}
pub mod start_mfa_enrollment_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EnrollmentResponse {
#[prost(message, tag = "1")]
PhoneSessionInfo(super::StartMfaPhoneResponseInfo),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithdrawMfaRequest {
#[prost(string, tag = "1")]
pub id_token: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub mfa_enrollment_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub tenant_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WithdrawMfaResponse {
#[prost(string, tag = "1")]
pub id_token: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub refresh_token: ::prost::alloc::string::String,
}
pub mod account_management_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AccountManagementServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AccountManagementServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AccountManagementServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
AccountManagementServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn finalize_mfa_enrollment(
&mut self,
request: impl tonic::IntoRequest<super::FinalizeMfaEnrollmentRequest>,
) -> std::result::Result<
tonic::Response<super::FinalizeMfaEnrollmentResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.identitytoolkit.v2.AccountManagementService/FinalizeMfaEnrollment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.identitytoolkit.v2.AccountManagementService",
"FinalizeMfaEnrollment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn start_mfa_enrollment(
&mut self,
request: impl tonic::IntoRequest<super::StartMfaEnrollmentRequest>,
) -> std::result::Result<
tonic::Response<super::StartMfaEnrollmentResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.identitytoolkit.v2.AccountManagementService/StartMfaEnrollment",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.identitytoolkit.v2.AccountManagementService",
"StartMfaEnrollment",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn withdraw_mfa(
&mut self,
request: impl tonic::IntoRequest<super::WithdrawMfaRequest>,
) -> std::result::Result<
tonic::Response<super::WithdrawMfaResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.identitytoolkit.v2.AccountManagementService/WithdrawMfa",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.identitytoolkit.v2.AccountManagementService",
"WithdrawMfa",
),
);
self.inner.unary(req, path, codec).await
}
}
}