authenticate method
Implementation
Future<void> authenticate() async {
if (authenticator == null) {
throw Exception('No authenticator provided');
}
final token = await authenticator!.authorize(baseUrl, credentials);
storage.setCredentials(token);
}