Skip to content

Commit

Permalink
Fixed Bearer authentication method format issue (#2062)
Browse files Browse the repository at this point in the history
  • Loading branch information
khyativyasargus authored Jul 3, 2023
1 parent f05cd76 commit 36eb2ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ sealed interface HttpAuthenticationMethod {

/** See https://datatracker.ietf.org/doc/html/rfc6750. */
data class Bearer(val token: String) : HttpAuthenticationMethod {
override fun getAuthorizationHeader() = "Bearer: $token"
override fun getAuthorizationHeader() = "Bearer $token"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ class HttpAuthenticatorTest {
@Test
fun `should generate bearer authentication token`() {
assertThat(HttpAuthenticationMethod.Bearer("token").getAuthorizationHeader())
.isEqualTo("Bearer: token")
.isEqualTo("Bearer token")
}
}

0 comments on commit 36eb2ba

Please sign in to comment.