idek man
Some checks failed
CI / Get Changed Files (pull_request) Successful in 6s
CI / prettier (pull_request) Failing after 23s
CI / Checkstyle Main (pull_request) Successful in 44s
CI / test-build (pull_request) Failing after 55s
CI / eslint (pull_request) Failing after 57s

This commit is contained in:
csimonis 2025-03-13 12:28:52 +01:00 committed by Constantin Simonis
parent e848b548b5
commit 242b72ca45
No known key found for this signature in database
GPG key ID: 3878FF77C24AF4D2
7 changed files with 55 additions and 26 deletions

View file

@ -11,9 +11,6 @@ public class CustomJwtAuthenticationConverter implements Converter<Jwt, Abstract
@Override
public AbstractAuthenticationToken convert(Jwt source) {
JwtGrantedAuthoritiesConverter authoritiesConverter = new JwtGrantedAuthoritiesConverter();
authoritiesConverter.setAuthorityPrefix("ROLE_"); // Ensure roles have the prefix
authoritiesConverter.setAuthoritiesClaimName("roles"); // Use Authentik's claim for roles
JwtAuthenticationConverter converter = new JwtAuthenticationConverter();
converter.setJwtGrantedAuthoritiesConverter(authoritiesConverter);

View file

@ -4,7 +4,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer;
import org.springframework.security.web.SecurityFilterChain;
@Configuration