diff options
Diffstat (limited to 'src/main/scala/google')
-rw-r--r-- | src/main/scala/google/OAuth2.scala | 8 | ||||
-rw-r--r-- | src/main/scala/google/api.scala | 6 |
2 files changed, 8 insertions, 6 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") ) } diff --git a/src/main/scala/google/api.scala b/src/main/scala/google/api.scala index 17db031..39fc16d 100644 --- a/src/main/scala/google/api.scala +++ b/src/main/scala/google/api.scala @@ -24,9 +24,11 @@ object TraceSpan { sealed trait SpanKind // Unspecified case object Unspecified extends SpanKind - // Indicates that the span covers server-side handling of an RPC or other remote network request. + // Indicates that the span covers server-side handling of an RPC or other + // remote network request. case object RpcServer extends SpanKind - // Indicates that the span covers the client-side wrapper around an RPC or other remote request. + // Indicates that the span covers the client-side wrapper around an RPC or + // other remote request. case object RpcClient extends SpanKind object SpanKind { |