All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dart2.auth.http_basic_auth.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{>header}}
{{>part_of}}
class HttpBasicAuth implements Authentication {
  String username;
  String password;

  @override
  void applyToParams(List queryParams, Map headerParams) {
    final credentials = (username ?? '') + ':' + (password ?? '');
    headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy