123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #import <Foundation/Foundation.h>
- #import "RLMSyncUtil.h"
- NS_ASSUME_NONNULL_BEGIN
- typedef NSString *RLMSyncCredentialsToken;
- typedef NSString *RLMIdentityProvider RLM_EXTENSIBLE_STRING_ENUM;
- extern RLMIdentityProvider const RLMIdentityProviderDebug;
- extern RLMIdentityProvider const RLMIdentityProviderUsernamePassword;
- extern RLMIdentityProvider const RLMIdentityProviderFacebook;
- extern RLMIdentityProvider const RLMIdentityProviderGoogle;
- extern RLMIdentityProvider const RLMIdentityProviderCloudKit;
- @interface RLMSyncCredentials : NSObject
- @property (nonatomic, readonly) RLMSyncCredentialsToken token;
- @property (nonatomic, readonly) RLMIdentityProvider provider;
- @property (nonatomic, readonly) NSDictionary<NSString *, id> *userInfo;
- + (instancetype)credentialsWithFacebookToken:(RLMSyncCredentialsToken)token;
- + (instancetype)credentialsWithGoogleToken:(RLMSyncCredentialsToken)token;
- + (instancetype)credentialsWithCloudKitToken:(RLMSyncCredentialsToken)token;
- + (instancetype)credentialsWithUsername:(NSString *)username
- password:(NSString *)password
- register:(BOOL)shouldRegister;
- + (instancetype)credentialsWithAccessToken:(RLMServerToken)accessToken identity:(NSString *)identity;
- - (instancetype)initWithCustomToken:(RLMSyncCredentialsToken)token
- provider:(RLMIdentityProvider)provider
- userInfo:(nullable NSDictionary *)userInfo NS_DESIGNATED_INITIALIZER;
- - (instancetype)init __attribute__((unavailable("RLMSyncCredentials cannot be created directly")));
- + (instancetype)new __attribute__((unavailable("RLMSyncCredentials cannot be created directly")));
- NS_ASSUME_NONNULL_END
- @end
|