21
21
import java .util .List ;
22
22
import java .util .Map ;
23
23
24
+ import org .jspecify .annotations .Nullable ;
25
+
24
26
import org .springframework .boot .context .properties .ConfigurationProperties ;
25
27
import org .springframework .core .io .Resource ;
26
28
import org .springframework .security .saml2 .provider .service .registration .Saml2MessageBinding ;
@@ -76,7 +78,7 @@ public static class Registration {
76
78
/**
77
79
* Name ID format for a relying party registration.
78
80
*/
79
- private String nameIdFormat ;
81
+ private @ Nullable String nameIdFormat ;
80
82
81
83
public String getEntityId () {
82
84
return this .entityId ;
@@ -106,11 +108,11 @@ public AssertingParty getAssertingparty() {
106
108
return this .assertingparty ;
107
109
}
108
110
109
- public String getNameIdFormat () {
111
+ public @ Nullable String getNameIdFormat () {
110
112
return this .nameIdFormat ;
111
113
}
112
114
113
- public void setNameIdFormat (String nameIdFormat ) {
115
+ public void setNameIdFormat (@ Nullable String nameIdFormat ) {
114
116
this .nameIdFormat = nameIdFormat ;
115
117
}
116
118
@@ -166,26 +168,26 @@ public static class Credential {
166
168
/**
167
169
* Private key used for signing.
168
170
*/
169
- private Resource privateKeyLocation ;
171
+ private @ Nullable Resource privateKeyLocation ;
170
172
171
173
/**
172
174
* Relying Party X509Certificate shared with the identity provider.
173
175
*/
174
- private Resource certificateLocation ;
176
+ private @ Nullable Resource certificateLocation ;
175
177
176
- public Resource getPrivateKeyLocation () {
178
+ public @ Nullable Resource getPrivateKeyLocation () {
177
179
return this .privateKeyLocation ;
178
180
}
179
181
180
- public void setPrivateKeyLocation (Resource privateKey ) {
182
+ public void setPrivateKeyLocation (@ Nullable Resource privateKey ) {
181
183
this .privateKeyLocation = privateKey ;
182
184
}
183
185
184
- public Resource getCertificateLocation () {
186
+ public @ Nullable Resource getCertificateLocation () {
185
187
return this .certificateLocation ;
186
188
}
187
189
188
- public void setCertificateLocation (Resource certificate ) {
190
+ public void setCertificateLocation (@ Nullable Resource certificate ) {
189
191
this .certificateLocation = certificate ;
190
192
}
191
193
@@ -215,26 +217,26 @@ public static class Credential {
215
217
/**
216
218
* Private key used for decrypting.
217
219
*/
218
- private Resource privateKeyLocation ;
220
+ private @ Nullable Resource privateKeyLocation ;
219
221
220
222
/**
221
223
* Relying Party X509Certificate shared with the identity provider.
222
224
*/
223
- private Resource certificateLocation ;
225
+ private @ Nullable Resource certificateLocation ;
224
226
225
- public Resource getPrivateKeyLocation () {
227
+ public @ Nullable Resource getPrivateKeyLocation () {
226
228
return this .privateKeyLocation ;
227
229
}
228
230
229
- public void setPrivateKeyLocation (Resource privateKey ) {
231
+ public void setPrivateKeyLocation (@ Nullable Resource privateKey ) {
230
232
this .privateKeyLocation = privateKey ;
231
233
}
232
234
233
- public Resource getCertificateLocation () {
235
+ public @ Nullable Resource getCertificateLocation () {
234
236
return this .certificateLocation ;
235
237
}
236
238
237
- public void setCertificateLocation (Resource certificate ) {
239
+ public void setCertificateLocation (@ Nullable Resource certificate ) {
238
240
this .certificateLocation = certificate ;
239
241
}
240
242
@@ -250,32 +252,32 @@ public static class AssertingParty {
250
252
/**
251
253
* Unique identifier for the identity provider.
252
254
*/
253
- private String entityId ;
255
+ private @ Nullable String entityId ;
254
256
255
257
/**
256
258
* URI to the metadata endpoint for discovery-based configuration.
257
259
*/
258
- private String metadataUri ;
260
+ private @ Nullable String metadataUri ;
259
261
260
262
private final Singlesignon singlesignon = new Singlesignon ();
261
263
262
264
private final Verification verification = new Verification ();
263
265
264
266
private final Singlelogout singlelogout = new Singlelogout ();
265
267
266
- public String getEntityId () {
268
+ public @ Nullable String getEntityId () {
267
269
return this .entityId ;
268
270
}
269
271
270
- public void setEntityId (String entityId ) {
272
+ public void setEntityId (@ Nullable String entityId ) {
271
273
this .entityId = entityId ;
272
274
}
273
275
274
- public String getMetadataUri () {
276
+ public @ Nullable String getMetadataUri () {
275
277
return this .metadataUri ;
276
278
}
277
279
278
- public void setMetadataUri (String metadataUri ) {
280
+ public void setMetadataUri (@ Nullable String metadataUri ) {
279
281
this .metadataUri = metadataUri ;
280
282
}
281
283
@@ -299,43 +301,39 @@ public static class Singlesignon {
299
301
/**
300
302
* Remote endpoint to send authentication requests to.
301
303
*/
302
- private String url ;
304
+ private @ Nullable String url ;
303
305
304
306
/**
305
307
* Whether to redirect or post authentication requests.
306
308
*/
307
- private Saml2MessageBinding binding ;
309
+ private @ Nullable Saml2MessageBinding binding ;
308
310
309
311
/**
310
312
* Whether to sign authentication requests.
311
313
*/
312
- private Boolean signRequest ;
314
+ private @ Nullable Boolean signRequest ;
313
315
314
- public String getUrl () {
316
+ public @ Nullable String getUrl () {
315
317
return this .url ;
316
318
}
317
319
318
- public void setUrl (String url ) {
320
+ public void setUrl (@ Nullable String url ) {
319
321
this .url = url ;
320
322
}
321
323
322
- public Saml2MessageBinding getBinding () {
324
+ public @ Nullable Saml2MessageBinding getBinding () {
323
325
return this .binding ;
324
326
}
325
327
326
- public void setBinding (Saml2MessageBinding binding ) {
328
+ public void setBinding (@ Nullable Saml2MessageBinding binding ) {
327
329
this .binding = binding ;
328
330
}
329
331
330
- public boolean isSignRequest () {
331
- return this .signRequest ;
332
- }
333
-
334
- public Boolean getSignRequest () {
332
+ public @ Nullable Boolean getSignRequest () {
335
333
return this .signRequest ;
336
334
}
337
335
338
- public void setSignRequest (Boolean signRequest ) {
336
+ public void setSignRequest (@ Nullable Boolean signRequest ) {
339
337
this .signRequest = signRequest ;
340
338
}
341
339
@@ -365,13 +363,13 @@ public static class Credential {
365
363
* Locations of the X.509 certificate used for verification of incoming
366
364
* SAML messages.
367
365
*/
368
- private Resource certificate ;
366
+ private @ Nullable Resource certificate ;
369
367
370
- public Resource getCertificateLocation () {
368
+ public @ Nullable Resource getCertificateLocation () {
371
369
return this .certificate ;
372
370
}
373
371
374
- public void setCertificateLocation (Resource certificate ) {
372
+ public void setCertificateLocation (@ Nullable Resource certificate ) {
375
373
this .certificate = certificate ;
376
374
}
377
375
@@ -389,39 +387,39 @@ public static class Singlelogout {
389
387
/**
390
388
* Location where SAML2 LogoutRequest gets sent to.
391
389
*/
392
- private String url ;
390
+ private @ Nullable String url ;
393
391
394
392
/**
395
393
* Location where SAML2 LogoutResponse gets sent to.
396
394
*/
397
- private String responseUrl ;
395
+ private @ Nullable String responseUrl ;
398
396
399
397
/**
400
398
* Whether to redirect or post logout requests.
401
399
*/
402
- private Saml2MessageBinding binding ;
400
+ private @ Nullable Saml2MessageBinding binding ;
403
401
404
- public String getUrl () {
402
+ public @ Nullable String getUrl () {
405
403
return this .url ;
406
404
}
407
405
408
- public void setUrl (String url ) {
406
+ public void setUrl (@ Nullable String url ) {
409
407
this .url = url ;
410
408
}
411
409
412
- public String getResponseUrl () {
410
+ public @ Nullable String getResponseUrl () {
413
411
return this .responseUrl ;
414
412
}
415
413
416
- public void setResponseUrl (String responseUrl ) {
414
+ public void setResponseUrl (@ Nullable String responseUrl ) {
417
415
this .responseUrl = responseUrl ;
418
416
}
419
417
420
- public Saml2MessageBinding getBinding () {
418
+ public @ Nullable Saml2MessageBinding getBinding () {
421
419
return this .binding ;
422
420
}
423
421
424
- public void setBinding (Saml2MessageBinding binding ) {
422
+ public void setBinding (@ Nullable Saml2MessageBinding binding ) {
425
423
this .binding = binding ;
426
424
}
427
425
0 commit comments