{"id":16461588,"url":"https://github.com/stringbean/sttp-scribe","last_synced_at":"2026-02-27T03:00:58.485Z","repository":{"id":57743045,"uuid":"141551526","full_name":"stringbean/sttp-scribe","owner":"stringbean","description":"sttp backend for ScribeJava","archived":false,"fork":false,"pushed_at":"2024-05-23T10:19:22.000Z","size":163,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-05T01:06:07.044Z","etag":null,"topics":["oauth2-client","scala","scribejava","sttp"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stringbean.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-19T08:53:14.000Z","updated_at":"2024-05-23T10:19:24.000Z","dependencies_parsed_at":"2024-05-22T13:54:02.716Z","dependency_job_id":"7a700611-0f1c-4c63-9c6f-1faf6c368e06","html_url":"https://github.com/stringbean/sttp-scribe","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/stringbean/sttp-scribe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fsttp-scribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fsttp-scribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fsttp-scribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fsttp-scribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringbean","download_url":"https://codeload.github.com/stringbean/sttp-scribe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringbean%2Fsttp-scribe/sbom","scorecard":{"id":855272,"data":{"date":"2025-08-11","repo":{"name":"github.com/stringbean/sttp-scribe","commit":"015d52cb776af730f4d2803cdd9efc660c789996"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/stringbean/sttp-scribe/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/stringbean/sttp-scribe/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/stringbean/sttp-scribe/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T23:45:06.959Z","repository_id":57743045,"created_at":"2025-08-23T23:45:06.959Z","updated_at":"2025-08-23T23:45:06.959Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"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":["oauth2-client","scala","scribejava","sttp"],"created_at":"2024-10-11T11:08:45.048Z","updated_at":"2026-02-27T03:00:58.463Z","avatar_url":"https://github.com/stringbean.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sttp-scribe - sttp backend for ScribeJava\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/stringbean/sttp-scribe/ci.yml)](https://github.com/stringbean/sttp-scribe/actions/workflows/ci.yml)\n[![Codacy Grade](https://img.shields.io/codacy/grade/6becacf763074472b1360c0d41cd8478.svg?label=codacy)](https://www.codacy.com/app/stringbean/sttp-scribe)\n[![Test Coverage](https://img.shields.io/codecov/c/github/stringbean/sttp-scribe/master.svg)](https://codecov.io/gh/stringbean/sttp-scribe)\n[![Maven Central - Scala 2.12](https://img.shields.io/maven-central/v/software.purpledragon/sttp-scribe_2.12.svg?label=scala%202.12)](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22sttp-scribe_2.12%22)\n[![Maven Central - Scala 2.13](https://img.shields.io/maven-central/v/software.purpledragon/sttp-scribe_2.13.svg?label=scala%202.13)](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22sttp-scribe_2.13%22)\n\nA backend implementation for [sttp](https://github.com/softwaremill/sttp) that allows you to use\n[ScribeJava](https://github.com/scribejava/scribejava) as a backend. Now you can call OAuth endpoints using sttp!\n\n## Quickstart\n\nAdd sttp-scribe, sttp and Scribe to your project:\n\n```scala\nlibraryDependencies ++= Seq(\n  \"software.purpledragon\"         %% \"sttp-scribe\"      % \u003cversion\u003e,\n  \"com.softwaremill.sttp.client\"  %% \"core\"             % \"2.3.0\",\n  \"com.github.scribejava\"         %  \"scribejava-apis\"  % \"8.3.3\",\n)\n```\n\nSetup your Scribe service:\n\n```scala\nval service = new ServiceBuilder(\"api-key\")\n  .apiSecret(\"api-secret\")\n  .callback(\"http://www.example.com/oauth_callback/\")\n  .build(GitHubApi.instance())\n```\n\nCreate a token provider:\n\n```scala\nval tokenProvider = new OAuth2TokenProvider() {\n  private var currentToken: Option[OAuth2AccessToken] = None\n\n  override def accessTokenForRequest: OAuth2AccessToken = {\n    currentToken.getOrElse { \n      // fetch from DB or another source\n    }\n  }\n\n  override def tokenRenewed(newToken: OAuth2AccessToken): Unit = {\n    currentToken = Some(newToken)\n    // persist token to DB\n  }\n}\n```\n\nThen create a `ScribeOAuth20Backend` and use sttp to make authenticated calls:\n\n```scala\nimport software.purpledragon.sttp.scribe.MonadAdaptor.Implicits.identity\n\nimplicit val monadError: MonadError[Identity] = IdMonad\nimplicit val backend: SttpBackend[Identity, Nothing, NothingT] = \n  new ScribeOAuth20Backend(service, tokenProvider)\n\nval response: Response = basicRequest\n  .get(uri\"https://api.github.com/users/octocat\")\n  .send()\n```\n\nThe Scribe backend will take care of refreshing the access token when it expires and retrying the current API call.\n\n## Asynchronous Backend\n\nScribe provides an asynchronous NIO based implementation that can be used by switching the monad:\n\n```scala\nimport software.purpledragon.sttp.scribe.MonadAdaptor.Implicits.future\n\nimplicit val ec: ExecutionContext = ExecutionContext.Implicits.global\nimplicit val monadError: MonadError[Future] = new FutureMonad()\nimplicit val backend: SttpBackend[Future, Nothing, NothingT] = \n  new ScribeOAuth20Backend(service, tokenProvider)\n\nval response: Future[Response] = basicRequest\n  .get(uri\"https://api.github.com/users/octocat\")\n  .send()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringbean%2Fsttp-scribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringbean%2Fsttp-scribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringbean%2Fsttp-scribe/lists"}