EndlessStreamingServiceBeta.viaThirdPartyAuthenticator constructor
EndlessStreamingServiceBeta.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 EndlessStreamingServiceBeta.viaThirdPartyAuthenticator(
ThirdPartyAuthenticator thirdPartyAuthenticator,
{String? cloudSpeechEndpoint}) =>
EndlessStreamingServiceBeta._(thirdPartyAuthenticator.toCallOptions,
cloudSpeechEndpoint: cloudSpeechEndpoint);