# SecurityManagerProtocol

The protocol that the securityManager must implement.

Availability
3.3.0
3.3.0
9.2.0
Extends
Object

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Overview

The object representing Titanium.Network.HTTPClient.securityManager must implement this protocol. Assigning the securityManager property to an object that does not implement this protocol will cause an exception to be raised. All methods in this protocol are required.

# Methods

# connectionDelegateForUrl

Availability
3.3.0
9.2.0
connectionDelegateForUrl(url) APSConnectionDelegate

The APSConnectionDelegate for this connection.

This method is only called if willHandleURL returns true. See APSConnectionDelegate for further information.

Parameters

Name Type Description
url Object

The NSURL representing the end point of this connection.

Returns


# getKeyManagers

Availability
3.3.0
getKeyManagers(proxy) Array<Object>

Returns an array of objects implementing the X509KeyManager protocol for the SSL Context.

This method is only called if willHandleURL returns true.

Return null to set up a SSL Context with the default system key managers.

Parameters

Name Type Description
proxy Object

The Titanium.Network.HTTPClient representing this connection.

Returns

Type
Array<Object>

# getTrustManagers

Availability
3.3.0
getTrustManagers(proxy) Array<Object>

Returns an array of objects implementing the X509TrustManager protocol for the SSL Context.

This method is only called if willHandleURL returns true.

Return null to set up a SSL Context with the default system trust managers.

Parameters

Name Type Description
proxy Object

The Titanium.Network.HTTPClient representing this connection.

Returns

Type
Array<Object>

# willHandleURL

Availability
3.3.0
3.3.0
9.2.0
willHandleURL(url) Boolean

Returns if the security manager will participate in authentication of this end point.

The parameter passed to this method is a NSURL on iOS and a Uri on android.

Return true to participate, false to allow default authentication flow.

Parameters

Name Type Description
url Object

The Object representing representing the end point of this connection.

Returns

Type
Boolean