{"id":32187870,"url":"https://github.com/mdsol/clojure-mauth-client","last_synced_at":"2026-02-27T21:06:04.342Z","repository":{"id":52220142,"uuid":"142802022","full_name":"mdsol/clojure-mauth-client","owner":"mdsol","description":"Clojure MAuth Client \u0026 Middleware","archived":false,"fork":false,"pushed_at":"2025-05-17T14:14:51.000Z","size":157,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":226,"default_branch":"master","last_synced_at":"2025-10-22T00:44:05.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.mdsol.com","language":"Clojure","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/mdsol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2018-07-29T23:10:16.000Z","updated_at":"2025-05-09T11:32:50.000Z","dependencies_parsed_at":"2025-05-15T21:25:45.216Z","dependency_job_id":"24f5bfed-9f1e-4790-9c08-81fbedc3df2a","html_url":"https://github.com/mdsol/clojure-mauth-client","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":0.1428571428571429,"last_synced_commit":"d0c520b401e95bc340e65fade85ea4a62fbf714b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mdsol/clojure-mauth-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsol%2Fclojure-mauth-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsol%2Fclojure-mauth-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsol%2Fclojure-mauth-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsol%2Fclojure-mauth-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsol","download_url":"https://codeload.github.com/mdsol/clojure-mauth-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsol%2Fclojure-mauth-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280359935,"owners_count":26317406,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"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":[],"created_at":"2025-10-22T00:44:15.948Z","updated_at":"2025-10-22T00:44:17.434Z","avatar_url":"https://github.com/mdsol.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clojure MAuth Client\n\n[![Build Status](https://travis-ci.com/mdsol/clojure-mauth-client.svg?token=16x4FpKmXowpz3fnJFpj\u0026branch=master)](https://travis-ci.com/mdsol/clojure-mauth-client)\n\nLeiningen/Boot Coords:\n\n```[clojure-mauth-client \"2.0.8\"]```\n\nHere it is folks, a nice, clean MAuth client done in the simplest and most minimal way possible, for your Clojure application.\n\nThere are a minimal set of dependencies (Bouncy Castle isn't one of them!), it is fast, and can even be used as middleware for securing your applications.\n\nYou do **NOT** need to jump through hoops to use this library. Simple is as simple does.\n\n## Building\n\nEither use the built jar, or `lein jar` to build one based on source.\n\n## Usage\n\nFirst, you need to give the library your `App UUID`, `MAuth Private Key` and `MAuth Service URL`.\n\nYou can do this by defining the environment variables `APP_UUID`, `MAUTH_KEY` and `MAUTH_SERVICE_URL` respectively.\n\nOr, you may do this programmatically by calling `credentials/define-credentials` with the respective parameters.\n\nYou can make an MAuth call by requiring the `request` namespace and either doing `get!`, `post!`, `delete!` or `put!` with the necessary parameters. \nThese are the most common verbs in use out there, but its easy to extend support to other verbs as needed (PRs welcome!).\nIf the verb you want isn't in the namespace, you can also make a call to `request/make-request` and specify your action directly.\nIt is possible to do a macro for this stuff, but I am not a big fan of that approach for this case, because you lose IDE support, and it will appear as undefined there, which is annoying.\n\n\nFull example (standard usage):\n\n```\n(ns your-app.core\n  (:require [clojure-mauth-client.request :as mauth]\n            [clojure.data.json :as json]))\n\n;either your app has to have the APP_UUID, MAUTH_KEY, and MAUTH_SERVICE_URL predefined in env...\n;or... you can call define-credentials...\n\n;do the call!\n(-\u003e (mauth/get! \"https://www.mdsol.com\" \"/api/v2/testing.json\")\n    :body\n    json/read-str)\n```\n\nMiddleware Usage:\n\n```\n(ns your-app.handler\n  (:require [clojure-mauth-client.middleware :refer [wrap-mauth-verification]]))\n  ...\n  ...\n  (-\u003e #'app-routes\n            (wrap-routes middleware/wrap-formats)\n            (wrap-mauth-verification))\n  ...\n  ...\n```\n\nYep, it really is that simple!\n\nRecently, it has come to my attention that cloudflare or cloudfront URLs (ie. api-gateway) were not supported due to SNI configuration in the load balancer. Welp, not anymore!\nTo do your calls with SNI, pass `:with-sni? true` to your calls.\n\nFor example,\n`(mauth/get! \"https://www.mdsol.com\" \"/api/v2/testing.json\" :with-sni? true)`\n\nVersion 2.0.2 update -\nWe have added support for mauth version 2 headers as well now. To get the v2 headers you need to add additional header in your request as\n\"mauth-version\" with value as \"v2\" and algorithm also uses query param if any to sign  or to generate these headers, so you will need to add additional header in your request as\n\"query-param-string\"  and value should be string of sorted and encoded query params e.g abc=abctest\u0026test=testing%20value\nyou will get the response version 2 headers as below-\n\"mcc-authentication\" authentication value\n\"mcc-time\"           mcc-time\n\nVersion 2.0.3 update -\nChanged mauth unauthorized error status code from 403 to 401 code which corresponds to the right HTTP status code for Unauthorized.\nAnd also changed signature algorithm to SHA512withRSA, previously it was SHA256withRSA.\n\nVersion 2.0.4 update -\nWith this version we have added support to validate mauth requests with v2 version and validating mcc-time and mcc-authentication headers.\n\nVersion 2.0.5 update -\nWith this version we have removed dependency of extra header \"mauth-version\" that we needed to validate mauth requests with v2 version. \nNo need to send this extra header to validate v2 version requests.\n\nVersion 2.0.6 update -\nWith this version we have removed throwing exceptions when not valid mauth headers keys are added or no valid token passed in signature.\n\nVersion 2.0.7 update-\nUpdated few of the library versions to remove vulnerability\n\nVersion 2.0.8 upsdate -\nFor mAuth Protocol V2, includes the query-string (when present), in the authentication ticket to validate the requests.\n\n## Contributing/ Tests\nTests can be run using `lein test`.\n\nContributions are welcome by Pull Request, and we welcome and encourage that!\n\n## Release\nCurrently, our releases are done manually, but the deploy is done by Travis/CI when a tag is present.\n\n### How to release\nWe use the built-in lein task `release`. This task will verify that there is nothing uncommitted, updates the release version, \ntags the release, deploys to clojars (Travis/CI) and then bumps the version to the next snapshot version (`lein bump!`). See `lein help release` for more details.\n\n1. Switch to the `master` branch\n2. Make sure you pull the latest code from Github\n3. Create a new branch. This is because main is blocked from pushing commits directly\n4. Set the upstream from this new branch `git push --set-upstream origin \u003cnew-branch\u003e`\n5. run `lein release`\n6. PR the changes created during the release\n7. Travis CI will trigger and deploy\n8. If Travis CI deploys without issues, don't merge yet, run `lein bump!`\n9. PR the changes created during the `bump!` and once approved, merge the PR.\n10. Verify if the new version was deployed to Clojars.\n11. Pat yourself on the back! You just released the latest version of the lib\n\n## License\n\nCopyright © 2018 Medidata Solutions\n\nThis Library is licensed under the MIT licensing terms. See [LICENSE.md](https://github.com/mdsol/clojure-mauth-client/blob/master/LICENSE.md) for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsol%2Fclojure-mauth-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsol%2Fclojure-mauth-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsol%2Fclojure-mauth-client/lists"}