@Test public void extractAuthoritiesWithoutScopes() { Jwt jwt = new JwtGenerator().getToken(); AbstractAuthenticationToken authenticationToken = tokenConverterDefault.convert(jwt); assertThat(authenticationToken.getAuthorities().size(), is(0)); }
@Override public AbstractAuthenticationToken convert(Jwt jwt) { return new AuthenticationToken(jwt, authoritiesExtractor.getAuthorities(new XsuaaToken(jwt))); }
TokenAuthenticationConverter implements Converter<Jwt, AbstractAuthenticationToken> { @Override public AbstractAuthenticationToken convert(Jwt jwt) { return new AuthenticationToken(jwt, authoritiesExtractor.getAuthorities(new XsuaaToken(jwt))); } }
TokenAuthenticationConverter implements Converter<Jwt, AbstractAuthenticationToken> { @Override public AbstractAuthenticationToken convert(Jwt jwt) { return new AuthenticationToken(jwt, authoritiesExtractor.getAuthorities(new XsuaaToken(jwt))); } TokenAuthenticationConverter(AuthoritiesExtractor authoritiesExtractor);  TokenAuthenticationConverter(String appId);  TokenAuthenticationConverter(XsuaaServiceConfiguration xsuaaServiceConfiguration); }
TokenAuthenticationConverter implements Converter<Jwt, AbstractAuthenticationToken> { @Override public AbstractAuthenticationToken convert(Jwt jwt) { return new AuthenticationToken(jwt, authoritiesExtractor.getAuthorities(new XsuaaToken(jwt))); } TokenAuthenticationConverter(AuthoritiesExtractor authoritiesExtractor);  TokenAuthenticationConverter(String appId);  TokenAuthenticationConverter(XsuaaServiceConfiguration xsuaaServiceConfiguration); @Override AbstractAuthenticationToken convert(Jwt jwt); TokenAuthenticationConverter setLocalScopeAsAuthorities(boolean extractLocalScopesOnly); }
TokenAuthenticationConverter implements Converter<Jwt, AbstractAuthenticationToken> { @Override public AbstractAuthenticationToken convert(Jwt jwt) { return new AuthenticationToken(jwt, authoritiesExtractor.getAuthorities(new XsuaaToken(jwt))); } TokenAuthenticationConverter(AuthoritiesExtractor authoritiesExtractor);  TokenAuthenticationConverter(String appId);  TokenAuthenticationConverter(XsuaaServiceConfiguration xsuaaServiceConfiguration); @Override AbstractAuthenticationToken convert(Jwt jwt); TokenAuthenticationConverter setLocalScopeAsAuthorities(boolean extractLocalScopesOnly);  }