diff options
author | Zach Smith <zach@driver.xyz> | 2017-05-30 09:24:13 -0700 |
---|---|---|
committer | Zach Smith <zach@driver.xyz> | 2017-05-30 10:30:48 -0700 |
commit | 451e1562f55c836c0876400f5302d8732c478539 (patch) | |
tree | 62895f8c5a1a2259b2fa64e3a5e4d48eb99c49d2 /src/main/scala | |
parent | 20eac98ae18475f2d6dcaede653f6e9600673fc6 (diff) | |
download | driver-core-0.13.2.tar.gz driver-core-0.13.2.tar.bz2 driver-core-0.13.2.zip |
Trim newline from public key filev0.13.2
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/rest.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/core/rest.scala b/src/main/scala/xyz/driver/core/rest.scala index f30d1ae..0484ab1 100644 --- a/src/main/scala/xyz/driver/core/rest.scala +++ b/src/main/scala/xyz/driver/core/rest.scala @@ -223,7 +223,7 @@ package rest { object CachedTokenAuthorization { def apply[U <: User](publicKeyFile: Path, issuer: String): CachedTokenAuthorization[U] = { lazy val publicKey: PublicKey = { - val publicKeyBase64Encoded = Files.readAllBytes(publicKeyFile) + val publicKeyBase64Encoded = new String(Files.readAllBytes(publicKeyFile)).trim val publicKeyBase64Decoded = java.util.Base64.getDecoder.decode(publicKeyBase64Encoded) val spec = new X509EncodedKeySpec(publicKeyBase64Decoded) KeyFactory.getInstance("RSA").generatePublic(spec) |