aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/google/OAuth2.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2017-10-02 16:08:24 -0700
committerJakob Odersky <jakob@driver.xyz>2017-10-02 16:08:24 -0700
commitdf2c41dac7d29dea49950700b0146229947fdf65 (patch)
treed5e09ac2d1f1527e965f92d5733a5761acf8edb1 /src/main/scala/google/OAuth2.scala
parent7f4a7648894be1f07300f6d66f00ff443dc83826 (diff)
downloadtracing-df2c41dac7d29dea49950700b0146229947fdf65.tar.gz
tracing-df2c41dac7d29dea49950700b0146229947fdf65.tar.bz2
tracing-df2c41dac7d29dea49950700b0146229947fdf65.zip
Minor style changes
Diffstat (limited to 'src/main/scala/google/OAuth2.scala')
-rw-r--r--src/main/scala/google/OAuth2.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/scala/google/OAuth2.scala b/src/main/scala/google/OAuth2.scala
index d17ec78..ff010ef 100644
--- a/src/main/scala/google/OAuth2.scala
+++ b/src/main/scala/google/OAuth2.scala
@@ -29,7 +29,7 @@ object OAuth2 {
/** Request a new access token for the given scopes.
*
- * Implements the OAUTH2 workflow as descried here
+ * Implements the OAUTH2 workflow as descried in
* https://developers.google.com/identity/protocols/OAuth2ServiceAccount
*/
def requestAccessToken(
@@ -89,18 +89,18 @@ object OAuth2 {
http.system.log.info("tracing access token expired, refreshing")
requestAccessToken(http, serviceAccountFile, scopes).map {
case (newExpiration, newToken) =>
- http.system.log.debug("new tracing access token otained")
+ http.system.log.debug("new tracing access token obtained")
(request, newExpiration, newToken)
}
} else {
Future.successful((request, expiration, accessToken))
}
}
- .drop(1) // drop initial element
+ .drop(1) // drop initial, empty HttpRequest
.map {
case (request, _, accessToken) =>
request.withHeaders(
- RawHeader("Authorization", "Bearer " + accessToken)
+ RawHeader("Authorization", s"Bearer $accessToken")
)
}