scala-keystone-client ![license](https://camo.githubusercontent.com/6bd380c9590992dab68c09ca1d11168ee8276a1a5658e956ef0fa30601b81cde/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d4d49542d626c75652e737667)
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 :)):
Install
Add the following dependency to your build.sbt
:
libraryDependencies += "pt.tecnico.dsi" %% "scala-keystone-client" % "0.0.0"
We use semantic versioning.
Usage
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
}
}
}
License
scala-keystone-client is open source and available under the MIT license.