Add setBearerAuth method
Issue: SPR-16997
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user