mfa_info.proto 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.identitytoolkit.v2;
  16. import "google/protobuf/timestamp.proto";
  17. option csharp_namespace = "Google.Cloud.IdentityToolkit.V2";
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/identitytoolkit/v2;identitytoolkit";
  19. option java_multiple_files = true;
  20. option java_package = "com.google.cloud.identitytoolkit.v2";
  21. option php_namespace = "Google\\Cloud\\IdentityToolkit\\V2";
  22. option ruby_package = "Google::Cloud::IdentityToolkit::V2";
  23. // The information required to auto-retrieve an SMS.
  24. message AutoRetrievalInfo {
  25. // The Android app's signature hash for Google Play Service's
  26. // SMS Retriever API.
  27. string app_signature_hash = 1;
  28. }
  29. // App Verification info for a StartMfa request.
  30. message StartMfaPhoneRequestInfo {
  31. // Required for enrollment. Phone number to be enrolled as MFA.
  32. string phone_number = 1;
  33. // iOS only. Receipt of successful app token validation with APNS.
  34. string ios_receipt = 2;
  35. // iOS only. Secret delivered to iOS app via APNS.
  36. string ios_secret = 3;
  37. // Web only. Recaptcha solution.
  38. string recaptcha_token = 4;
  39. // Android only. Used by Google Play Services to identify the app for
  40. // auto-retrieval.
  41. AutoRetrievalInfo auto_retrieval_info = 5;
  42. // Android only. Used to assert application identity in place of a
  43. // recaptcha token. A SafetyNet Token can be generated via the
  44. // [SafetyNet Android Attestation
  45. // API](https://developer.android.com/training/safetynet/attestation.html),
  46. // with the Base64 encoding of the `phone_number` field as the nonce.
  47. string safety_net_token = 6;
  48. }
  49. // Phone Verification info for a StartMfa response.
  50. message StartMfaPhoneResponseInfo {
  51. // An opaque string that represents the enrollment session.
  52. string session_info = 1;
  53. }
  54. // Phone Verification info for a FinalizeMfa request.
  55. message FinalizeMfaPhoneRequestInfo {
  56. // An opaque string that represents the enrollment session.
  57. string session_info = 1;
  58. // User-entered verification code.
  59. string code = 2;
  60. // Android only. Uses for "instant" phone number verification though GmsCore.
  61. string android_verification_proof = 3;
  62. // Required if Android verification proof is presented.
  63. string phone_number = 4;
  64. }
  65. // Phone Verification info for a FinalizeMfa response.
  66. message FinalizeMfaPhoneResponseInfo {
  67. // Android only. Long-lived replacement for valid code tied to android device.
  68. string android_verification_proof = 1;
  69. // Android only. Expiration time of verification proof in seconds.
  70. google.protobuf.Timestamp android_verification_proof_expire_time = 2;
  71. // For Android verification proof.
  72. string phone_number = 3;
  73. }