Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

La til protected med claims #26

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/kotlin/no/nav/familie/pdf/config/PingController.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package no.nav.familie.pdf.config

import no.nav.security.token.support.core.api.Unprotected
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@Unprotected
@RestController
@RequestMapping("/api/ping")
class PingController {
Expand Down
6 changes: 4 additions & 2 deletions src/main/kotlin/no/nav/familie/pdf/pdf/PdfController.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package no.nav.familie.pdf.pdf

import no.nav.security.token.support.core.api.Unprotected
import no.nav.security.token.support.core.api.ProtectedWithClaims
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@Unprotected
@RequestMapping("api/pdf")
@ProtectedWithClaims(
issuer = "azuread",
)
class PdfController {
private val pdfService = PdfService()

Expand Down
6 changes: 4 additions & 2 deletions src/main/kotlin/no/nav/familie/pdf/pdf/TestPdfController.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package no.nav.familie.pdf.pdf

import no.nav.familie.pdf.pdf.domain.PdfMedStandarder
import no.nav.security.token.support.core.api.Unprotected
import no.nav.security.token.support.core.api.ProtectedWithClaims
import org.springframework.web.bind.annotation.CrossOrigin
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
Expand All @@ -10,8 +10,10 @@ import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@Unprotected
@RequestMapping("api/test-pdf")
@ProtectedWithClaims(
issuer = "azuread",
)
class TestPdfController {
private val pdfService = PdfService()
private val testPdfService = TestPdfService(pdfService)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package no.nav.familie.pdf.søknad

import no.nav.security.token.support.core.api.Unprotected
import no.nav.security.token.support.core.api.ProtectedWithClaims
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("api/soknad")
@Unprotected
@ProtectedWithClaims(
issuer = "azuread",
)
class SøknadController {
@GetMapping("/overgangsstonad")
fun lagPdfForOvergangsstønad(): String = "OK - overgangsstønad"
Expand Down
Loading