EndlessStreamingService.viaThirdPartyAuthenticator constructor
EndlessStreamingService.viaThirdPartyAuthenticator(
- ThirdPartyAuthenticator thirdPartyAuthenticator, {
- String? cloudSpeechEndpoint,
Creates a EndlessStreamingService interface using a third party authenticator. Don't worry about updating the access token, the package does it automatically. Example: final EndlessStreamingService = EndlessStreamingService.viaThirdPartyAuthenticator( ThirdPartyAuthenticator( obtainCredentialsFromThirdParty: () async { // request api to get token final json = await requestCredentialFromMyApi(); return AccessCredentials.fromJson(json); }, ), );
Implementation
factory EndlessStreamingService.viaThirdPartyAuthenticator(
ThirdPartyAuthenticator thirdPartyAuthenticator,
{String? cloudSpeechEndpoint}) =>
EndlessStreamingService._(thirdPartyAuthenticator.toCallOptions,
cloudSpeechEndpoint: cloudSpeechEndpoint);