Skip to content

folio-sec/folio-authlete-scala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

folio-authlete-scala

A thin Authlete client library for Scala2 by FOLIO

License

Apache 2.0

Usage

Prerequisites

It uses sttp as a http interface. You'll need some sttp backend implementations you choose in your dependencies.

Currently available endpoints

/api/client/get
/api/auth/authorization
/api/auth/authorization/issue
/api/auth/authorization/fail
/api/auth/token
/api/auth/introspection
/api/auth/revocation

The default host is api.authlete.com. You can change it via host and port parameters in the Config object.

By default, it uses Jackson as a JSON parser. You may provide your own one to the Config.

Usage

val config = Config("apiKey", "apiSecret", Duration.Inf)
val sttpBackend = SttpBackendYouLike()
val service = AuthleteService(sttpBackend, config)

// Calls `/api/client/get` endpoint to get `Client`
val response = service.clientGet("clientId")

Run integration tests

We save secrets for ci tests in testdata.json, following this advice. You need gpg to be installed to encrypt/decrypt it. Run brew install gpg to install it.

Encrypt: gpg --batch --passphrase "${PASSPHRASE}" --symmetric --cipher-algo AES256 testdata.json Decrypt: gpg --batch --decrypt --passphrase="${PASSPHRASE}" --output ./testdata.out.json testdata.json.gpg

To FOLIO developers: gpg passphrase is saved in the LastPass shared folder.

About

A thin Authlete client library for Scala2 by FOLIO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages