1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.core.rest.cxf;
20
21 import org.apache.syncope.common.rest.api.service.AttrRepoService;
22 import org.apache.syncope.common.rest.api.service.AuthModuleService;
23 import org.apache.syncope.common.rest.api.service.AuthProfileService;
24 import org.apache.syncope.common.rest.api.service.ClientAppService;
25 import org.apache.syncope.common.rest.api.service.OIDCJWKSService;
26 import org.apache.syncope.common.rest.api.service.SAML2IdPEntityService;
27 import org.apache.syncope.common.rest.api.service.SAML2SPEntityService;
28 import org.apache.syncope.common.rest.api.service.SRARouteService;
29 import org.apache.syncope.common.rest.api.service.wa.GoogleMfaAuthAccountService;
30 import org.apache.syncope.common.rest.api.service.wa.GoogleMfaAuthTokenService;
31 import org.apache.syncope.common.rest.api.service.wa.ImpersonationService;
32 import org.apache.syncope.common.rest.api.service.wa.MfaTrustStorageService;
33 import org.apache.syncope.common.rest.api.service.wa.U2FRegistrationService;
34 import org.apache.syncope.common.rest.api.service.wa.WAClientAppService;
35 import org.apache.syncope.common.rest.api.service.wa.WAConfigService;
36 import org.apache.syncope.common.rest.api.service.wa.WebAuthnRegistrationService;
37 import org.apache.syncope.core.logic.AttrRepoLogic;
38 import org.apache.syncope.core.logic.AuthModuleLogic;
39 import org.apache.syncope.core.logic.AuthProfileLogic;
40 import org.apache.syncope.core.logic.ClientAppLogic;
41 import org.apache.syncope.core.logic.OIDCJWKSLogic;
42 import org.apache.syncope.core.logic.SAML2IdPEntityLogic;
43 import org.apache.syncope.core.logic.SAML2SPEntityLogic;
44 import org.apache.syncope.core.logic.SRARouteLogic;
45 import org.apache.syncope.core.logic.wa.GoogleMfaAuthAccountLogic;
46 import org.apache.syncope.core.logic.wa.GoogleMfaAuthTokenLogic;
47 import org.apache.syncope.core.logic.wa.ImpersonationLogic;
48 import org.apache.syncope.core.logic.wa.MfaTrusStorageLogic;
49 import org.apache.syncope.core.logic.wa.U2FRegistrationLogic;
50 import org.apache.syncope.core.logic.wa.WAClientAppLogic;
51 import org.apache.syncope.core.logic.wa.WAConfigLogic;
52 import org.apache.syncope.core.logic.wa.WebAuthnRegistrationLogic;
53 import org.apache.syncope.core.rest.cxf.service.AttrRepoServiceImpl;
54 import org.apache.syncope.core.rest.cxf.service.AuthModuleServiceImpl;
55 import org.apache.syncope.core.rest.cxf.service.AuthProfileServiceImpl;
56 import org.apache.syncope.core.rest.cxf.service.ClientAppServiceImpl;
57 import org.apache.syncope.core.rest.cxf.service.OIDCJWKSServiceImpl;
58 import org.apache.syncope.core.rest.cxf.service.SAML2IdPEntityServiceImpl;
59 import org.apache.syncope.core.rest.cxf.service.SAML2SPEntityServiceImpl;
60 import org.apache.syncope.core.rest.cxf.service.SRARouteServiceImpl;
61 import org.apache.syncope.core.rest.cxf.service.wa.GoogleMfaAuthAccountServiceImpl;
62 import org.apache.syncope.core.rest.cxf.service.wa.GoogleMfaAuthTokenServiceImpl;
63 import org.apache.syncope.core.rest.cxf.service.wa.ImpersonationServiceImpl;
64 import org.apache.syncope.core.rest.cxf.service.wa.MfaTrustStorageServiceImpl;
65 import org.apache.syncope.core.rest.cxf.service.wa.U2FRegistrationServiceImpl;
66 import org.apache.syncope.core.rest.cxf.service.wa.WAClientAppServiceImpl;
67 import org.apache.syncope.core.rest.cxf.service.wa.WAConfigServiceImpl;
68 import org.apache.syncope.core.rest.cxf.service.wa.WebAuthnRegistrationServiceImpl;
69 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
70 import org.springframework.context.annotation.Bean;
71 import org.springframework.context.annotation.Configuration;
72
73 @Configuration(proxyBeanMethods = false)
74 public class AMRESTCXFContext {
75
76 @ConditionalOnMissingBean
77 @Bean
78 public AuthModuleService authModuleService(final AuthModuleLogic authModuleLogic) {
79 return new AuthModuleServiceImpl(authModuleLogic);
80 }
81
82 @ConditionalOnMissingBean
83 @Bean
84 public AttrRepoService attrRepoService(final AttrRepoLogic attrRepoLogic) {
85 return new AttrRepoServiceImpl(attrRepoLogic);
86 }
87
88 @ConditionalOnMissingBean
89 @Bean
90 public AuthProfileService authProfileService(final AuthProfileLogic authProfileLogic) {
91 return new AuthProfileServiceImpl(authProfileLogic);
92 }
93
94 @ConditionalOnMissingBean
95 @Bean
96 public ClientAppService clientAppService(final ClientAppLogic clientAppLogic) {
97 return new ClientAppServiceImpl(clientAppLogic);
98 }
99
100 @ConditionalOnMissingBean
101 @Bean
102 public GoogleMfaAuthAccountService googleMfaAuthAccountService(
103 final GoogleMfaAuthAccountLogic googleMfaAuthAccountLogic) {
104
105 return new GoogleMfaAuthAccountServiceImpl(googleMfaAuthAccountLogic);
106 }
107
108 @ConditionalOnMissingBean
109 @Bean
110 public GoogleMfaAuthTokenService googleMfaAuthTokenService(
111 final GoogleMfaAuthTokenLogic googleMfaAuthTokenLogic) {
112
113 return new GoogleMfaAuthTokenServiceImpl(googleMfaAuthTokenLogic);
114 }
115
116 @ConditionalOnMissingBean
117 @Bean
118 public ImpersonationService impersonationService(final ImpersonationLogic impersonationLogic) {
119 return new ImpersonationServiceImpl(impersonationLogic);
120 }
121
122 @ConditionalOnMissingBean
123 @Bean
124 public OIDCJWKSService oidcJWKSService(final OIDCJWKSLogic oidcJWKSLogic) {
125 return new OIDCJWKSServiceImpl(oidcJWKSLogic);
126 }
127
128 @ConditionalOnMissingBean
129 @Bean
130 public SAML2IdPEntityService saml2IdPEntityService(final SAML2IdPEntityLogic saml2IdPEntityLogic) {
131 return new SAML2IdPEntityServiceImpl(saml2IdPEntityLogic);
132 }
133
134 @ConditionalOnMissingBean
135 @Bean
136 public SAML2SPEntityService saml2SPEntityService(final SAML2SPEntityLogic saml2SPEntityLogic) {
137 return new SAML2SPEntityServiceImpl(saml2SPEntityLogic);
138 }
139
140 @ConditionalOnMissingBean
141 @Bean
142 public SRARouteService sraRouteService(final SRARouteLogic sraRouteLogic) {
143 return new SRARouteServiceImpl(sraRouteLogic);
144 }
145
146 @ConditionalOnMissingBean
147 @Bean
148 public U2FRegistrationService u2fRegistrationService(final U2FRegistrationLogic u2fRegistrationLogic) {
149 return new U2FRegistrationServiceImpl(u2fRegistrationLogic);
150 }
151
152 @ConditionalOnMissingBean
153 @Bean
154 public MfaTrustStorageService mfaTrustStorageService(final MfaTrusStorageLogic mfaTrusStorageLogic) {
155 return new MfaTrustStorageServiceImpl(mfaTrusStorageLogic);
156 }
157
158 @ConditionalOnMissingBean
159 @Bean
160 public WAClientAppService waClientAppService(final WAClientAppLogic waClientAppLogic) {
161 return new WAClientAppServiceImpl(waClientAppLogic);
162 }
163
164 @ConditionalOnMissingBean
165 @Bean
166 public WAConfigService waConfigService(final WAConfigLogic waConfigLogic) {
167 return new WAConfigServiceImpl(waConfigLogic);
168 }
169
170 @ConditionalOnMissingBean
171 @Bean
172 public WebAuthnRegistrationService webAuthnRegistrationService(
173 final WebAuthnRegistrationLogic webAuthnRegistrationLogic) {
174
175 return new WebAuthnRegistrationServiceImpl(webAuthnRegistrationLogic);
176 }
177 }