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.

53 lines
1.7 KiB

6 years ago
  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. NS_ASSUME_NONNULL_BEGIN
  18. /** @class FIRAuthAppCredential
  19. @brief A class represents a credential that proves the identity of the app.
  20. */
  21. @interface FIRAuthAppCredential : NSObject <NSSecureCoding>
  22. /** @property receipt
  23. @brief The server acknowledgement of receiving client's claim of identity.
  24. */
  25. @property(nonatomic, strong, readonly) NSString *receipt;
  26. /** @property secret
  27. @brief The secret that the client received from server via a trusted channel, if ever.
  28. */
  29. @property(nonatomic, strong, readonly, nullable) NSString *secret;
  30. /** @fn initWithReceipt:secret:
  31. @brief Initializes the instance.
  32. @param receipt The server acknowledgement of receiving client's claim of identity.
  33. @param secret The secret that the client received from server via a trusted channel, if ever.
  34. @return The initialized instance.
  35. */
  36. - (instancetype)initWithReceipt:(NSString *)receipt secret:(nullable NSString *)secret
  37. NS_DESIGNATED_INITIALIZER;
  38. /** @fn init
  39. @brief Call @c initWithReceipt:secret: to get an instance of this class.
  40. */
  41. - (instancetype)init NS_UNAVAILABLE;
  42. @end
  43. NS_ASSUME_NONNULL_END