
dart.auth.http_basic_auth.mustache Maven / Gradle / Ivy
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 - 2025 Weber Informatics LLC | Privacy Policy