Skip to content

Commit

Permalink
Drop NoAuthentication Auth implementation (#744)
Browse files Browse the repository at this point in the history
* Drop NoAuthentication Auth implementation

It throws upon use so isn't very useful, removing it makes sticking
to making illegal states unrepresentable easier, also just a cleanup
of unused code.

* Update build.sbt
  • Loading branch information
dmivankov authored Aug 23, 2024
1 parent 12fd00e commit 9ad7d13
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ lazy val commonSettings = Seq(
organization := "com.cognite",
organizationName := "Cognite",
organizationHomepage := Some(url("https://cognite.com")),
version := "2.28." + patchVersion,
version := "2.29." + patchVersion,
isSnapshot := patchVersion.endsWith("-SNAPSHOT"),
scalaVersion := scala213, // use 2.13 by default
// handle cross plugin https://github.com/stringbean/sbt-dependency-lock/issues/13
Expand Down
7 changes: 0 additions & 7 deletions src/main/scala/com/cognite/sdk/scala/common/auth.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ object Auth {
}
}

final case class NoAuthentication() extends Auth {
def auth[U[_], T, S](r: RequestT[U, T, S]): RequestT[U, T, S] =
throw new SdkException(
s"Authentication not provided"
)
}

final case class BearerTokenAuth(bearerToken: String) extends Auth {
def auth[U[_], T, S](r: RequestT[U, T, S]): RequestT[U, T, S] =
r.header("Authorization", s"Bearer $bearerToken")
Expand Down

0 comments on commit 9ad7d13

Please sign in to comment.