protected List<SecurityRequirement> getSecurityRequirements(Api api) { List<SecurityRequirement> securities = new ArrayList<>(); if(api == null) { return securities; } for (Authorization auth : api.authorizations()) { if (auth.value().isEmpty()) { continue; } SecurityRequirement security = new SecurityRequirement(); security.setName(auth.value()); for (AuthorizationScope scope : auth.scopes()) { if (!scope.scope().isEmpty()) { security.addScope(scope.scope()); } } securities.add(security); } return securities; }
public SecurityRequirement scope(String scope) { this.addScope(scope); return this; }
for (AuthorizationScope scope : auth.scopes()) { if (!scope.scope().isEmpty()) { security.addScope(scope.scope());
for (AuthorizationScope scope : auth.scopes()) { if (!scope.scope().isEmpty()) { security.addScope(scope.scope());
private static List<SecurityRequirement> parseAuthorizations(Authorization[] authorizations) { final List<SecurityRequirement> result = new ArrayList<SecurityRequirement>(); for (Authorization auth : authorizations) { if (StringUtils.isNotEmpty(auth.value())) { final SecurityRequirement security = new SecurityRequirement(); security.setName(auth.value()); for (AuthorizationScope scope : auth.scopes()) { if (StringUtils.isNotEmpty(scope.scope())) { security.addScope(scope.scope()); } } result.add(security); } } return result; }
for (AuthorizationScope scope : scopes) { if (scope.scope() != null && !"".equals(scope.scope())) { security.addScope(scope.scope());
for (AuthorizationScope scope : auth.scopes()) { if (scope.scope() != null && !scope.scope().isEmpty()) { security.addScope(scope.scope());
for (AuthorizationScope scope : scopes) { if (scope.scope() != null && !"".equals(scope.scope())) { security.addScope(scope.scope());
for (AuthorizationScope scope : auth.scopes()) { if (scope.scope() != null && !scope.scope().isEmpty()) { security.addScope(scope.scope());
security.requirement(auth.value()); security.setName(auth.value()); security.addScope(auth.value()); securities.add(security);
for (AuthorizationScope scope : auth.scopes()) { if (!scope.scope().isEmpty()) { security.addScope(scope.scope());
for (AuthorizationScope scope : scopes) { if (scope.scope() != null && !"".equals(scope.scope())) { security.addScope(scope.scope());
for (AuthorizationScope scope : auth.scopes()) { if (scope.scope() != null && !scope.scope().isEmpty()) { security.addScope(scope.scope());
for (AuthorizationScope scope : scopes) { if (scope.scope() != null && !"".equals(scope.scope())) { security.addScope(scope.scope());
for (AuthorizationScope scope : auth.scopes()) { if (!scope.scope().isEmpty()) { security.addScope(scope.scope());
for (AuthorizationScope scope : auth.scopes()) { if (!scope.scope().isEmpty()) { security.addScope(scope.scope());