diff --git a/build.gradle b/build.gradle index a95aeae..ca04416 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,9 @@ dependencies { // spring implementation 'org.springframework.boot:spring-boot-starter' + // spring validation + implementation 'org.springframework.boot:spring-boot-starter-validation' + // web implementation 'org.springframework.boot:spring-boot-starter-web' diff --git a/src/main/java/io/wwan13/wintersecurity/config/JwtProviderConfigurer.java b/src/main/java/io/wwan13/wintersecurity/config/JwtProviderConfigurer.java index bb0d163..5210f10 100644 --- a/src/main/java/io/wwan13/wintersecurity/config/JwtProviderConfigurer.java +++ b/src/main/java/io/wwan13/wintersecurity/config/JwtProviderConfigurer.java @@ -18,7 +18,9 @@ import io.wwan13.wintersecurity.jwt.support.JwtPropertiesRegistry; +import javax.validation.constraints.NotNull; + public interface JwtProviderConfigurer extends SecretKeyConfigurer { - void configureJwt(JwtPropertiesRegistry registry); + void configureJwt(@NotNull JwtPropertiesRegistry registry); } diff --git a/src/main/java/io/wwan13/wintersecurity/config/SecretKeyConfigurer.java b/src/main/java/io/wwan13/wintersecurity/config/SecretKeyConfigurer.java index 39aab43..47a2cd1 100644 --- a/src/main/java/io/wwan13/wintersecurity/config/SecretKeyConfigurer.java +++ b/src/main/java/io/wwan13/wintersecurity/config/SecretKeyConfigurer.java @@ -18,7 +18,9 @@ import io.wwan13.wintersecurity.secretkey.support.SecretKeyRegistry; +import javax.validation.constraints.NotNull; + public interface SecretKeyConfigurer { - void configureSecretKey(SecretKeyRegistry registry); + void configureSecretKey(@NotNull SecretKeyRegistry registry); } diff --git a/src/main/java/io/wwan13/wintersecurity/config/SecureRequestConfigurer.java b/src/main/java/io/wwan13/wintersecurity/config/SecureRequestConfigurer.java index 924b65b..741b747 100644 --- a/src/main/java/io/wwan13/wintersecurity/config/SecureRequestConfigurer.java +++ b/src/main/java/io/wwan13/wintersecurity/config/SecureRequestConfigurer.java @@ -19,9 +19,12 @@ import io.wwan13.wintersecurity.auth.authpattern.support.AuthPatternsRegistry; import io.wwan13.wintersecurity.resolve.support.TargetAnnotationsRegistry; +import javax.validation.constraints.NotNull; + public interface SecureRequestConfigurer extends SecretKeyConfigurer { - void registerAuthPatterns(AuthPatternsRegistry registry); + void registerAuthPatterns(@NotNull AuthPatternsRegistry registry); - void registerTargetAnnotations(TargetAnnotationsRegistry registry); + default void registerTargetAnnotations(@NotNull TargetAnnotationsRegistry registry) { + } }