Skip to content

Commit 10d30ec

Browse files
committed
User Authorization header
1 parent 8c27352 commit 10d30ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/src/main/java/net/hackyourfuture/coursehub/security/ApiKeyAuthenticationFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class ApiKeyAuthenticationFilter extends OncePerRequestFilter {
1616

1717
private final UserAuthenticationService userAuthenticationService;
18-
private static final String API_KEY_HEADER = "X-API-Key";
18+
private static final String AUTHORIZATION_HEADER_KEY = "Authorization";
1919

2020
public ApiKeyAuthenticationFilter(UserAuthenticationService userAuthenticationService) {
2121
this.userAuthenticationService = userAuthenticationService;
@@ -34,7 +34,7 @@ protected void doFilterInternal(
3434
return;
3535
}
3636

37-
String apiKey = request.getHeader(API_KEY_HEADER);
37+
String apiKey = request.getHeader(AUTHORIZATION_HEADER_KEY);
3838

3939
if (apiKey != null && !apiKey.isEmpty()) {
4040
// Look up user by API key

0 commit comments

Comments
 (0)