RLMCredentials

Objective-C

@interface RLMCredentials : NSObject

Swift

class RLMCredentials : NSObject

Opaque credentials representing a specific Realm App user.

  • The name of the identity provider which generated the credentials token.

    Declaration

    Objective-C

    @property (nonatomic) RLMIdentityProvider _Nonnull provider;

    Swift

    var provider: RLMIdentityProvider { get set }
  • Construct and return credentials from a Facebook account token.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithFacebookToken:
        (nonnull RLMCredentialsToken)token;

    Swift

    convenience init(facebookToken token: String)
  • Construct and return credentials from a Google account token.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithGoogleAuthCode:
        (nonnull RLMCredentialsToken)token;

    Swift

    convenience init(googleAuthCode token: String)
  • Construct and return credentials from a Google id token.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithGoogleIdToken:
        (nonnull RLMCredentialsToken)token;

    Swift

    convenience init(googleIdToken token: String)
  • Construct and return credentials from an Apple account token.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithAppleToken:
        (nonnull RLMCredentialsToken)token;

    Swift

    convenience init(appleToken token: String)
  • Construct and return credentials for a MongoDB Realm function using a mongodb document as a json payload.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithFunctionPayload:
        (nonnull NSDictionary<NSString *, id<RLMBSON>> *)payload;
  • Construct and return credentials from a user api key.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithUserAPIKey:(nonnull NSString *)apiKey;

    Swift

    convenience init(userAPIKey apiKey: String)
  • Construct and return credentials from a server api key.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithServerAPIKey:(nonnull NSString *)apiKey;

    Swift

    convenience init(serverAPIKey apiKey: String)
  • Construct and return MongoDB Realm credentials from an email and password.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithEmail:(nonnull NSString *)email
                                        password:(nonnull NSString *)password;

    Swift

    convenience init(email: String, password: String)
  • Construct and return credentials from a JSON Web Token.

    Declaration

    Objective-C

    + (nonnull instancetype)credentialsWithJWT:(nonnull NSString *)token;

    Swift

    convenience init(jwt token: String)
  • Construct and return anonymous credentials

    Declaration

    Objective-C

    + (nonnull instancetype)anonymousCredentials;

    Swift

    class func anonymous() -> Self