27
27
28
28
import org .gluu .casa .model .ApplicationConfiguration ;
29
29
import org .gluu .casa .core .model .CustomScript ;
30
- import org .gluu .casa .core .model .GluuOrganization ;
31
- import org .gluu .casa .core .model .oxAuthConfiguration ;
30
+ import org .gluu .casa .core .model .JansOrganization ;
31
+ import org .gluu .casa .core .model .ASConfiguration ;
32
32
import org .gluu .casa .core .model .Person ;
33
33
import org .gluu .casa .misc .Utils ;
34
34
import org .gluu .casa .service .IPersistenceService ;
@@ -57,9 +57,9 @@ public class PersistenceService implements IPersistenceService {
57
57
58
58
private String rootDn ;
59
59
60
- private JsonNode oxAuthConfDynamic ;
60
+ private JsonNode dynamicConfig ;
61
61
62
- private JsonNode oxAuthConfStatic ;
62
+ private JsonNode staticConfig ;
63
63
64
64
private Set <String > personCustomObjectClasses ;
65
65
@@ -192,39 +192,39 @@ public String getPersonDn(String id) {
192
192
}
193
193
194
194
public String getPeopleDn () {
195
- return jsonProperty (oxAuthConfStatic , "baseDn" , "people" );
195
+ return jsonProperty (staticConfig , "baseDn" , "people" );
196
196
}
197
197
198
198
public String getGroupsDn () {
199
- return jsonProperty (oxAuthConfStatic , "baseDn" , "groups" );
199
+ return jsonProperty (staticConfig , "baseDn" , "groups" );
200
200
}
201
201
202
202
public String getClientsDn () {
203
- return jsonProperty (oxAuthConfStatic , "baseDn" , "clients" );
203
+ return jsonProperty (staticConfig , "baseDn" , "clients" );
204
204
}
205
205
206
206
public String getScopesDn () {
207
- return jsonProperty (oxAuthConfStatic , "baseDn" , "scopes" );
207
+ return jsonProperty (staticConfig , "baseDn" , "scopes" );
208
208
}
209
209
210
210
public String getCustomScriptsDn () {
211
- return jsonProperty (oxAuthConfStatic , "baseDn" , "scripts" );
211
+ return jsonProperty (staticConfig , "baseDn" , "scripts" );
212
212
}
213
213
214
- public GluuOrganization getOrganization () {
215
- return get (GluuOrganization .class , rootDn );
214
+ public JansOrganization getOrganization () {
215
+ return get (JansOrganization .class , rootDn );
216
216
}
217
217
218
218
public String getIssuerUrl () {
219
- return jsonProperty (oxAuthConfDynamic , "issuer" );
219
+ return jsonProperty (dynamicConfig , "issuer" );
220
220
}
221
221
222
222
public Set <String > getPersonOCs () {
223
223
return personCustomObjectClasses ;
224
224
}
225
225
226
226
public boolean isAdmin (String userId ) {
227
- GluuOrganization organization = getOrganization ();
227
+ JansOrganization organization = getOrganization ();
228
228
List <String > dns = organization .getManagerGroups ();
229
229
230
230
Person personMember = get (Person .class , getPersonDn (userId ));
@@ -234,23 +234,23 @@ public boolean isAdmin(String userId) {
234
234
}
235
235
236
236
public String getIntrospectionEndpoint () {
237
- return jsonProperty (oxAuthConfDynamic , "introspectionEndpoint" );
237
+ return jsonProperty (dynamicConfig , "introspectionEndpoint" );
238
238
}
239
239
240
240
public String getAuthorizationEndpoint () {
241
- return jsonProperty (oxAuthConfDynamic , "authorizationEndpoint" );
241
+ return jsonProperty (dynamicConfig , "authorizationEndpoint" );
242
242
}
243
243
244
244
public String getTokenEndpoint () {
245
- return jsonProperty (oxAuthConfDynamic , "tokenEndpoint" );
245
+ return jsonProperty (dynamicConfig , "tokenEndpoint" );
246
246
}
247
247
248
248
public String getUserInfoEndpoint () {
249
- return jsonProperty (oxAuthConfDynamic , "userInfoEndpoint" );
249
+ return jsonProperty (dynamicConfig , "userInfoEndpoint" );
250
250
}
251
251
252
252
public String getJwksUri () {
253
- return jsonProperty (oxAuthConfDynamic , "jwksUri" );
253
+ return jsonProperty (dynamicConfig , "jwksUri" );
254
254
}
255
255
256
256
@ Produces
@@ -334,11 +334,11 @@ private boolean loadApplianceSettings(Properties properties) {
334
334
335
335
boolean success = false ;
336
336
try {
337
- loadOxAuthSettings (properties .getProperty ("oxauth_ConfigurationEntryDN " ));
338
- rootDn = "o=gluu " ;
337
+ loadASSettings (properties .getProperty ("jansAuth_ConfigurationEntryDN " ));
338
+ rootDn = "o=jans " ;
339
339
success = true ;
340
340
341
- GluuConfiguration gluuConf = get (GluuConfiguration .class , jsonProperty (oxAuthConfStatic , "baseDn" , "configuration" ));
341
+ GluuConfiguration gluuConf = get (GluuConfiguration .class , jsonProperty (staticConfig , "baseDn" , "configuration" ));
342
342
cacheConfiguration = gluuConf .getCacheConfiguration ();
343
343
documentStoreConfiguration = gluuConf .getDocumentStoreConfiguration ();
344
344
} catch (Exception e ) {
@@ -348,13 +348,13 @@ private boolean loadApplianceSettings(Properties properties) {
348
348
349
349
}
350
350
351
- private void loadOxAuthSettings (String dn ) throws Exception {
351
+ private void loadASSettings (String dn ) throws Exception {
352
352
353
- oxAuthConfiguration conf = get (oxAuthConfiguration .class , dn );
354
- oxAuthConfDynamic = mapper .readTree (conf .getJansConfStatic ());
355
- oxAuthConfStatic = mapper .readTree (conf .getJansConfDyn ());
353
+ ASConfiguration conf = get (ASConfiguration .class , dn );
354
+ dynamicConfig = mapper .readTree (conf .getJansConfStatic ());
355
+ staticConfig = mapper .readTree (conf .getJansConfDyn ());
356
356
357
- personCustomObjectClasses = Optional .ofNullable (oxAuthConfDynamic .get ("personCustomObjectClassList" ))
357
+ personCustomObjectClasses = Optional .ofNullable (dynamicConfig .get ("personCustomObjectClassList" ))
358
358
.map (node -> {
359
359
try {
360
360
Set <String > ocs = new HashSet <>();
0 commit comments