{"id":20420296,"url":"https://github.com/grantmacken/oauth1","last_synced_at":"2026-05-27T20:32:26.665Z","repository":{"id":72351449,"uuid":"152921373","full_name":"grantmacken/oAuth1","owner":"grantmacken","description":"xQuery lib for creating oAuth 1 protocol Authorization Headers for Twitter API calls","archived":false,"fork":false,"pushed_at":"2019-02-22T08:28:24.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-04T09:57:53.141Z","etag":null,"topics":["existdb","oauth1","twitter","xquery"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grantmacken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-13T22:59:08.000Z","updated_at":"2019-02-22T21:48:43.000Z","dependencies_parsed_at":"2023-02-28T08:15:50.547Z","dependency_job_id":null,"html_url":"https://github.com/grantmacken/oAuth1","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/grantmacken/oAuth1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantmacken%2FoAuth1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantmacken%2FoAuth1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantmacken%2FoAuth1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantmacken%2FoAuth1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grantmacken","download_url":"https://codeload.github.com/grantmacken/oAuth1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantmacken%2FoAuth1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["existdb","oauth1","twitter","xquery"],"created_at":"2024-11-15T06:42:25.399Z","updated_at":"2026-05-27T20:32:26.643Z","avatar_url":"https://github.com/grantmacken.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating oAuth 1 protocol Authorization header strings in xQuery\n\nCreate Authorization Headers for Twitter API calls via xQuery\n\n[![Build Status](https://travis-ci.org/grantmacken/oAuth1.svg?branch=master)](https://travis-ci.org/grantmacken/oAuth1)\n\n[latest release](https://github.com/grantmacken/oAuth1/releases/latest)\n\n[![GitHub tag](https://img.shields.io/github/tag/grantmacken/oAuth1.svg)](https://gitHub.com/grantmacken/oAuth1/tags/)\n[![GitHub release](https://img.shields.io/github/release/grantmacken/oAuth1/all.svg)](https://gitHub.com/grantmacken/oAuth1/releases/latest)\n\nThis lib only purpose is to enable calls to Twitter API endpoints via\n OAuth 1.0a protocol [Authorization Header](https://developer.twitter.com/en/docs/basics/authentication/guides/authorizing-a-request) \n\nBuilt upon 'http://expath.org/ns/crypto' cypto lib, version: 0.6'\nwhich provides the `cypto:hmac` function to calculate the signature.\n\n## Prior to using this library\n\nYou must obtain your twitter [access token](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens)\nfrom the [twitter apps dashboard](https://developer.twitter.com/en/apps)\nYou will end up with your 4 credential items\n\n 1. oauth_consumer_key\n 2. oauth_consumer_secret\n 3. oauth_token_secret\n 4. oauth_token\n\nNext make yourself familiar with the [Twitter API docs](https://developer.twitter.com/en/docs.html)\n\nThe API call you are most likely interest in are in the [post and engage overview section](https://developer.twitter.com/en/docs/tweets/post-and-engage/overview)\n\n## Creating a Authorization Header\n\nTh following example shows how to use the library, with your obtained credentials.\nIt creates the Authorization header string required for posting a status update to the Twitter 'statuses/update' API endpoint. The example data ( oauth_consumer_key etc ) come from the twitter [creating signatures](https://dev.twitter.com/oauth/overview/creating-signatures) and [authorizing-requests](https://dev.twitter.com/oauth/overview/authorizing-requests) example code.\nThe same example data has been used to test the library.\n\n```\ndeclare\nfunction oAuth1:example() as xs:string {\n   map {\n    'method' : 'POST',\n    'resource' : 'https://api.twitter.com/1.1/statuses/update',\n    'oauth_consumer_key' : 'xvz1evFS4wEEPTGEFPHBog',\n    'oauth_consumer_secret' : 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw',\n    'oauth_token_secret' : '370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb',\n    'oauth_token' : 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE'\n    }\n   ) =\u003e\n    oAuth1:authorizationHeader(\n    map { 'status' : 'Hello Ladies + Gentlemen, a signed OAuth request!' }\n    )\n)\n};\n\n```\n\n\n\n--------------------------\n\n# Building From Source\n\n## Repo Test Scaffolding\n\n```\n├── Makefile =\u003e run `make test` calls `prove -v bin/xQtest`\n├── bin\n│   ├── xQtest -\u003e produce TAP report\n```\n[![asciicast](https://asciinema.org/a/229036.svg)](https://asciinema.org/a/229036)\n\n### very simple smoke test\n\nsee if output from running example matches prescribed grep pattern\n\n```\n├── Makefile =\u003e run `make smoke` calls `bin/xQcall`\n├── bin\n│   ├── xQcall -\u003e runs example\n```\n\n### very very simple coverage\n\nSee if every function was called in lib by running example then inspecting trace\n\n```\n├── Makefile =\u003e run `make coverage `bin/xQcall`\n├── bin\n│   ├── xQcall -\u003e enable tracing \n               -\u003e run example \n               -\u003e stop tracing \n               -\u003e inpect trace\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantmacken%2Foauth1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantmacken%2Foauth1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantmacken%2Foauth1/lists"}