No Description

FIRSetAccountInfoResponse.h 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 "FIRAuthRPCResponse.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @class FIRSetAccountInfoResponseProviderUserInfo
  20. @brief Represents the provider user info part of the response from the setAccountInfo endpoint.
  21. @see https://developers.google.com/identity/toolkit/web/reference/relyingparty/setAccountInfo
  22. */
  23. @interface FIRSetAccountInfoResponseProviderUserInfo : NSObject
  24. /** @property providerID
  25. @brief The ID of the identity provider.
  26. */
  27. @property(nonatomic, strong, readonly, nullable) NSString *providerID;
  28. /** @property displayName
  29. @brief The user's display name at the identity provider.
  30. */
  31. @property(nonatomic, strong, readonly, nullable) NSString *displayName;
  32. /** @property photoURL
  33. @brief The user's photo URL at the identity provider.
  34. */
  35. @property(nonatomic, strong, readonly, nullable) NSURL *photoURL;
  36. /** @fn init
  37. @brief Please use initWithDictionary:
  38. */
  39. - (instancetype)init NS_UNAVAILABLE;
  40. /** @fn initWithAPIKey:
  41. @brief Designated initializer.
  42. @param dictionary The provider user info data from endpoint.
  43. */
  44. - (instancetype)initWithDictionary:(NSDictionary *)dictionary NS_DESIGNATED_INITIALIZER;
  45. @end
  46. /** @class FIRSetAccountInfoResponse
  47. @brief Represents the response from the setAccountInfo endpoint.
  48. @see https://developers.google.com/identity/toolkit/web/reference/relyingparty/setAccountInfo
  49. */
  50. @interface FIRSetAccountInfoResponse : NSObject <FIRAuthRPCResponse>
  51. /** @property email
  52. @brief The email or the user.
  53. */
  54. @property(nonatomic, strong, readonly, nullable) NSString *email;
  55. /** @property displayName
  56. @brief The display name of the user.
  57. */
  58. @property(nonatomic, strong, readonly, nullable) NSString *displayName;
  59. /** @property providerUserInfo
  60. @brief The user's profiles at the associated identity providers.
  61. */
  62. @property(nonatomic, strong, readonly, nullable)
  63. NSArray<FIRSetAccountInfoResponseProviderUserInfo *> *providerUserInfo;
  64. /** @property IDToken
  65. @brief Either an authorization code suitable for performing an STS token exchange, or the
  66. access token from Secure Token Service, depending on whether @c returnSecureToken is set
  67. on the request.
  68. */
  69. @property(nonatomic, strong, readonly, nullable) NSString *IDToken;
  70. /** @property approximateExpirationDate
  71. @brief The approximate expiration date of the access token.
  72. */
  73. @property(nonatomic, copy, readonly, nullable) NSDate *approximateExpirationDate;
  74. /** @property refreshToken
  75. @brief The refresh token from Secure Token Service.
  76. */
  77. @property(nonatomic, strong, readonly, nullable) NSString *refreshToken;
  78. @end
  79. NS_ASSUME_NONNULL_END