A pure functional Scala client for Openstack Keystone implemented using Http4s client.
Supported endpoints:
- Authentication and token management
- Multi factor authentication is not implemented.
- Domains
- Groups
- Projects
- Regions
- Roles
- System Role Assignments
- Service catalog and endpoints
- Users
Unsupported endpoints (we accept PRs :)):
Add the following dependency to your build.sbt
:
libraryDependencies += "pt.tecnico.dsi" %% "scala-keystone-client" % "0.0.0"
We use semantic versioning.
import scala.concurrent.ExecutionContext.Implicits.global
import cats.effect._
import org.http4s.client.blaze.BlazeClientBuilder
import pt.tecnico.dsi.openstack.keystone.KeystoneClient
object Example extends IOApp {
override def run(args: List[String]): IO[ExitCode] = {
BlazeClientBuilder[IO](global).resource.use { implicit httpClient =>
for {
client <- KeystoneClient.fromEnvironment()
projects <- client.projects.list().compile.toList
_ = println(projects.mkString("\n"))
} yield ExitCode.Success
}
}
}
scala-keystone-client is open source and available under the MIT license.