Back to directory
polyvariant avatar

sttp-oauth2

OAuth2 client library implemented in Scala using sttp. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/polyvariant/sttp-oauth2.git

80

Stars

23

Forks

8

Watchers

Apache-2.0

License

sttp-oauth2 - OAuth2 client library for Scala

This library aims to provide easy integration with OAuth2 providers based on OAuth2 RFC using sttp client. It uses circe for JSON serialization/deserialization.

Currently it supports methods (grant types) for obtaining authorization:

Quick start

To use this library add the following dependency to your build.sbt

Versions 0.19.0 and newer

"org.polyvariant" %% "sttp-oauth2" % "x.y.z"

Versions up to 0.18.0

"com.ocadotechnology" %% "sttp-oauth2" % "x.y.z"

The latest release is: release-badge

Documentation

Visit the documentation at https://sttp-oauth2.polyvariant.org for usage instructions.

Contributing

Feel free to submit feature requests and bug reports under Issues.

License

sttp-oauth2 is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Honorable mentions

sttp-oauth2 was initially created by Ocado Technology

Releases

What's Changed This release introduces a slight breaking change from v0.20.x series by removing Cats Effect 2 support, which itself is long not supported. Most users are likely not affected by this ch...

What's Changed

feat: add zio-json support by @agilesteel in #630 Update scala-library to 2.13.18 by @scala-steward in #627

Full Changelog: v0.20.1...v0.20.2

What's Changed

Update cats-effect, cats-effect-kernel, ... to 3.6.3 by @scala-steward in #605 Update sbt-scalajs, scalajs-compiler, ... to 1.20.1 by @scala-steward in #614 Update sbt, scripted-plugin...

Apr 25, 2025

v0.20.0 - upgrade to sttp4

Download .zip

This release is incompatible with the previous ones - we've upgraded the sttp dependency to v4 (thanks, @agilesteel). What's Changed

Upgrade scala-js to 0.16.0 by @majk-p in #515 Update jsoniter to 2...

What's Changed

Update scala-js-macrotask-executor to 1.1.1 by @scala-steward in #327 Update client3:core to 3.9.7 by @scala-steward in #489 Update zio, zio-test, zio-test-sbt to 2.1.2 by @scala-stewa...