|
1
|
|
|
package org.apereo.cas.configuration.model.support.pac4j; |
|
2
|
|
|
|
|
3
|
|
|
import org.apereo.cas.configuration.support.RequiresModule; |
|
4
|
|
|
|
|
5
|
|
|
import java.io.Serializable; |
|
6
|
|
|
import java.util.ArrayList; |
|
7
|
|
|
import java.util.List; |
|
8
|
|
|
|
|
9
|
|
|
/** |
|
10
|
|
|
* This is {@link Pac4jProperties}. |
|
11
|
|
|
* |
|
12
|
|
|
* @author Misagh Moayyed |
|
13
|
|
|
* @since 5.0.0 |
|
14
|
|
|
*/ |
|
15
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
16
|
|
|
public class Pac4jProperties implements Serializable { |
|
17
|
|
|
|
|
18
|
|
|
private static final long serialVersionUID = 4388567744591488495L; |
|
19
|
|
|
/** |
|
20
|
|
|
* When constructing the final user profile from |
|
21
|
|
|
* the delegated provider, determines if the provider id |
|
22
|
|
|
* should be combined with the principal id. |
|
23
|
|
|
*/ |
|
24
|
|
|
private boolean typedIdUsed; |
|
25
|
|
|
/** |
|
26
|
|
|
* Whether CAS should auto-redirect to the provider. |
|
27
|
|
|
*/ |
|
28
|
|
|
private boolean autoRedirect; |
|
29
|
|
|
/** |
|
30
|
|
|
* Settings that deal with having Facebook as an external delegated-to authentication provider. |
|
31
|
|
|
*/ |
|
32
|
|
|
private Facebook facebook = new Facebook(); |
|
33
|
|
|
/** |
|
34
|
|
|
* Settings that deal with having Twitter as an external delegated-to authentication provider. |
|
35
|
|
|
*/ |
|
36
|
|
|
private Twitter twitter = new Twitter(); |
|
37
|
|
|
/** |
|
38
|
|
|
* Settings that deal with having SAML2 IdPs as an external delegated-to authentication provider. |
|
39
|
|
|
*/ |
|
40
|
|
|
private List<Pac4jSamlProperties> saml = new ArrayList<>(); |
|
41
|
|
|
/** |
|
42
|
|
|
* Settings that deal with having OpenID Connect Providers as an external delegated-to authentication provider. |
|
43
|
|
|
*/ |
|
44
|
|
|
private List<Pac4jOidcProperties> oidc = new ArrayList<>(); |
|
45
|
|
|
/** |
|
46
|
|
|
* Settings that deal with having OAuth2-capable providers as an external delegated-to authentication provider. |
|
47
|
|
|
*/ |
|
48
|
|
|
private List<Pac4jOAuth20Properties> oauth2 = new ArrayList<>(); |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* Settings that deal with having CAS Servers as an external delegated-to authentication provider. |
|
52
|
|
|
*/ |
|
53
|
|
|
private List<Pac4jCasProperties> cas = new ArrayList<>(); |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* Settings that deal with having LinkedIn as an external delegated-to authentication provider. |
|
57
|
|
|
*/ |
|
58
|
|
|
private LinkedIn linkedIn = new LinkedIn(); |
|
59
|
|
|
/** |
|
60
|
|
|
* Settings that deal with having Dropbox as an external delegated-to authentication provider. |
|
61
|
|
|
*/ |
|
62
|
|
|
private Dropbox dropbox = new Dropbox(); |
|
63
|
|
|
/** |
|
64
|
|
|
* Settings that deal with having Orcid as an external delegated-to authentication provider. |
|
65
|
|
|
*/ |
|
66
|
|
|
private Orcid orcid = new Orcid(); |
|
67
|
|
|
/** |
|
68
|
|
|
* Settings that deal with having Github as an external delegated-to authentication provider. |
|
69
|
|
|
*/ |
|
70
|
|
|
private Github github = new Github(); |
|
71
|
|
|
/** |
|
72
|
|
|
* Settings that deal with having Google as an external delegated-to authentication provider. |
|
73
|
|
|
*/ |
|
74
|
|
|
private Google google = new Google(); |
|
75
|
|
|
/** |
|
76
|
|
|
* Settings that deal with having Yahoo as an external delegated-to authentication provider. |
|
77
|
|
|
*/ |
|
78
|
|
|
private Yahoo yahoo = new Yahoo(); |
|
79
|
|
|
/** |
|
80
|
|
|
* Settings that deal with having FourSquare as an external delegated-to authentication provider. |
|
81
|
|
|
*/ |
|
82
|
|
|
private Foursquare foursquare = new Foursquare(); |
|
83
|
|
|
/** |
|
84
|
|
|
* Settings that deal with having WindowsLive as an external delegated-to authentication provider. |
|
85
|
|
|
*/ |
|
86
|
|
|
private WindowsLive windowsLive = new WindowsLive(); |
|
87
|
|
|
/** |
|
88
|
|
|
* Settings that deal with having Paypal as an external delegated-to authentication provider. |
|
89
|
|
|
*/ |
|
90
|
|
|
private Paypal paypal = new Paypal(); |
|
91
|
|
|
/** |
|
92
|
|
|
* Settings that deal with having WordPress as an external delegated-to authentication provider. |
|
93
|
|
|
*/ |
|
94
|
|
|
private Wordpress wordpress = new Wordpress(); |
|
95
|
|
|
/** |
|
96
|
|
|
* Settings that deal with having BitBucket as an external delegated-to authentication provider. |
|
97
|
|
|
*/ |
|
98
|
|
|
private Bitbucket bitbucket = new Bitbucket(); |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* The name of the authentication handler in CAS used for delegation. |
|
102
|
|
|
*/ |
|
103
|
|
|
private String name; |
|
104
|
|
|
|
|
105
|
|
|
public List<Pac4jOAuth20Properties> getOauth2() { |
|
106
|
|
|
return oauth2; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
public void setOauth2(final List<Pac4jOAuth20Properties> oauth2) { |
|
110
|
|
|
this.oauth2 = oauth2; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
public String getName() { |
|
114
|
|
|
return name; |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
public void setName(final String name) { |
|
118
|
|
|
this.name = name; |
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
public boolean isAutoRedirect() { |
|
122
|
|
|
return autoRedirect; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
public void setAutoRedirect(final boolean autoRedirect) { |
|
126
|
|
|
this.autoRedirect = autoRedirect; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
public Bitbucket getBitbucket() { |
|
130
|
|
|
return bitbucket; |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
public void setBitbucket(final Bitbucket bitbucket) { |
|
134
|
|
|
this.bitbucket = bitbucket; |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
public Wordpress getWordpress() { |
|
138
|
|
|
return wordpress; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
public void setWordpress(final Wordpress wordpress) { |
|
142
|
|
|
this.wordpress = wordpress; |
|
143
|
|
|
} |
|
144
|
|
|
|
|
145
|
|
|
public Paypal getPaypal() { |
|
146
|
|
|
return paypal; |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
|
|
public void setPaypal(final Paypal paypal) { |
|
150
|
|
|
this.paypal = paypal; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
public LinkedIn getLinkedIn() { |
|
154
|
|
|
return linkedIn; |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
public void setLinkedIn(final LinkedIn linkedIn) { |
|
158
|
|
|
this.linkedIn = linkedIn; |
|
159
|
|
|
} |
|
160
|
|
|
|
|
161
|
|
|
public WindowsLive getWindowsLive() { |
|
162
|
|
|
return windowsLive; |
|
163
|
|
|
} |
|
164
|
|
|
|
|
165
|
|
|
public void setWindowsLive(final WindowsLive windowsLive) { |
|
166
|
|
|
this.windowsLive = windowsLive; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
public Dropbox getDropbox() { |
|
170
|
|
|
return dropbox; |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
public void setDropbox(final Dropbox dropbox) { |
|
174
|
|
|
this.dropbox = dropbox; |
|
175
|
|
|
} |
|
176
|
|
|
|
|
177
|
|
|
public Github getGithub() { |
|
178
|
|
|
return github; |
|
179
|
|
|
} |
|
180
|
|
|
|
|
181
|
|
|
public void setGithub(final Github github) { |
|
182
|
|
|
this.github = github; |
|
183
|
|
|
} |
|
184
|
|
|
|
|
185
|
|
|
public Google getGoogle() { |
|
186
|
|
|
return google; |
|
187
|
|
|
} |
|
188
|
|
|
|
|
189
|
|
|
public void setGoogle(final Google google) { |
|
190
|
|
|
this.google = google; |
|
191
|
|
|
} |
|
192
|
|
|
|
|
193
|
|
|
public Yahoo getYahoo() { |
|
194
|
|
|
return yahoo; |
|
195
|
|
|
} |
|
196
|
|
|
|
|
197
|
|
|
public void setYahoo(final Yahoo yahoo) { |
|
198
|
|
|
this.yahoo = yahoo; |
|
199
|
|
|
} |
|
200
|
|
|
|
|
201
|
|
|
public Foursquare getFoursquare() { |
|
202
|
|
|
return foursquare; |
|
203
|
|
|
} |
|
204
|
|
|
|
|
205
|
|
|
public void setFoursquare(final Foursquare foursquare) { |
|
206
|
|
|
this.foursquare = foursquare; |
|
207
|
|
|
} |
|
208
|
|
|
|
|
209
|
|
|
public boolean isTypedIdUsed() { |
|
210
|
|
|
return typedIdUsed; |
|
211
|
|
|
} |
|
212
|
|
|
|
|
213
|
|
|
public void setTypedIdUsed(final boolean typedIdUsed) { |
|
214
|
|
|
this.typedIdUsed = typedIdUsed; |
|
215
|
|
|
} |
|
216
|
|
|
|
|
217
|
|
|
public void setFacebook(final Facebook facebook) { |
|
218
|
|
|
this.facebook = facebook; |
|
219
|
|
|
} |
|
220
|
|
|
|
|
221
|
|
|
public void setTwitter(final Twitter twitter) { |
|
222
|
|
|
this.twitter = twitter; |
|
223
|
|
|
} |
|
224
|
|
|
|
|
225
|
|
|
public void setSaml(final List<Pac4jSamlProperties> saml) { |
|
226
|
|
|
this.saml = saml; |
|
227
|
|
|
} |
|
228
|
|
|
|
|
229
|
|
|
public void setOidc(final List<Pac4jOidcProperties> oidc) { |
|
230
|
|
|
this.oidc = oidc; |
|
231
|
|
|
} |
|
232
|
|
|
|
|
233
|
|
|
public void setCas(final List<Pac4jCasProperties> cas) { |
|
234
|
|
|
this.cas = cas; |
|
235
|
|
|
} |
|
236
|
|
|
|
|
237
|
|
|
public List<Pac4jCasProperties> getCas() { |
|
238
|
|
|
return this.cas; |
|
239
|
|
|
} |
|
240
|
|
|
|
|
241
|
|
|
public List<Pac4jSamlProperties> getSaml() { |
|
242
|
|
|
return this.saml; |
|
243
|
|
|
} |
|
244
|
|
|
|
|
245
|
|
|
public List<Pac4jOidcProperties> getOidc() { |
|
246
|
|
|
return this.oidc; |
|
247
|
|
|
} |
|
248
|
|
|
|
|
249
|
|
|
public Facebook getFacebook() { |
|
250
|
|
|
return this.facebook; |
|
251
|
|
|
} |
|
252
|
|
|
|
|
253
|
|
|
public Twitter getTwitter() { |
|
254
|
|
|
return this.twitter; |
|
255
|
|
|
} |
|
256
|
|
|
|
|
257
|
|
|
public Orcid getOrcid() { |
|
258
|
|
|
return orcid; |
|
259
|
|
|
} |
|
260
|
|
|
|
|
261
|
|
|
public void setOrcid(final Orcid orcid) { |
|
262
|
|
|
this.orcid = orcid; |
|
263
|
|
|
} |
|
264
|
|
|
|
|
265
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
266
|
|
|
public static class LinkedIn extends Pac4jGenericClientProperties { |
|
267
|
|
|
|
|
268
|
|
|
private static final long serialVersionUID = 4633395854143281872L; |
|
269
|
|
|
/** |
|
270
|
|
|
* The requested scope. |
|
271
|
|
|
*/ |
|
272
|
|
|
private String scope; |
|
273
|
|
|
/** |
|
274
|
|
|
* Custom fields to include in the request. |
|
275
|
|
|
*/ |
|
276
|
|
|
private String fields; |
|
277
|
|
|
|
|
278
|
|
|
public LinkedIn() { |
|
279
|
|
|
setClientName("LinkedIn"); |
|
280
|
|
|
} |
|
281
|
|
|
|
|
282
|
|
|
public String getScope() { |
|
283
|
|
|
return this.scope; |
|
284
|
|
|
} |
|
285
|
|
|
|
|
286
|
|
|
public void setScope(final String scope) { |
|
287
|
|
|
this.scope = scope; |
|
288
|
|
|
} |
|
289
|
|
|
|
|
290
|
|
|
public String getFields() { |
|
291
|
|
|
return this.fields; |
|
292
|
|
|
} |
|
293
|
|
|
|
|
294
|
|
|
public void setFields(final String fields) { |
|
295
|
|
|
this.fields = fields; |
|
296
|
|
|
} |
|
297
|
|
|
} |
|
298
|
|
|
|
|
299
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
300
|
|
|
public static class Facebook extends Pac4jGenericClientProperties { |
|
301
|
|
|
private static final long serialVersionUID = -2737594266552466076L; |
|
302
|
|
|
/** |
|
303
|
|
|
* The requested scope. |
|
304
|
|
|
*/ |
|
305
|
|
|
private String scope; |
|
306
|
|
|
/** |
|
307
|
|
|
* Custom fields to include in the request. |
|
308
|
|
|
*/ |
|
309
|
|
|
private String fields; |
|
310
|
|
|
|
|
311
|
|
|
public Facebook() { |
|
312
|
|
|
setClientName("Facebook"); |
|
313
|
|
|
} |
|
314
|
|
|
|
|
315
|
|
|
public String getScope() { |
|
316
|
|
|
return this.scope; |
|
317
|
|
|
} |
|
318
|
|
|
|
|
319
|
|
|
public void setScope(final String scope) { |
|
320
|
|
|
this.scope = scope; |
|
321
|
|
|
} |
|
322
|
|
|
|
|
323
|
|
|
public String getFields() { |
|
324
|
|
|
return this.fields; |
|
325
|
|
|
} |
|
326
|
|
|
|
|
327
|
|
|
public void setFields(final String fields) { |
|
328
|
|
|
this.fields = fields; |
|
329
|
|
|
} |
|
330
|
|
|
} |
|
331
|
|
|
|
|
332
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
333
|
|
|
public static class Bitbucket extends Pac4jGenericClientProperties { |
|
334
|
|
|
private static final long serialVersionUID = -6189494666598669078L; |
|
335
|
|
|
|
|
336
|
|
|
public Bitbucket() { |
|
337
|
|
|
setClientName("Bitbucket"); |
|
338
|
|
|
} |
|
339
|
|
|
} |
|
340
|
|
|
|
|
341
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
342
|
|
|
public static class Wordpress extends Pac4jGenericClientProperties { |
|
343
|
|
|
private static final long serialVersionUID = 4636855941699435914L; |
|
344
|
|
|
public Wordpress() { |
|
345
|
|
|
setClientName("Wordpress"); |
|
346
|
|
|
} |
|
347
|
|
|
} |
|
348
|
|
|
|
|
349
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
350
|
|
|
public static class Paypal extends Pac4jGenericClientProperties { |
|
351
|
|
|
private static final long serialVersionUID = -5663033494303169583L; |
|
352
|
|
|
public Paypal() { |
|
353
|
|
|
setClientName("Paypal"); |
|
354
|
|
|
} |
|
355
|
|
|
} |
|
356
|
|
|
|
|
357
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
358
|
|
|
public static class Twitter extends Pac4jGenericClientProperties { |
|
359
|
|
|
private static final long serialVersionUID = 6906343970517008092L; |
|
360
|
|
|
public Twitter() { |
|
361
|
|
|
setClientName("Twitter"); |
|
362
|
|
|
} |
|
363
|
|
|
} |
|
364
|
|
|
|
|
365
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
366
|
|
|
public static class Github extends Pac4jGenericClientProperties { |
|
367
|
|
|
private static final long serialVersionUID = 9217581995885784515L; |
|
368
|
|
|
public Github() { |
|
369
|
|
|
setClientName("Github"); |
|
370
|
|
|
} |
|
371
|
|
|
} |
|
372
|
|
|
|
|
373
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
374
|
|
|
public static class Yahoo extends Pac4jGenericClientProperties { |
|
375
|
|
|
private static final long serialVersionUID = 8011580257047982361L; |
|
376
|
|
|
public Yahoo() { |
|
377
|
|
|
setClientName("Yahoo"); |
|
378
|
|
|
} |
|
379
|
|
|
} |
|
380
|
|
|
|
|
381
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
382
|
|
|
public static class Foursquare extends Pac4jGenericClientProperties { |
|
383
|
|
|
private static final long serialVersionUID = -1784820695301605307L; |
|
384
|
|
|
public Foursquare() { |
|
385
|
|
|
setClientName("Foursquare"); |
|
386
|
|
|
} |
|
387
|
|
|
} |
|
388
|
|
|
|
|
389
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
390
|
|
|
public static class Dropbox extends Pac4jGenericClientProperties { |
|
391
|
|
|
private static final long serialVersionUID = -1508055128010569953L; |
|
392
|
|
|
public Dropbox() { |
|
393
|
|
|
setClientName("Dropbox"); |
|
394
|
|
|
} |
|
395
|
|
|
} |
|
396
|
|
|
|
|
397
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
398
|
|
|
public static class Orcid extends Pac4jGenericClientProperties { |
|
399
|
|
|
private static final long serialVersionUID = 1337923364401817796L; |
|
400
|
|
|
public Orcid() { |
|
401
|
|
|
setClientName("ORCID"); |
|
402
|
|
|
} |
|
403
|
|
|
} |
|
404
|
|
|
|
|
405
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
406
|
|
|
public static class WindowsLive extends Pac4jGenericClientProperties { |
|
407
|
|
|
private static final long serialVersionUID = -1816309711278174847L; |
|
408
|
|
|
public WindowsLive() { |
|
409
|
|
|
setClientName("Windows Live"); |
|
410
|
|
|
} |
|
411
|
|
|
} |
|
412
|
|
|
|
|
413
|
|
|
@RequiresModule(name = "cas-server-support-pac4j-webflow") |
|
414
|
|
|
public static class Google extends Pac4jGenericClientProperties { |
|
415
|
|
|
private static final long serialVersionUID = -3023053058552426312L; |
|
416
|
|
|
/** |
|
417
|
|
|
* The requested scope from the provider. |
|
418
|
|
|
*/ |
|
419
|
|
|
private String scope; |
|
420
|
|
|
|
|
421
|
|
|
public Google() { |
|
422
|
|
|
setClientName("Google"); |
|
423
|
|
|
} |
|
424
|
|
|
|
|
425
|
|
|
public String getScope() { |
|
426
|
|
|
return scope; |
|
427
|
|
|
} |
|
428
|
|
|
|
|
429
|
|
|
public void setScope(final String scope) { |
|
430
|
|
|
this.scope = scope; |
|
431
|
|
|
} |
|
432
|
|
|
} |
|
433
|
|
|
} |
|
434
|
|
|
|