MongoCredential
public struct MongoCredential : Decodable, Equatable
Represents an authentication credential.
-
A string containing the username. For auth mechanisms that do not utilize a password, this may be the entire
userinfotoken from the connection string.Declaration
Swift
public var username: String? -
A string containing the password.
Declaration
Swift
public var password: String? -
A string containing the authentication database.
Declaration
Swift
public var source: String? { get set } -
The authentication mechanism. A nil value for this property indicates that a mechanism wasn’t specified and that mechanism negotiation is required.
Declaration
Swift
public var mechanism: Mechanism? -
A document containing mechanism-specific properties.
Declaration
Swift
public var mechanismProperties: BSONDocument? -
Declaration
Swift
public init(from decoder: Decoder) throws -
Declaration
Swift
public init( username: String? = nil, password: String? = nil, source: String? = nil, mechanism: Mechanism? = nil, mechanismProperties: BSONDocument? = nil ) -
Possible authentication mechanisms.
See moreDeclaration
Swift
public struct Mechanism : Decodable, Equatable, CustomStringConvertible
View on GitHub
Install in Dash
MongoCredential Structure Reference