Credentials
@frozen
public enum Credentials
Credentials
is an enum representing supported authentication types for MongoDB Realm.
Example Usage:
let credentials = Credentials.JWT(token: myToken)
-
Credentials from a Facebook access token.
Declaration
Swift
case facebook(accessToken: String)
-
Credentials from a Google serverAuthCode.
Declaration
Swift
case google(serverAuthCode: String)
-
Credentials from an Apple id token.
Declaration
Swift
case apple(idToken: String)
-
Credentials from an email and password.
Declaration
Swift
case emailPassword(email: String, password: String)
-
Credentials from a JSON Web Token
Declaration
Swift
case jwt(token: String)
-
Credentials for a MongoDB Realm function using a mongodb document as a json payload. If the json can not be successfully serialised and error will be produced and the object will be nil.
Declaration
Swift
case function(payload: Document)
-
Credentials from a user api key.
Declaration
Swift
case userAPIKey(String)
-
Credentials from a sever api key.
Declaration
Swift
case serverAPIKey(String)
-
Represents anonymous credentials
Declaration
Swift
case anonymous