title: Spring - 5 getAuthorities() still uses "ROLE_" prefix
body: <p>Dear all I am using spring 5 and like to have the ROLE_ prefix removed. Thereforre I used "grantedAuthorityDefaults" and set the role prefix to "". Unfortunatley when I call later on <code>SecurityContextHolder.getContext().getAuthentication().getAuthorities()</code> on a page without login (Public acces) than I still get values with "ROLE_" prefix "ROLE_ANONYMOUS" and my mapping logic in the JSON Rest controller Advice fails.</p>
  
  <p>Any hits at which other places I ned to declare the ROLE prefix = "" ?</p>
  
  <pre><code>@Configuration
  @EnableWebSecurity(debug = true)
  @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true, jsr250Enabled = true)
  public class WebSecurityJwtConfiguration extends WebSecurityConfigurerAdapter {
      ...
      @Bean
      public GrantedAuthorityDefaults grantedAuthorityDefaults() {
          return new GrantedAuthorityDefaults("");
      }
      ...
  }
  </code></pre>
  
  <pre><code>@RestControllerAdvice
  public class CoreSecurityJsonViewControllerAdviceimplements ResponseBodyAdvice&lt;Object&gt; {
  
      protected void beforeBodyWriteInternal(MappingJacksonValue mappingJacksonValue, MediaType mediaType, MethodParameter methodParameter, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
          if (SecurityContextHolder.getContext().getAuthentication() != null &amp;&amp; SecurityContextHolder.getContext().getAuthentication().getAuthorities() != null) {
  
             // HERE I still get values with "ROLE_" prefix
  
              Collection&lt;? extends GrantedAuthority&gt; authorities = SecurityContextHolder.getContext().getAuthentication().getAuthorities();
              Class prioritizedJsonView = this.getJsonViews(authorities);
              if (prioritizedJsonView != null) {
                  mappingJacksonValue.setSerializationView(prioritizedJsonView);
              }
          }
      }
  
      protected Class getJsonViews(Collection&lt;? extends GrantedAuthority&gt; authorities) {
          Optional var10000 = authorities.stream().map(GrantedAuthority::getAuthority).map(Role::valueOf).max(Comparator.comparing(Enum::ordinal));
          Map var10001 = View.MAPPING;
          var10001.getClass();
          return (Class)var10000.map(var10001::get).orElse((Object)null);
      }
  
      @Override
      protected Class getJsonViews(Collection&lt;? extends GrantedAuthority&gt; authorities) {
          return authorities.stream()
                  .map(GrantedAuthority::getAuthority)
                  .map(Role::valueOf)
                  .max(Comparator.comparing(Role::ordinal))
                  .map(View.MAPPING::get)
                  .orElse(null);
      }
  }
  </code></pre>