Instance Method

shouldProvideIdentity(for:)

Indicate that the delegate can provide an identity for the connection authentication

Declaration

optional func shouldProvideIdentity(for connection: NWTCPConnection) -> Bool

Parameters

connection

The connection sending this message.

Return Value

Return true to provide the identity for this connection, in which case the delegate method provideIdentity(for:completionHandler:) will be called.

Discussion

The caller can implement this optional protocol method to decide whether it wants to provide the identity for this connection for authentication. If this delegate method is not implemented, the return value will default to YES if provideIdentity(for:completionHandler:) is implemented.

See Also

Delegate Methods

func shouldEvaluateTrust(for: NWTCPConnection) -> Bool

Indicate that the delegate should override the default trust evaluation for the connection

func provideIdentity(for: NWTCPConnection, completionHandler: (SecIdentity, [Any]) -> Void)

Provide the identity and an optional certificate chain to be used for authentication

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software