Accept "Bearer" authorization prefix

Closes #1139
This commit is contained in:
Nassim Jahnke 2023-04-14 12:17:43 +02:00
parent 0e9e8df070
commit a0c666aebc
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 1 additions and 3 deletions

View File

@ -59,7 +59,7 @@ public class HangarAuthenticationFilter extends AbstractAuthenticationProcessing
private @Nullable String token(final HttpServletRequest request) {
final String authorizationHeader = request.getHeader(HttpHeaders.AUTHORIZATION);
if (authorizationHeader != null) {
return authorizationHeader.replace(SecurityConfig.AUTH_NAME, "").trim();
return authorizationHeader.replace(SecurityConfig.AUTH_NAME, "").replace("Bearer", "").trim();
}
final String parameter = request.getParameter("t");

View File

@ -41,8 +41,6 @@ useHead(useSeo("Hangar Version", null, route, null));
</li>
</ul>
<p mt="2">
You can see an overview graph of these milestones <Link href="https://github.com/orgs/HangarMC/projects/1/insights/2">here</Link>.
<br />
Please report bugs and other problems you encounter to our <Link href="https://github.com/HangarMC/Hangar/issues/new/choose">issue tracker</Link>.
</p>
</template>