20
20
import java .util .Map ;
21
21
import java .util .Set ;
22
22
23
+ import org .jspecify .annotations .Nullable ;
24
+
23
25
import org .springframework .beans .factory .InitializingBean ;
24
26
import org .springframework .boot .context .properties .ConfigurationProperties ;
25
27
import org .springframework .util .StringUtils ;
@@ -80,106 +82,106 @@ public static class Registration {
80
82
* 'provider' property or used one of the commonly used providers (google, github,
81
83
* facebook, okta).
82
84
*/
83
- private String provider ;
85
+ private @ Nullable String provider ;
84
86
85
87
/**
86
88
* Client ID for the registration.
87
89
*/
88
- private String clientId ;
90
+ private @ Nullable String clientId ;
89
91
90
92
/**
91
93
* Client secret of the registration.
92
94
*/
93
- private String clientSecret ;
95
+ private @ Nullable String clientSecret ;
94
96
95
97
/**
96
98
* Client authentication method. May be left blank when using a pre-defined
97
99
* provider.
98
100
*/
99
- private String clientAuthenticationMethod ;
101
+ private @ Nullable String clientAuthenticationMethod ;
100
102
101
103
/**
102
104
* Authorization grant type. May be left blank when using a pre-defined provider.
103
105
*/
104
- private String authorizationGrantType ;
106
+ private @ Nullable String authorizationGrantType ;
105
107
106
108
/**
107
109
* Redirect URI. May be left blank when using a pre-defined provider.
108
110
*/
109
- private String redirectUri ;
111
+ private @ Nullable String redirectUri ;
110
112
111
113
/**
112
114
* Authorization scopes. When left blank the provider's default scopes, if any,
113
115
* will be used.
114
116
*/
115
- private Set <String > scope ;
117
+ private @ Nullable Set <String > scope ;
116
118
117
119
/**
118
120
* Client name. May be left blank when using a pre-defined provider.
119
121
*/
120
- private String clientName ;
122
+ private @ Nullable String clientName ;
121
123
122
- public String getProvider () {
124
+ public @ Nullable String getProvider () {
123
125
return this .provider ;
124
126
}
125
127
126
- public void setProvider (String provider ) {
128
+ public void setProvider (@ Nullable String provider ) {
127
129
this .provider = provider ;
128
130
}
129
131
130
- public String getClientId () {
132
+ public @ Nullable String getClientId () {
131
133
return this .clientId ;
132
134
}
133
135
134
- public void setClientId (String clientId ) {
136
+ public void setClientId (@ Nullable String clientId ) {
135
137
this .clientId = clientId ;
136
138
}
137
139
138
- public String getClientSecret () {
140
+ public @ Nullable String getClientSecret () {
139
141
return this .clientSecret ;
140
142
}
141
143
142
- public void setClientSecret (String clientSecret ) {
144
+ public void setClientSecret (@ Nullable String clientSecret ) {
143
145
this .clientSecret = clientSecret ;
144
146
}
145
147
146
- public String getClientAuthenticationMethod () {
148
+ public @ Nullable String getClientAuthenticationMethod () {
147
149
return this .clientAuthenticationMethod ;
148
150
}
149
151
150
- public void setClientAuthenticationMethod (String clientAuthenticationMethod ) {
152
+ public void setClientAuthenticationMethod (@ Nullable String clientAuthenticationMethod ) {
151
153
this .clientAuthenticationMethod = clientAuthenticationMethod ;
152
154
}
153
155
154
- public String getAuthorizationGrantType () {
156
+ public @ Nullable String getAuthorizationGrantType () {
155
157
return this .authorizationGrantType ;
156
158
}
157
159
158
- public void setAuthorizationGrantType (String authorizationGrantType ) {
160
+ public void setAuthorizationGrantType (@ Nullable String authorizationGrantType ) {
159
161
this .authorizationGrantType = authorizationGrantType ;
160
162
}
161
163
162
- public String getRedirectUri () {
164
+ public @ Nullable String getRedirectUri () {
163
165
return this .redirectUri ;
164
166
}
165
167
166
- public void setRedirectUri (String redirectUri ) {
168
+ public void setRedirectUri (@ Nullable String redirectUri ) {
167
169
this .redirectUri = redirectUri ;
168
170
}
169
171
170
- public Set <String > getScope () {
172
+ public @ Nullable Set <String > getScope () {
171
173
return this .scope ;
172
174
}
173
175
174
- public void setScope (Set <String > scope ) {
176
+ public void setScope (@ Nullable Set <String > scope ) {
175
177
this .scope = scope ;
176
178
}
177
179
178
- public String getClientName () {
180
+ public @ Nullable String getClientName () {
179
181
return this .clientName ;
180
182
}
181
183
182
- public void setClientName (String clientName ) {
184
+ public void setClientName (@ Nullable String clientName ) {
183
185
this .clientName = clientName ;
184
186
}
185
187
@@ -190,93 +192,93 @@ public static class Provider {
190
192
/**
191
193
* Authorization URI for the provider.
192
194
*/
193
- private String authorizationUri ;
195
+ private @ Nullable String authorizationUri ;
194
196
195
197
/**
196
198
* Token URI for the provider.
197
199
*/
198
- private String tokenUri ;
200
+ private @ Nullable String tokenUri ;
199
201
200
202
/**
201
203
* User info URI for the provider.
202
204
*/
203
- private String userInfoUri ;
205
+ private @ Nullable String userInfoUri ;
204
206
205
207
/**
206
208
* User info authentication method for the provider.
207
209
*/
208
- private String userInfoAuthenticationMethod ;
210
+ private @ Nullable String userInfoAuthenticationMethod ;
209
211
210
212
/**
211
213
* Name of the attribute that will be used to extract the username from the call
212
214
* to 'userInfoUri'.
213
215
*/
214
- private String userNameAttribute ;
216
+ private @ Nullable String userNameAttribute ;
215
217
216
218
/**
217
219
* JWK set URI for the provider.
218
220
*/
219
- private String jwkSetUri ;
221
+ private @ Nullable String jwkSetUri ;
220
222
221
223
/**
222
224
* URI that can either be an OpenID Connect discovery endpoint or an OAuth 2.0
223
225
* Authorization Server Metadata endpoint defined by RFC 8414.
224
226
*/
225
- private String issuerUri ;
227
+ private @ Nullable String issuerUri ;
226
228
227
- public String getAuthorizationUri () {
229
+ public @ Nullable String getAuthorizationUri () {
228
230
return this .authorizationUri ;
229
231
}
230
232
231
- public void setAuthorizationUri (String authorizationUri ) {
233
+ public void setAuthorizationUri (@ Nullable String authorizationUri ) {
232
234
this .authorizationUri = authorizationUri ;
233
235
}
234
236
235
- public String getTokenUri () {
237
+ public @ Nullable String getTokenUri () {
236
238
return this .tokenUri ;
237
239
}
238
240
239
- public void setTokenUri (String tokenUri ) {
241
+ public void setTokenUri (@ Nullable String tokenUri ) {
240
242
this .tokenUri = tokenUri ;
241
243
}
242
244
243
- public String getUserInfoUri () {
245
+ public @ Nullable String getUserInfoUri () {
244
246
return this .userInfoUri ;
245
247
}
246
248
247
- public void setUserInfoUri (String userInfoUri ) {
249
+ public void setUserInfoUri (@ Nullable String userInfoUri ) {
248
250
this .userInfoUri = userInfoUri ;
249
251
}
250
252
251
- public String getUserInfoAuthenticationMethod () {
253
+ public @ Nullable String getUserInfoAuthenticationMethod () {
252
254
return this .userInfoAuthenticationMethod ;
253
255
}
254
256
255
- public void setUserInfoAuthenticationMethod (String userInfoAuthenticationMethod ) {
257
+ public void setUserInfoAuthenticationMethod (@ Nullable String userInfoAuthenticationMethod ) {
256
258
this .userInfoAuthenticationMethod = userInfoAuthenticationMethod ;
257
259
}
258
260
259
- public String getUserNameAttribute () {
261
+ public @ Nullable String getUserNameAttribute () {
260
262
return this .userNameAttribute ;
261
263
}
262
264
263
- public void setUserNameAttribute (String userNameAttribute ) {
265
+ public void setUserNameAttribute (@ Nullable String userNameAttribute ) {
264
266
this .userNameAttribute = userNameAttribute ;
265
267
}
266
268
267
- public String getJwkSetUri () {
269
+ public @ Nullable String getJwkSetUri () {
268
270
return this .jwkSetUri ;
269
271
}
270
272
271
- public void setJwkSetUri (String jwkSetUri ) {
273
+ public void setJwkSetUri (@ Nullable String jwkSetUri ) {
272
274
this .jwkSetUri = jwkSetUri ;
273
275
}
274
276
275
- public String getIssuerUri () {
277
+ public @ Nullable String getIssuerUri () {
276
278
return this .issuerUri ;
277
279
}
278
280
279
- public void setIssuerUri (String issuerUri ) {
281
+ public void setIssuerUri (@ Nullable String issuerUri ) {
280
282
this .issuerUri = issuerUri ;
281
283
}
282
284
0 commit comments