{"id":26197546,"url":"https://github.com/acquia/ember-http-hmac","last_synced_at":"2025-10-06T19:13:52.339Z","repository":{"id":19602085,"uuid":"59764481","full_name":"acquia/ember-http-hmac","owner":"acquia","description":"An Ember addon utilizing the http-hmac-javascript library to automatically sign Ajax requests either standalone and through ember-data","archived":false,"fork":false,"pushed_at":"2023-07-18T21:31:49.000Z","size":4294,"stargazers_count":2,"open_issues_count":33,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-14T19:59:26.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acquia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-26T16:05:52.000Z","updated_at":"2023-02-16T08:22:13.000Z","dependencies_parsed_at":"2023-02-17T20:15:42.480Z","dependency_job_id":null,"html_url":"https://github.com/acquia/ember-http-hmac","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fember-http-hmac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fember-http-hmac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fember-http-hmac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acquia%2Fember-http-hmac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acquia","download_url":"https://codeload.github.com/acquia/ember-http-hmac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243147276,"owners_count":20243745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-12T02:42:45.922Z","updated_at":"2025-10-06T19:13:47.298Z","avatar_url":"https://github.com/acquia.png","language":"JavaScript","readme":"# Ember-http-hmac [![Build Status](https://travis-ci.com/acquia/ember-http-hmac.svg?token=xpbhY9xz7Z9aqH5aUfgP\u0026branch=master)](https://travis-ci.com/acquia/ember-http-hmac)\n\nThis addon provides an Ember integration for working with version 2.0 of the [HTTP HMAC Specification](https://github.com/acquia/http-hmac-spec/tree/2.0).  It wraps the [http-hmac-javascript library](https://github.com/acquia/http-hmac-javascript) and exposes signing capabilites via the request-signer service. \n\n## Configuration\nIn order to generate the authorization headers the http-hmac-javascript library needs to know the realm, public key, and secret key to use.  These values can be set either in the `config/environment.js` file or directly on the request-signer service.  Optionally, you can configure a list of headers that need to be included in the signature.  This is an array of header names that will be included if present in the request.\n\n### Setting configuration in the environment\nThe values can be set in the environment configuration by adding a section to your variables:\n\n```\nmodule.exports = function(environment) {\n  'ember-http-hmac': {\n    realm: 'your-realm',\n    publicKey: 'enter-your-public-key-here',\n    secretKey: 'enter-your-secret-key-here',\n    signedHeaders: ['header-name-1', 'header-name-2']\n  }\n};\n```\n\n### Setting configuration directly on the service\nThe same variables exist on the `request-signer` servive provided by ember-http-hmac.  Here is an example of setting the values within a component:\n\n```\nexport default Ember.Component.extend({\n  requestSigner: Ember.inject.service();\n\n  init() {\n    this._super(...arguments);\n    let signer = this.get('requestSigner');\n    signer.set('realm', 'your-realm');\n    signer.set('publicKey', 'enter-your-public-key-here');\n    signer.set('secretKey', 'enter-your-secret-key-here');\n    signer.set('signedHeader', ['header-name-1', 'header-name-2']);\n  }\n});\n```\n\n## Using the request-signer service directly\nThe basic signing functionality is available directly as the `request-signer` service to use as needed.\n\n## Installation\n\n### As an addon\nThis addon can be installed via standard ember addon installation procedures:\n* `ember install ember-http-hmac`\n\n# To Dos\n* Create a test helper to register support\n* Add configuration to disable signed headers\n\n# For Development\n\n## Installation\n\n* `git clone` this repository\n* `npm install`\n* `bower install`\n\n## Running\n\n* `ember serve`\n* Visit your app at [http://localhost:4200](http://localhost:4200).\n\n## Running Tests\n\n* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)\n* `ember test`\n* `ember test --server`\n\n## Building\n\n* `ember build`\n\nFor more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facquia%2Fember-http-hmac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facquia%2Fember-http-hmac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facquia%2Fember-http-hmac/lists"}