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

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

The newest version!
part of {{pubName}}.api;

class HttpBasicAuth implements Authentication {

  String username;
  String password;

  @override
  void applyToParams(List queryParams, Map headerParams) {
    String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
    headerParams["Authorization"] = "Basic " + BASE64.encode(UTF8.encode(str));
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy