No Description

FIRCreateAuthURIRequest.h 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 FIRCreateAuthURIRequest
  21. @brief Represents the parameters for the createAuthUri endpoint.
  22. @see https://developers.google.com/identity/toolkit/web/reference/relyingparty/createAuthUri
  23. */
  24. @interface FIRCreateAuthURIRequest : FIRIdentityToolkitRequest <FIRAuthRPCRequest>
  25. /** @property identifier
  26. @brief The email or federated ID of the user.
  27. */
  28. @property(nonatomic, copy) NSString *identifier;
  29. /** @property continueURI
  30. @brief The URI to which the IDP redirects the user after the federated login flow.
  31. */
  32. @property(nonatomic, copy) NSString *continueURI;
  33. /** @property openIDRealm
  34. @brief Optional realm for OpenID protocol. The sub string "scheme://domain:port" of the param
  35. "continueUri" is used if this is not set.
  36. */
  37. @property(nonatomic, copy, nullable) NSString *openIDRealm;
  38. /** @property providerID
  39. @brief The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, aol.com,
  40. live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
  41. */
  42. @property(nonatomic, copy, nullable) NSString *providerID;
  43. /** @property clientID
  44. @brief The relying party OAuth client ID.
  45. */
  46. @property(nonatomic, copy, nullable) NSString *clientID;
  47. /** @property context
  48. @brief The opaque value used by the client to maintain context info between the authentication
  49. request and the IDP callback.
  50. */
  51. @property(nonatomic, copy, nullable) NSString *context;
  52. /** @property appID
  53. @brief The iOS client application's bundle identifier.
  54. */
  55. @property(nonatomic, copy, nullable) NSString *appID;
  56. /** @fn initWithEndpoint:requestConfiguration:requestConfiguration.
  57. @brief Please use initWithIdentifier:continueURI:requestConfiguration: instead.
  58. */
  59. - (nullable instancetype)initWithEndpoint:(NSString *)endpoint
  60. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  61. NS_UNAVAILABLE;
  62. /** @fn initWithIdentifier:continueURI:requestConfiguration:
  63. @brief Designated initializer.
  64. @param identifier The email or federated ID of the user.
  65. @param continueURI The URI to which the IDP redirects the user after the federated login flow.
  66. @param requestConfiguration An object containing configurations to be added to the request.
  67. */
  68. - (nullable instancetype)initWithIdentifier:(NSString *)identifier
  69. continueURI:(NSString *)continueURI
  70. requestConfiguration:(FIRAuthRequestConfiguration *)requestConfiguration
  71. NS_DESIGNATED_INITIALIZER;
  72. @end
  73. NS_ASSUME_NONNULL_END