Ei kuvausta

FIRVerifyAssertionRequest.h 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 "FIRAuthRPCRequest.h"
  18. #import "FIRIdentityToolkitRequest.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @class FIRVerifyAssertionRequest
  21. @brief Represents the parameters for the verifyAssertion endpoint.
  22. @see https://developers.google.com/identity/toolkit/web/reference/relyingparty/verifyAssertion
  23. */
  24. @interface FIRVerifyAssertionRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  25. /** @property requestURI
  26. @brief The URI to which the IDP redirects the user back. It may contain federated login result
  27. params added by the IDP.
  28. */
  29. @property(nonatomic, copy, nullable) NSString *requestURI;
  30. /** @property pendingToken
  31. @brief The Firebase ID Token for the IDP pending to be confirmed by the user.
  32. */
  33. @property(nonatomic, copy, nullable) NSString *pendingToken;
  34. /** @property accessToken
  35. @brief The STS Access Token for the authenticated user, only needed for linking the user.
  36. */
  37. @property(nonatomic, copy, nullable) NSString *accessToken;
  38. /** @property returnSecureToken
  39. @brief Whether the response should return access token and refresh token directly.
  40. @remarks The default value is @c YES .
  41. */
  42. @property(nonatomic, assign) BOOL returnSecureToken;
  43. #pragma mark - Components of "postBody"
  44. /** @property providerID
  45. @brief The ID of the IDP whose credentials are being presented to the endpoint.
  46. */
  47. @property(nonatomic, copy, readonly) NSString *providerID;
  48. /** @property providerAccessToken
  49. @brief An access token from the IDP.
  50. */
  51. @property(nonatomic, copy, nullable) NSString *providerAccessToken;
  52. /** @property providerIDToken
  53. @brief An ID Token from the IDP.
  54. */
  55. @property(nonatomic, copy, nullable) NSString *providerIDToken;
  56. /** @property returnIDPCredential
  57. @brief Whether the response should return the IDP credential directly.
  58. */
  59. @property(nonatomic, assign) BOOL returnIDPCredential;
  60. /** @property providerOAuthTokenSecret
  61. @brief A session ID used to map this request to a headful-lite flow.
  62. */
  63. @property(nonatomic, copy, nullable) NSString *sessionID;
  64. /** @property providerOAuthTokenSecret
  65. @brief An OAuth client secret from the IDP.
  66. */
  67. @property(nonatomic, copy, nullable) NSString *providerOAuthTokenSecret;
  68. /** @property inputEmail
  69. @brief The originally entered email in the UI.
  70. */
  71. @property(nonatomic, copy, nullable) NSString *inputEmail;
  72. /** @property autoCreate
  73. @brief A flag that indicates whether or not the user should be automatically created.
  74. */
  75. @property(nonatomic, assign) BOOL autoCreate;
  76. /** @fn initWithEndpoint:requestConfiguration:
  77. @brief Please use initWithProviderID:requestConfifuration instead.
  78. */
  79. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  80. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  81. NS_UNAVAILABLE;
  82. /** @fn initWithProviderID:requestConfifuration
  83. @brief Designated initializer.
  84. @param providerID The auth provider's ID.
  85. @param requestConfiguration An object containing configurations to be added to the request.
  86. */
  87. - (nullable instancetype)initWithProviderID:(NSString *)providerID
  88. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  89. NS_DESIGNATED_INITIALIZER;
  90. @end
  91. NS_ASSUME_NONNULL_END