MonoMac.Security.SecKeyChain.FindInternetPassword Method
This method looks up for the password in the default MacOS keychain for Internet accounts.

Syntax

public static SecStatusCode FindInternetPassword (string serverName, string accountName, out byte[] password, SecProtocol protocolType, short port, string path, SecAuthenticationType authenticationType, string securityDomain)

Parameters

serverName
The server name for the Internet password.
accountName
The account name for the internet password.
password
If the method succeeds, the byte array representing the password.
protocolType
Optional network protocol associated with the Internet password. If not provided, defaults to SecProtocol.Http.
port
Optional TCP/IP port associated with the Internet password. If not provided, defaults to 0.
path
Optional string which represents the path for the Internet password. If not provided, defaults to null.
authenticationType
Optional authentication type for the Internet password. If not provided, defaults to SecAuthenticationType.Default.
securityDomain
Optional security domain, if the protocol requires it. If not provided, defaults to null.

Returns

If the method succeeds, SecStatusCode.Success is returned. Otherwise the return value indicates the reason for the failure.

Remarks

This method can be used to lookup for the password in the default MacOS keychain for Internet accounts. Most of the parameters are optional and will accept null. Provide as many as needed to narrow the search sufficiently for your application. If multiple matching passwords exist, the first one will be returned. This method will cause the Unlock Keychain dialog box to be displayed, if the default keychain is currently locked. This method is not available for iOS.

Requirements

Namespace: MonoMac.Security
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0