@Test public void oneLocalScope() { Collection<String> scope = newArrayList("myAppId!t1785.Read"); Collection<String> translatedScope = cut.convert(scope); assertThat(translatedScope).containsExactly("Read"); }
@Override public Set<String> convert(Collection<String> scopes) { Set<String> convertedScopes = new LinkedHashSet<>(); for (String scope : scopes) { String convertedScope = convertToLocalScope(scope); if (convertedScope != null) { convertedScopes.add(convertedScope); } } return convertedScopes; }
XsuaaScopeConverter implements ScopeConverter { @Override public Set<String> convert(Collection<String> scopes) { Set<String> convertedScopes = new LinkedHashSet<>(); for (String scope : scopes) { String convertedScope = convertToLocalScope(scope); if (convertedScope != null) { convertedScopes.add(convertedScope); } } return convertedScopes; } }
XsuaaScopeConverter implements ScopeConverter { @Override public Set<String> convert(Collection<String> scopes) { Set<String> convertedScopes = new LinkedHashSet<>(); for (String scope : scopes) { String convertedScope = convertToLocalScope(scope); if (convertedScope != null) { convertedScopes.add(convertedScope); } } return convertedScopes; } XsuaaScopeConverter(String appId); }
XsuaaScopeConverter implements ScopeConverter { @Override public Set<String> convert(Collection<String> scopes) { Set<String> convertedScopes = new LinkedHashSet<>(); for (String scope : scopes) { String convertedScope = convertToLocalScope(scope); if (convertedScope != null) { convertedScopes.add(convertedScope); } } return convertedScopes; } XsuaaScopeConverter(String appId); @Override Set<String> convert(Collection<String> scopes); }
XsuaaScopeConverter implements ScopeConverter { @Override public Set<String> convert(Collection<String> scopes) { Set<String> convertedScopes = new LinkedHashSet<>(); for (String scope : scopes) { String convertedScope = convertToLocalScope(scope); if (convertedScope != null) { convertedScopes.add(convertedScope); } } return convertedScopes; } XsuaaScopeConverter(String appId); @Override Set<String> convert(Collection<String> scopes);  }