1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.identitytoolkit.v2; 18 19import "google/protobuf/timestamp.proto"; 20 21option csharp_namespace = "Google.Cloud.IdentityToolkit.V2"; 22option go_package = "cloud.google.com/go/identitytoolkit/apiv2/identitytoolkitpb;identitytoolkitpb"; 23option java_multiple_files = true; 24option java_package = "com.google.cloud.identitytoolkit.v2"; 25option php_namespace = "Google\\Cloud\\IdentityToolkit\\V2"; 26option ruby_package = "Google::Cloud::IdentityToolkit::V2"; 27 28// The information required to auto-retrieve an SMS. 29message AutoRetrievalInfo { 30 // The Android app's signature hash for Google Play Service's 31 // SMS Retriever API. 32 string app_signature_hash = 1; 33} 34 35// App Verification info for a StartMfa request. 36message StartMfaPhoneRequestInfo { 37 // Required for enrollment. Phone number to be enrolled as MFA. 38 string phone_number = 1; 39 40 // iOS only. Receipt of successful app token validation with APNS. 41 string ios_receipt = 2; 42 43 // iOS only. Secret delivered to iOS app via APNS. 44 string ios_secret = 3; 45 46 // Web only. Recaptcha solution. 47 string recaptcha_token = 4; 48 49 // Android only. Used by Google Play Services to identify the app for 50 // auto-retrieval. 51 AutoRetrievalInfo auto_retrieval_info = 5; 52 53 // Android only. Used to assert application identity in place of a 54 // recaptcha token. A SafetyNet Token can be generated via the 55 // [SafetyNet Android Attestation 56 // API](https://developer.android.com/training/safetynet/attestation.html), 57 // with the Base64 encoding of the `phone_number` field as the nonce. 58 string safety_net_token = 6; 59} 60 61// Phone Verification info for a StartMfa response. 62message StartMfaPhoneResponseInfo { 63 // An opaque string that represents the enrollment session. 64 string session_info = 1; 65} 66 67// Phone Verification info for a FinalizeMfa request. 68message FinalizeMfaPhoneRequestInfo { 69 // An opaque string that represents the enrollment session. 70 string session_info = 1; 71 72 // User-entered verification code. 73 string code = 2; 74 75 // Android only. Uses for "instant" phone number verification though GmsCore. 76 string android_verification_proof = 3; 77 78 // Required if Android verification proof is presented. 79 string phone_number = 4; 80} 81 82// Phone Verification info for a FinalizeMfa response. 83message FinalizeMfaPhoneResponseInfo { 84 // Android only. Long-lived replacement for valid code tied to android device. 85 string android_verification_proof = 1; 86 87 // Android only. Expiration time of verification proof in seconds. 88 google.protobuf.Timestamp android_verification_proof_expire_time = 2; 89 90 // For Android verification proof. 91 string phone_number = 3; 92} 93