1
0
mirror of synced 2026-08-04 01:07:02 +00:00

Remove SecurityHeaders

We no longer need this since Spring Framework now provides
HttpHeaders.setBearerAuth

Issue: gh-5612
This commit is contained in:
Rob Winch
2018-07-30 14:28:41 -05:00
parent c26d7dc859
commit 262c1a77c6
5 changed files with 6 additions and 53 deletions
@@ -1,42 +0,0 @@
/*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.web.http;
import org.junit.Test;
import static org.assertj.core.api.Assertions.*;
/**
* @author Rob Winch
* @since 5.1
*/
public class SecurityHeadersTests {
@Test
public void bearerTokenWhenNullThenIllegalArgumentException() {
String bearerTokenValue = null;
assertThatThrownBy(() -> SecurityHeaders.bearerToken(bearerTokenValue))
.isInstanceOf(IllegalArgumentException.class);
}
@Test
public void bearerTokenWhenEmptyStringThenIllegalArgumentException() {
assertThatThrownBy(() -> SecurityHeaders.bearerToken(""))
.isInstanceOf(IllegalArgumentException.class);
}
}