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 oauth2.resourceOwnerPasswordGrant(
oAuthSettings.authorizationUri,
username,
password,
identifier: oAuthSettings.clientId,
secret: oAuthSettings.clientSecret,
scopes: oAuthSettings.scopes,
httpClient: client,
onCredentialsRefreshed: onCredentialsRefreshed,
);
}