AuthInfo

public class AuthInfo : LinphoneObject

Object holding authentication information. In most case, authentication information consists of a username and password. If realm isn’t set, it will be deduced automatically from the first authentication challenge as for the hash algorithm. Sometimes, a userid is required by the proxy and then domain can be useful to discriminate different credentials. You can also use this object if you need to use a client certificate. Once created and filled, a AuthInfo must be added to the Core in order to become known and used automatically when needed. Use Core.addAuthInfo() for that purpose. The Core object can take the initiative to request authentication information when needed to the application through the authentication_requested() callback of it’s LinphoneCoreCbs. The application can respond to this information request later using Core.addAuthInfo(). This will unblock all pending authentication transactions and retry them with authentication headers.

  • Declaration

    Swift

    public static func getSwiftObject(cObject: OpaquePointer) -> AuthInfo
  • Declaration

    Swift

    public var getCobject: OpaquePointer? { get }
  • Sets the algorithm to use.

    Declaration

    Swift

    public var algorithm: String { get set }

    Return Value

    The algorithm.

  • Sets the available algorithms list without testing unicity.

    Declaration

    Swift

    public var availableAlgorithms: [String] { get set }

    Return Value

    A list of available algorithms.

  • Sets the domain for which this authentication is valid.

    Declaration

    Swift

    public var domain: String { get set }

    Return Value

    The domain.

  • ha1

    Sets the ha1.

    Declaration

    Swift

    public var ha1: String { get set }

    Return Value

    The ha1.

  • Sets the password.

    Declaration

    Swift

    public var password: String { get set }

    Return Value

    The password.

  • Sets the realm.

    Declaration

    Swift

    public var realm: String { get set }

    Return Value

    The realm.

  • Sets the TLS certificate.

    Declaration

    Swift

    public var tlsCert: String { get set }

    Return Value

    The TLS certificate.

  • Sets the TLS certificate path.

    Declaration

    Swift

    public var tlsCertPath: String { get set }

    Return Value

    The TLS certificate path.

  • Sets the TLS key.

    Declaration

    Swift

    public var tlsKey: String { get set }

    Return Value

    The TLS key.

  • Sets the TLS key path.

    Declaration

    Swift

    public var tlsKeyPath: String { get set }

    Return Value

    The TLS key path.

  • Sets the user ID.

    Declaration

    Swift

    public var userid: String { get set }

    Return Value

    The user id.

  • Sets the username.

    Declaration

    Swift

    public var username: String { get set }

    Return Value

    The username.

  • Add an unique algorithm in the the available algorithms list : Algorithms that already exist will not be added.

    Declaration

    Swift

    public func addAvailableAlgorithm(algorithm: String?)

    Parameters

    algorithm

    The algorithm to add.

  • Remove all algorithms from the available algorithms list.

    Declaration

    Swift

    public func clearAvailableAlgorithms()
  • Instantiates a new auth info with values from source.

    Declaration

    Swift

    public func clone() -> AuthInfo?

    Return Value

    The newly created AuthInfo object.

  • Check if Authinfos are the same without taking account algorithms.

    Declaration

    Swift

    public func isEqualButAlgorithms(authInfo2: AuthInfo?) -> Bool

    Parameters

    authInfo2

    The second AuthInfo object.

    Return Value

    true if all fields (Username, UserId, Realm, Domain) are the same.