execute method
Future<Client>
execute(
- OAuthSettings oAuthSettings,
- Client client,
- CredentialsRefreshedCallback onCredentialsRefreshed
override
Execute this AuthorizationStrategy and create an oauth2.Client
that
is authorized.
Implementation
@override
Future<oauth2.Client> execute(
OAuthSettings oAuthSettings,
http.Client client,
oauth2.CredentialsRefreshedCallback onCredentialsRefreshed,
) {
return customGrant(
oAuthSettings.authorizationUri,
_grantName,
{'phone_number': phoneNumber, 'token': smsToken},
identifier: oAuthSettings.clientId,
secret: oAuthSettings.clientSecret,
scopes: oAuthSettings.scopes,
httpClient: client,
onCredentialsRefreshed: onCredentialsRefreshed,
);
}