guess


Description:

public OAuth2Service? guess (string? protocol, string? hostname)

Searches the list of currently known OAuth2 services for the one which can be used with the given protocol and/or hostname .

Any of protocol and hostname can be null, but not both. It's up to each OAuth2Service to decide, which of the arguments are important and whether all or only any of them can be required.

The returned OAuth2Service is referenced for thread safety, if found.

Parameters:

this

an OAuth2Services

protocol

a protocol to search the service for, like "imap", or null

hostname

a host name to search the service for, like "server.example.com", or null

Returns:

a referenced OAuth2Service, which can be used with given constraints, or null, when none was found.