4646import  org .springframework .security .web .webauthn .registration .PublicKeyCredentialCreationOptionsFilter ;
4747import  org .springframework .security .web .webauthn .registration .PublicKeyCredentialCreationOptionsRepository ;
4848import  org .springframework .security .web .webauthn .registration .WebAuthnRegistrationFilter ;
49+ import  org .springframework .util .Assert ;
4950
5051/** 
5152 * Configures WebAuthn for Spring Security applications 
@@ -75,6 +76,7 @@ public class WebAuthnConfigurer<H extends HttpSecurityBuilder<H>>
7576	 * @return the {@link WebAuthnConfigurer} for further customization 
7677	 */ 
7778	public  WebAuthnConfigurer <H > rpId (String  rpId ) {
79+ 		Assert .hasText (rpId , "rpId be null or empty" );
7880		this .rpId  = rpId ;
7981		return  this ;
8082	}
@@ -85,6 +87,7 @@ public WebAuthnConfigurer<H> rpId(String rpId) {
8587	 * @return the {@link WebAuthnConfigurer} for further customization 
8688	 */ 
8789	public  WebAuthnConfigurer <H > rpName (String  rpName ) {
90+ 		Assert .hasText (rpName , "rpName can't be null or empty" );
8891		this .rpName  = rpName ;
8992		return  this ;
9093	}
@@ -106,6 +109,7 @@ public WebAuthnConfigurer<H> allowedOrigins(String... allowedOrigins) {
106109	 * @see #allowedOrigins(String...) 
107110	 */ 
108111	public  WebAuthnConfigurer <H > allowedOrigins (Set <String > allowedOrigins ) {
112+ 		Assert .notNull (allowedOrigins , "allowedOrigins can't be null" );
109113		this .allowedOrigins  = allowedOrigins ;
110114		return  this ;
111115	}
@@ -129,6 +133,7 @@ public WebAuthnConfigurer<H> disableDefaultRegistrationPage(boolean disable) {
129133	 * @return the {@link WebAuthnConfigurer} for further customization 
130134	 */ 
131135	public  WebAuthnConfigurer <H > messageConverter (HttpMessageConverter <Object > converter ) {
136+ 		Assert .notNull (converter , "converter can't be null" );
132137		this .converter  = converter ;
133138		return  this ;
134139	}
@@ -140,6 +145,7 @@ public WebAuthnConfigurer<H> messageConverter(HttpMessageConverter<Object> conve
140145	 */ 
141146	public  WebAuthnConfigurer <H > creationOptionsRepository (
142147			PublicKeyCredentialCreationOptionsRepository  creationOptionsRepository ) {
148+ 		Assert .notNull (creationOptionsRepository , "creationOptionsRepository can't be null" );
143149		this .creationOptionsRepository  = creationOptionsRepository ;
144150		return  this ;
145151	}
0 commit comments