Commit cd7a7ce4250ffd6b895cbbb4f9e5dbc982f0494d
1 parent
1f1cc84a
Renamed domainDtos to domainParams
Showing
3 changed files
with
6 additions
and
6 deletions
... | ... | @@ -26,5 +26,5 @@ import java.util.Set; |
26 | 26 | @AllArgsConstructor |
27 | 27 | public class OAuth2ClientsParams { |
28 | 28 | private boolean enabled; |
29 | - private Set<OAuth2ClientsDomainParams> oAuth2DomainDtos; | |
29 | + private Set<OAuth2ClientsDomainParams> domainsParams; | |
30 | 30 | } |
\ No newline at end of file | ... | ... |
... | ... | @@ -72,7 +72,7 @@ public class OAuth2ServiceImpl extends AbstractEntityService implements OAuth2Se |
72 | 72 | clientParamsValidator.accept(oauth2Params); |
73 | 73 | clientRegistrationDao.deleteAll(); |
74 | 74 | clientRegistrationInfoDao.deleteAll(); |
75 | - oauth2Params.getOAuth2DomainDtos().forEach(domainParams -> { | |
75 | + oauth2Params.getDomainsParams().forEach(domainParams -> { | |
76 | 76 | domainParams.getClientRegistrations().forEach(clientRegistrationDto -> { |
77 | 77 | OAuth2ClientRegistrationInfo oAuth2ClientRegistrationInfo = OAuth2Utils.toClientRegistrationInfo(oauth2Params.isEnabled(), clientRegistrationDto); |
78 | 78 | OAuth2ClientRegistrationInfo savedClientRegistrationInfo = clientRegistrationInfoDao.save(TenantId.SYS_TENANT_ID, oAuth2ClientRegistrationInfo); |
... | ... | @@ -107,10 +107,10 @@ public class OAuth2ServiceImpl extends AbstractEntityService implements OAuth2Se |
107 | 107 | |
108 | 108 | private final Consumer<OAuth2ClientsParams> clientParamsValidator = oauth2Params -> { |
109 | 109 | if (oauth2Params == null |
110 | - || oauth2Params.getOAuth2DomainDtos() == null) { | |
110 | + || oauth2Params.getDomainsParams() == null) { | |
111 | 111 | throw new DataValidationException("Domain params should be specified!"); |
112 | 112 | } |
113 | - for (OAuth2ClientsDomainParams domainParams : oauth2Params.getOAuth2DomainDtos()) { | |
113 | + for (OAuth2ClientsDomainParams domainParams : oauth2Params.getDomainsParams()) { | |
114 | 114 | if (domainParams.getDomainInfos() == null |
115 | 115 | || domainParams.getDomainInfos().isEmpty()) { |
116 | 116 | throw new DataValidationException("List of domain configuration should be specified!"); | ... | ... |
... | ... | @@ -42,7 +42,7 @@ public class BaseOAuth2ServiceTest extends AbstractServiceTest { |
42 | 42 | public void after() { |
43 | 43 | oAuth2Service.saveOAuth2Params(EMPTY_PARAMS); |
44 | 44 | Assert.assertTrue(oAuth2Service.findAllClientRegistrationInfos().isEmpty()); |
45 | - Assert.assertTrue(oAuth2Service.findOAuth2Params().getOAuth2DomainDtos().isEmpty()); | |
45 | + Assert.assertTrue(oAuth2Service.findOAuth2Params().getDomainsParams().isEmpty()); | |
46 | 46 | } |
47 | 47 | |
48 | 48 | @Test |
... | ... | @@ -322,7 +322,7 @@ public class BaseOAuth2ServiceTest extends AbstractServiceTest { |
322 | 322 | oAuth2Service.saveOAuth2Params(clientsParams); |
323 | 323 | List<OAuth2ClientRegistrationInfo> foundClientRegistrationInfos = oAuth2Service.findAllClientRegistrationInfos(); |
324 | 324 | Assert.assertEquals(6, foundClientRegistrationInfos.size()); |
325 | - clientsParams.getOAuth2DomainDtos().stream() | |
325 | + clientsParams.getDomainsParams().stream() | |
326 | 326 | .flatMap(domainParams -> domainParams.getClientRegistrations().stream()) |
327 | 327 | .forEach(clientRegistrationDto -> |
328 | 328 | Assert.assertTrue( | ... | ... |