FIRIdentityToolkitRequest.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FirebaseAuth/Sources/Backend/FIRAuthRequestConfiguration.h"
  18. @class FIRAuthRequestConfiguration;
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @class FIRIdentityToolkitRequest
  21. @brief Represents a request to an identity toolkit endpoint.
  22. */
  23. @interface FIRIdentityToolkitRequest : NSObject
  24. /** @property endpoint
  25. @brief Gets the RPC's endpoint.
  26. */
  27. @property(nonatomic, copy, readonly) NSString *endpoint;
  28. /** @property APIKey
  29. @brief Gets the client's API key used for the request.
  30. */
  31. @property(nonatomic, copy, readonly) NSString *APIKey;
  32. /** @property tenantID
  33. @brief The tenant ID of the request. nil if none is available.
  34. */
  35. @property(nonatomic, copy, readonly, nullable) NSString *tenantID;
  36. /** @property useIdentityPlatform
  37. @brief The toggle of using Identity Platform endpoints.
  38. */
  39. @property(nonatomic) BOOL useIdentityPlatform;
  40. /** @property useStaging
  41. @brief The toggle of using staging endpoints.
  42. */
  43. @property(nonatomic) BOOL useStaging;
  44. /** @fn init
  45. @brief Please use initWithEndpoint:APIKey:
  46. */
  47. - (instancetype)init NS_UNAVAILABLE;
  48. /** @fn initWithEndpoint:APIKey:
  49. @brief Designated initializer.
  50. @param endpoint The endpoint name.
  51. @param requestConfiguration An object containing configurations to be added to the request.
  52. */
  53. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  54. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  55. NS_DESIGNATED_INITIALIZER;
  56. /** @fn requestURL
  57. @brief Gets the request's full URL.
  58. */
  59. - (NSURL *)requestURL;
  60. /** @fn queryParams
  61. @brief Gets the request's query parameters.
  62. */
  63. - (nullable NSString *)queryParams;
  64. /** @fn requestConfiguration
  65. @brief Gets the request's configuration.
  66. */
  67. - (FIRAuthRequestConfiguration *)requestConfiguration;
  68. @end
  69. NS_ASSUME_NONNULL_END