diff --git a/src/main/java/io/codeka/gaia/client/controller/AuthenticationRestController.kt b/src/main/java/io/codeka/gaia/client/controller/AuthenticationRestController.kt index 5e635a57c..5abc04700 100644 --- a/src/main/java/io/codeka/gaia/client/controller/AuthenticationRestController.kt +++ b/src/main/java/io/codeka/gaia/client/controller/AuthenticationRestController.kt @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/auth") -class AuthenticationRestController constructor( +class AuthenticationRestController( @Autowired(required = false) var oAuth2ClientProperties: OAuth2ClientProperties? = null) { @GetMapping("/user") diff --git a/src/main/java/io/codeka/gaia/client/controller/BuildInfoRestController.kt b/src/main/java/io/codeka/gaia/client/controller/BuildInfoRestController.kt index e6b846146..32259017b 100644 --- a/src/main/java/io/codeka/gaia/client/controller/BuildInfoRestController.kt +++ b/src/main/java/io/codeka/gaia/client/controller/BuildInfoRestController.kt @@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/build-info") -class BuildInfoRestController constructor( +class BuildInfoRestController( @Autowired(required = false) var buildProperties: BuildProperties? = null, @Autowired(required = false) var gitProperties: GitProperties? = null) { diff --git a/src/main/java/io/codeka/gaia/config/security/AuthenticationHandler.kt b/src/main/java/io/codeka/gaia/config/security/AuthenticationHandler.kt index e1651c5d6..c3db42ff7 100644 --- a/src/main/java/io/codeka/gaia/config/security/AuthenticationHandler.kt +++ b/src/main/java/io/codeka/gaia/config/security/AuthenticationHandler.kt @@ -33,7 +33,7 @@ data class ApiErrorResponse( } @Component -class SuccessHandler constructor(val userRepository: UserRepository) : AuthenticationSuccessHandler { +class SuccessHandler(val userRepository: UserRepository) : AuthenticationSuccessHandler { override fun onAuthenticationSuccess(request: HttpServletRequest, response: HttpServletResponse, authentication: Authentication) { if (!userRepository.existsById(authentication.name)) { diff --git a/src/main/java/io/codeka/gaia/config/security/SecurityConfig.kt b/src/main/java/io/codeka/gaia/config/security/SecurityConfig.kt index 4da447c11..a5143d3fc 100644 --- a/src/main/java/io/codeka/gaia/config/security/SecurityConfig.kt +++ b/src/main/java/io/codeka/gaia/config/security/SecurityConfig.kt @@ -14,7 +14,7 @@ import org.springframework.security.web.csrf.CookieCsrfTokenRepository @Configuration @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) -class SecurityConfig constructor( +class SecurityConfig( val successHandler: SuccessHandler, val failureHandler: FailureHandler, val logoutSuccessHandler: LogoutSuccessHandler, diff --git a/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2ClientSecurityConfig.kt b/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2ClientSecurityConfig.kt index 6e390e205..4e23fdef9 100644 --- a/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2ClientSecurityConfig.kt +++ b/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2ClientSecurityConfig.kt @@ -12,7 +12,7 @@ import org.springframework.security.web.util.matcher.OrRequestMatcher @Configuration @Order(70) @Conditional(ClientsConfiguredCondition::class) -class OAuth2ClientSecurityConfig constructor( +class OAuth2ClientSecurityConfig( val oAuth2SuccessHandler: OAuth2SuccessHandler) : WebSecurityConfigurerAdapter() { private final val oauth2Endpoint = "/auth/oauth2" diff --git a/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2SuccessHandler.kt b/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2SuccessHandler.kt index 9d5dad4fb..dbab31df2 100644 --- a/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2SuccessHandler.kt +++ b/src/main/java/io/codeka/gaia/config/security/oauth2/OAuth2SuccessHandler.kt @@ -18,7 +18,7 @@ import javax.servlet.http.HttpServletResponse @Component @Conditional(ClientsConfiguredCondition::class) -class OAuth2SuccessHandler constructor( +class OAuth2SuccessHandler( userRepository: UserRepository, val registryOAuth2Providers: List, val oAuth2AuthorizedClientService: OAuth2AuthorizedClientService) : SuccessHandler(userRepository) { diff --git a/src/main/java/io/codeka/gaia/modules/api/DockerRegistryApi.kt b/src/main/java/io/codeka/gaia/modules/api/DockerRegistryApi.kt index 07c807f4b..e15c5f37b 100644 --- a/src/main/java/io/codeka/gaia/modules/api/DockerRegistryApi.kt +++ b/src/main/java/io/codeka/gaia/modules/api/DockerRegistryApi.kt @@ -12,7 +12,7 @@ import org.springframework.web.client.RestTemplate inline fun typeRef(): ParameterizedTypeReference = object : ParameterizedTypeReference() {} @Repository -class DockerRegistryApi constructor( +class DockerRegistryApi( @Value("\${docker.registry.api.url}") private val dockerRegistryApiUrl: String, private val restTemplate: RestTemplate) { @@ -38,4 +38,4 @@ class DockerRegistryApi constructor( } else listOf() } -} \ No newline at end of file +} diff --git a/src/main/java/io/codeka/gaia/modules/bo/TerraformImage.kt b/src/main/java/io/codeka/gaia/modules/bo/TerraformImage.kt index 86d17f45f..e104f9814 100644 --- a/src/main/java/io/codeka/gaia/modules/bo/TerraformImage.kt +++ b/src/main/java/io/codeka/gaia/modules/bo/TerraformImage.kt @@ -3,7 +3,7 @@ package io.codeka.gaia.modules.bo import javax.validation.constraints.NotBlank import javax.validation.constraints.Pattern -data class TerraformImage constructor( +data class TerraformImage( @field:NotBlank @field:Pattern(regexp = """^[\w][\w.\-\/]{0,127}$""") val repository: String, @field:NotBlank val tag: String) { diff --git a/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt b/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt index 86e792944..b233ad86d 100644 --- a/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt +++ b/src/main/java/io/codeka/gaia/registries/gitlab/GitlabRegistryApi.kt @@ -17,7 +17,7 @@ class GitlabRegistryApi(restTemplate: RestTemplate): AbstractRegistryApi