Improved DI for client validator

pull/1611/head
Andrea Ceccanti 2019-10-04 13:09:07 +02:00
parent 846727e9b3
commit caa687f979
1 changed files with 20 additions and 13 deletions

View File

@ -77,21 +77,28 @@ public class DefaultDynamicClientValidationService implements DynamicClientValid
public static final Logger LOG = public static final Logger LOG =
LoggerFactory.getLogger(DefaultDynamicClientValidationService.class); LoggerFactory.getLogger(DefaultDynamicClientValidationService.class);
@Autowired
private SystemScopeService scopeService; protected final SystemScopeService scopeService;
protected final AssertionValidator assertionValidator;
protected final BlacklistedSiteService blacklistService;
protected final ConfigurationPropertiesBean config;
protected final ClientDetailsEntityService clientService;
@Autowired @Autowired
@Qualifier("clientAssertionValidator") public DefaultDynamicClientValidationService(SystemScopeService scopeService,
private AssertionValidator assertionValidator; @Qualifier("clientAssertionValidator") AssertionValidator assertionValidator,
BlacklistedSiteService blacklistService, ConfigurationPropertiesBean config,
@Autowired ClientDetailsEntityService clientService) {
private BlacklistedSiteService blacklistService; this.scopeService = scopeService;
this.assertionValidator = assertionValidator;
@Autowired this.blacklistService = blacklistService;
private ConfigurationPropertiesBean config; this.config = config;
this.clientService = clientService;
@Autowired }
private ClientDetailsEntityService clientService;
public static final ImmutableSet<String> ALLOWED_GRANT_TYPES = public static final ImmutableSet<String> ALLOWED_GRANT_TYPES =
ImmutableSet.of("authorization_code", "implicit", "client_credentials", "refresh_token", ImmutableSet.of("authorization_code", "implicit", "client_credentials", "refresh_token",