generateAuthUrl method
After authorize()
is called, to get the authorization header string, (ie, '{scheme} {token}') the client calls this method to generate the raw string.
The returning string formate must always be like
{scheme} {token}
-
Example 1: In case of JWT,
Bearer {jwt_token}
-
Example 2: In case of Basic Auth,
Basic {Base64UsernamePassword}
Implementation
@override
Future<String?> generateAuthUrl() async {
if (!await isAuthenticated()) {
return null;
}
return '$scheme $_encryptedAccessToken';
}