Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/gradle/jacksonDatatype-2.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ybelMekk authored Oct 16, 2024
2 parents 3e44397 + cd653f9 commit 27240e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ val springSecurity = "6.3.3"
val snakeYaml = "2.3"
val mockk = "1.13.13"
val kotest = "5.9.1"
val apacheHttp = "5.3.1"
val gradleVersion = "8.4"
val json = "20240303"
val kotlinLoggin = "3.0.5"
Expand Down Expand Up @@ -64,7 +63,6 @@ dependencies {
implementation("javax.inject:javax.inject:1")
implementation("jakarta.validation:jakarta.validation-api")
implementation("net.logstash.logback:logstash-logback-encoder:$logbackStash")
implementation("org.apache.httpcomponents.client5:httpclient5:$apacheHttp")
implementation("jakarta.persistence:jakarta.persistence-api")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import no.nav.gandalf.api.INVALID_CLIENT
import no.nav.gandalf.model.ErrorDescriptiveResponse
import org.apache.hc.core5.http.ContentType
import org.springframework.http.HttpStatus
import org.springframework.security.core.AuthenticationException
import org.springframework.security.web.AuthenticationEntryPoint
Expand All @@ -24,7 +23,7 @@ class RestAuthenticationEntryPoint : AuthenticationEntryPoint {
) {
val response = ErrorDescriptiveResponse(INVALID_CLIENT, "Unauthorised: ${e?.message ?: ""}")
httpServletResponse.status = HttpStatus.UNAUTHORIZED.value()
httpServletResponse.contentType = ContentType.APPLICATION_JSON.mimeType
httpServletResponse.contentType = "application/json"
val out: OutputStream = httpServletResponse.outputStream
val mapper = ObjectMapper()
mapper.writeValue(out, response)
Expand Down

0 comments on commit 27240e2

Please sign in to comment.