ParseLDAP

public struct ParseLDAP<AuthenticatedUser> : ParseAuthentication where AuthenticatedUser : ParseUser

Provides utility functions for working with LDAP User Authentication and ParseUser‘s. Be sure your Parse Server is configured for sign in with LDAP.

  • Declaration

    Swift

    public static var __type: String { get }

Login

  • Login a ParseUser asynchronously using LDAP authentication.

    Declaration

    Swift

    func login(id: String, // swiftlint:disable:this identifier_name
               password: String,
               options: API.Options = [],
               callbackQueue: DispatchQueue = .main,
               completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)

    Parameters

    id

    The id of the user.

    password

    The password of the user.

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    The block to execute.

  • Declaration

    Swift

    func login(authData: [String: String]?,
               options: API.Options = [],
               callbackQueue: DispatchQueue = .main,
               completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)
  • Login a ParseUser asynchronously using LDAP authentication. Publishes when complete.

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    func loginPublisher(id: String, // swiftlint:disable:this identifier_name
                        password: String,
                        options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

    Parameters

    id

    The id of the user.

    password

    The password of the user.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

  • Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    func loginPublisher(authData: [String: String]?,
                        options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

Link

  • Link the current ParseUser asynchronously using LDAP authentication.

    Declaration

    Swift

    func link(id: String, // swiftlint:disable:this identifier_name
              password: String,
              options: API.Options = [],
              callbackQueue: DispatchQueue = .main,
              completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)

    Parameters

    id

    The id of the user.

    password

    The password of the user.

    options

    A set of header options sent to the server. Defaults to an empty set.

    callbackQueue

    The queue to return to after completion. Default value of .main.

    completion

    The block to execute.

  • Declaration

    Swift

    func link(authData: [String: String]?,
              options: API.Options = [],
              callbackQueue: DispatchQueue = .main,
              completion: @escaping (Result<AuthenticatedUser, ParseError>) -> Void)
  • Link the current ParseUser asynchronously using LDAP authentication. Publishes when complete.

    Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    func linkPublisher(id: String, // swiftlint:disable:this identifier_name
                       password: String,
                       options: API.Options = []) -> Future<AuthenticatedUser, ParseError>

    Parameters

    id

    The id of the user.

    password

    The password of the user.

    options

    A set of header options sent to the server. Defaults to an empty set.

    Return Value

    A publisher that eventually produces a single value and then finishes or fails.

  • Declaration

    Swift

    @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
    func linkPublisher(authData: [String: String]?,
                       options: API.Options = []) -> Future<AuthenticatedUser, ParseError>