{"id":13507433,"url":"https://github.com/lexmag/oauther","last_synced_at":"2025-04-05T06:06:02.730Z","repository":{"id":18301687,"uuid":"21477686","full_name":"lexmag/oauther","owner":"lexmag","description":"OAuth 1.0 for Elixir","archived":false,"fork":false,"pushed_at":"2022-01-05T22:02:17.000Z","size":36,"stargazers_count":70,"open_issues_count":3,"forks_count":34,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T17:08:45.959Z","etag":null,"topics":["elixir","oauth","oauth1"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexmag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-03T21:35:54.000Z","updated_at":"2024-11-27T01:32:33.000Z","dependencies_parsed_at":"2022-08-25T11:30:15.526Z","dependency_job_id":null,"html_url":"https://github.com/lexmag/oauther","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmag%2Foauther","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmag%2Foauther/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmag%2Foauther/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmag%2Foauther/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexmag","download_url":"https://codeload.github.com/lexmag/oauther/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294537,"owners_count":20915340,"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":["elixir","oauth","oauth1"],"created_at":"2024-08-01T02:00:33.462Z","updated_at":"2025-04-05T06:06:02.706Z","avatar_url":"https://github.com/lexmag.png","language":"Elixir","funding_links":[],"categories":["Authentication"],"sub_categories":[],"readme":"# OAuther\n\n[![CI Status](https://github.com/lexmag/oauther/workflows/CI/badge.svg)](https://github.com/lexmag/oauther/actions/workflows/ci.yml)\n[![Hex Version](https://img.shields.io/hexpm/v/oauther.svg)](https://hex.pm/packages/oauther)\n\nOAuther is a library to authenticate using the [OAuth 1.0](http://tools.ietf.org/html/rfc5849) protocol.\n\nAll the standard signature methods are supported:\n\n* HMAC-SHA1\n* RSA-SHA1\n* PLAINTEXT\n\nThis library also supports non-standard signature methods (that replace SHA-1 with stronger hashing algorithms):\n\n* HMAC-SHA256\n\n## Installation\n\nAdd the `:oauther` dependency to your `mix.exs` file:\n\n```elixir\ndefp deps do\n  [{:oauther, \"~\u003e 1.1\"}]\nend\n```\n\nThen, run `mix deps.get` in your shell to fetch the dependencies.\n\n## Usage\n\nThe example below shows the use of [hackney HTTP client](https://github.com/benoitc/hackney)\nfor interacting with the Twitter API.\nProtocol parameters are transmitted using the HTTP \"Authorization\" header.\n\n```elixir\ncreds = OAuther.credentials(consumer_key: \"dpf43f3p2l4k3l03\", consumer_secret: \"kd94hf93k423kf44\", token: \"nnch734d00sl2jdk\", token_secret: \"pfkkdhi9sl3r4s00\")\n#=\u003e %OAuther.Credentials{\n#=\u003e   consumer_key: \"dpf43f3p2l4k3l03\",\n#=\u003e   consumer_secret: \"kd94hf93k423kf44\",\n#=\u003e   method: :hmac_sha1,\n#=\u003e   token: \"nnch734d00sl2jdk\",\n#=\u003e   token_secret: \"pfkkdhi9sl3r4s00\"\n#=\u003e }\n\nparams = OAuther.sign(\"post\", \"https://api.twitter.com/1.1/statuses/lookup.json\", [{\"id\", 485086311205048320}], creds)\n#=\u003e [\n#=\u003e   {\"oauth_signature\", \"ariK9GrGLzeEJDwQcmOTlf7jxeo=\"},\n#=\u003e   {\"oauth_consumer_key\", \"dpf43f3p2l4k3l03\"},\n#=\u003e   {\"oauth_nonce\", \"L6a3Y1NeNwbU9Sqd6XnwNU+pjm6o0EyA\"},\n#=\u003e   {\"oauth_signature_method\", \"HMAC-SHA1\"},\n#=\u003e   {\"oauth_timestamp\", 1517250224},\n#=\u003e   {\"oauth_version\", \"1.0\"},\n#=\u003e   {\"oauth_token\", \"nnch734d00sl2jdk\"},\n#=\u003e   {\"id\", 485086311205048320}\n#=\u003e ]\n\n{header, req_params} = OAuther.header(params)\n#=\u003e {{\"Authorization\",\n#=\u003e   \"OAuth oauth_signature=\\\"ariK9GrGLzeEJDwQcmOTlf7jxeo%3D\\\", oauth_consumer_key=\\\"dpf43f3p2l4k3l03\\\", oauth_nonce=\\\"L6a3Y1NeNwbU9Sqd6XnwNU%2Bpjm6o0EyA\\\", oauth_signature_method=\\\"HMAC-SHA1\\\", oauth_timestamp=\\\"1517250224\\\", oauth_version=\\\"1.0\\\", oauth_token=\\\"nnch734d00sl2jdk\\\"\"},\n#=\u003e  [{\"id\", 485086311205048320}]}\n\n:hackney.post(\"https://api.twitter.com/1.1/statuses/lookup.json\", [header], {:form, req_params})\n#=\u003e {:ok, 200, [...], #Reference\u003c0.0.0.837\u003e}\n```\n\n## License\n\nOAuther is released under [the ISC license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmag%2Foauther","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexmag%2Foauther","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmag%2Foauther/lists"}