You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.1 KiB

6 years ago
  1. /*
  2. * Copyright 2018 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. NS_ASSUME_NONNULL_BEGIN
  18. /** @class FIRAuthTokenResult
  19. @brief A data class containing the ID token JWT string and other properties associated with the
  20. token including the decoded payload claims.
  21. */
  22. NS_SWIFT_NAME(AuthTokenResult)
  23. @interface FIRAuthTokenResult : NSObject
  24. /** @property token
  25. @brief Stores the JWT string of the ID token.
  26. */
  27. @property (nonatomic, readonly) NSString *token;
  28. /** @property expirationDate
  29. @brief Stores the ID token's expiration date.
  30. */
  31. @property (nonatomic, readonly) NSDate *expirationDate;
  32. /** @property authDate
  33. @brief Stores the ID token's authentication date.
  34. @remarks This is the date the user was signed in and NOT the date the token was refreshed.
  35. */
  36. @property (nonatomic, readonly) NSDate *authDate;
  37. /** @property issuedAtDate
  38. @brief Stores the date that the ID token was issued.
  39. @remarks This is the date last refreshed and NOT the last authentication date.
  40. */
  41. @property (nonatomic, readonly) NSDate *issuedAtDate;
  42. /** @property signInProvider
  43. @brief Stores sign-in provider through which the token was obtained.
  44. @remarks This does not necesssarily map to provider IDs.
  45. */
  46. @property (nonatomic, readonly) NSString *signInProvider;
  47. /** @property claims
  48. @brief Stores the entire payload of claims found on the ID token. This includes the standard
  49. reserved claims as well as custom claims set by the developer via the Admin SDK.
  50. */
  51. @property (nonatomic, readonly) NSDictionary<NSString *, id> *claims;
  52. @end
  53. NS_ASSUME_NONNULL_END