No Description

FIRGameCenterAuthCredential.h 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #import "FIRAuthCredential.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. /** @class FIRGameCenterAuthCredential
  20. @brief Internal implementation of FIRAuthCredential for Game Center credentials.
  21. */
  22. @interface FIRGameCenterAuthCredential : FIRAuthCredential <NSSecureCoding>
  23. /** @property playerID
  24. @brief The ID of the Game Center local player.
  25. */
  26. @property(nonatomic, readonly) NSString *playerID;
  27. /** @property publicKeyURL
  28. @brief The URL for the public encryption key.
  29. */
  30. @property(nonatomic, readonly) NSURL *publicKeyURL;
  31. /** @property signature
  32. @brief The verification signature data generated.
  33. */
  34. @property(nonatomic, readonly) NSData *signature;
  35. /** @property salt
  36. @brief A random string used to compute the hash and keep it randomized.
  37. */
  38. @property(nonatomic, readonly) NSData *salt;
  39. /** @property timestamp
  40. @brief The date and time that the signature was created.
  41. */
  42. @property(nonatomic, readonly) uint64_t timestamp;
  43. /** @property displayName
  44. @brief The date and time that the signature was created.
  45. */
  46. @property(nonatomic, readonly) NSString *displayName;
  47. /** @fn initWithPlayerID:publicKeyURL:signature:salt:timestamp:displayName:
  48. @brief Designated initializer.
  49. @param publicKeyURL The URL for the public encryption key.
  50. @param signature The verification signature generated.
  51. @param salt A random string used to compute the hash and keep it randomized.
  52. @param timestamp The date and time that the signature was created.
  53. */
  54. - (nullable instancetype)initWithPlayerID:(NSString *)playerID
  55. publicKeyURL:(NSURL *)publicKeyURL
  56. signature:(NSData *)signature
  57. salt:(NSData *)salt
  58. timestamp:(uint64_t)timestamp
  59. displayName:(NSString *)displayName NS_DESIGNATED_INITIALIZER;
  60. /** @fn initWithProvider:
  61. @brief Initializer with a provider name.
  62. @param provider The provider name.
  63. */
  64. - (nullable instancetype)initWithProvider:(NSString *)provider NS_UNAVAILABLE;
  65. @end
  66. NS_ASSUME_NONNULL_END