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.

  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public var algorithm: String { get set }

    Parameters

    algorithm

    The algorithm.
    Gets the algorithm.

    Return Value

    The algorithm.

  • Sets the available algorithms list without testing unicity.

    Declaration

    Swift

    public var availableAlgorithms: [String] { get set }

    Parameters

    algorithms

    The available algorithms list.
    Gets all available algorithms.

    Return Value

    A list of available algorithms.

  • Sets the domain for which this authentication is valid.

    Declaration

    Swift

    public var domain: String { get set }

    Parameters

    domain

    The domain. This should not be necessary because realm is supposed to be unique and sufficient. However, many SIP servers don’t set realm correctly, then domain has to be used to distinguish between several SIP account bearing the same username. Gets the domain.

    Return Value

    The domain.

  • ha1

    Sets the ha1.

    Declaration

    Swift

    public var ha1: String { get set }

    Parameters

    ha1

    The ha1.
    Gets the ha1.

    Return Value

    The ha1.

  • Sets the password.

    Declaration

    Swift

    public var password: String { get set }

    Parameters

    password

    The password.
    Gets the password.

    Return Value

    The password.

  • Sets the realm.

    Declaration

    Swift

    public var realm: String { get set }

    Parameters

    realm

    The realm.
    Gets the realm.

    Return Value

    The realm.

  • Sets the TLS certificate.

    Declaration

    Swift

    public var tlsCert: String { get set }

    Parameters

    tlsCert

    The TLS certificate.
    Gets the TLS certificate.

    Return Value

    The TLS certificate.

  • Sets the TLS certificate path.

    Declaration

    Swift

    public var tlsCertPath: String { get set }

    Parameters

    tlsCertPath

    The TLS certificate path.
    Gets the TLS certificate path.

    Return Value

    The TLS certificate path.

  • Sets the TLS key.

    Declaration

    Swift

    public var tlsKey: String { get set }

    Parameters

    tlsKey

    The TLS key.
    Gets the TLS key.

    Return Value

    The TLS key.

  • Sets the TLS key path.

    Declaration

    Swift

    public var tlsKeyPath: String { get set }

    Parameters

    tlsKeyPath

    The TLS key path.
    Gets the TLS key path.

    Return Value

    The TLS key path.

  • Sets the user ID.

    Declaration

    Swift

    public var userid: String { get set }

    Parameters

    userId

    The userid.
    Gets the user id.

    Return Value

    The user id.

  • Sets the username.

    Declaration

    Swift

    public var username: String { get set }

    Parameters

    username

    The username.
    Gets the username.

    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.