From 5fe59cc635b2b7c18f2223deae218cb23fb78e90 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Tue, 1 Nov 2022 17:39:26 -0600 Subject: [PATCH] Revert "Add configurable authorities split regex" This reverts commit e93ed6d94c6d0329ce375e20175454c2962d3b5e. This can't be merged until after the 6.0 release --- .../JwtGrantedAuthoritiesConverter.java | 20 ++----------------- .../JwtGrantedAuthoritiesConverterTests.java | 16 +-------------- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtGrantedAuthoritiesConverter.java b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtGrantedAuthoritiesConverter.java index 5fcab4f46e..ab020a3fc8 100644 --- a/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtGrantedAuthoritiesConverter.java +++ b/oauth2/oauth2-resource-server/src/main/java/org/springframework/security/oauth2/server/resource/authentication/JwtGrantedAuthoritiesConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * 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. @@ -45,14 +45,10 @@ public final class JwtGrantedAuthoritiesConverter implements Converter WELL_KNOWN_AUTHORITIES_CLAIM_NAMES = Arrays.asList("scope", "scp"); private String authorityPrefix = DEFAULT_AUTHORITY_PREFIX; - private String authoritiesSplitRegex = DEFAULT_AUTHORITIES_SPLIT_REGEX; - private String authoritiesClaimName; /** @@ -81,18 +77,6 @@ public final class JwtGrantedAuthoritiesConverter implements Converter authorities = jwtGrantedAuthoritiesConverter.convert(jwt); - assertThat(authorities).containsExactly(new SimpleGrantedAuthority("SCOPE_message:read"), - new SimpleGrantedAuthority("SCOPE_message:write")); - } - }