AuthRequestConfiguration.swift 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. import Foundation
  15. @_implementationOnly import FirebaseCoreInternal
  16. /** @class FIRAuthRequestConfiguration
  17. @brief Defines configurations to be added to a request to Firebase Auth's backend.
  18. */
  19. @objc(FIRAuthRequestConfiguration) public class AuthRequestConfiguration: NSObject {
  20. /** @property APIKey
  21. @brief The Firebase Auth API key used in the request.
  22. */
  23. @objc public let APIKey: String
  24. /** @property LanguageCode
  25. @brief The language code used in the request.
  26. */
  27. @objc public var languageCode: String?
  28. /// ** @property appID
  29. // @brief The Firebase appID used in the request.
  30. // */
  31. @objc public var appID: String
  32. //
  33. /// ** @property heartbeatLogger
  34. // @brief The heartbeat logger used to add heartbeats to the corresponding request's header.
  35. // */
  36. // TODO:
  37. // @objc public var heartbeatLogger: FIRHeartbeatLoggerProtocol?
  38. // @property(nonatomic, copy, nullable) id<FIRHeartbeatLoggerProtocol> heartbeatLogger;
  39. /** @property additionalFrameworkMarker
  40. @brief Additional framework marker that will be added as part of the header of every request.
  41. */
  42. @objc public var additionalFrameworkMarker: String?
  43. /** @property emulatorHostAndPort
  44. @brief If set, the local emulator host and port to point to instead of the remote backend.
  45. */
  46. @objc public var emulatorHostAndPort: String?
  47. /** @fn initWithRequestClass:APIKey:authLanguage:
  48. @brief Designated initializer.
  49. @param APIKey The API key to be used in the request.
  50. */
  51. @objc public init(APIKey: String, appID: String) {
  52. self.APIKey = APIKey
  53. self.appID = appID
  54. }
  55. // TODO:
  56. // @objc public init(APIKey: String, appID: String) { // }, heartbeatLogger: FIRHeartbeatLoggerProtocol?) {
  57. // self.APIKey = APIKey
  58. // self.appID = appID
  59. //
  60. // // self.heartbeatLogger = heartbeatLogger
  61. // }
  62. }