Add setBearerAuth method

Issue: SPR-16997
This commit is contained in:
Arjen Poutsma
2018-07-09 17:06:55 +02:00
parent a663454fad
commit 2ac6a15f6f
2 changed files with 23 additions and 1 deletions

View File

@@ -549,4 +549,13 @@ public class HttpHeadersTests {
headers.setBasicAuth(username, password);
}
@Test
public void bearerAuth() {
String token = "foo";
headers.setBearerAuth(token);
String authorization = headers.getFirst(HttpHeaders.AUTHORIZATION);
assertEquals("Bearer foo", authorization);
}
}