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

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

part of {{pubName}}.api;

class OAuth implements Authentication {
  String _accessToken;

  OAuth({String accessToken}) : _accessToken = accessToken;

  @override
  void applyToParams(List queryParams, Map headerParams) {
    if (_accessToken != null) {
      headerParams["Authorization"] = "Bearer $_accessToken";
    }
  }

  set accessToken(String accessToken) => _accessToken = accessToken;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy