Skip to content

Commit

Permalink
Revert "Revert "Redo: fjern bruk av apigw til fordel for maskinporten…
Browse files Browse the repository at this point in the history
… og direkte kall""
  • Loading branch information
kenglxn authored Dec 2, 2024
1 parent c3e232c commit 19db797
Show file tree
Hide file tree
Showing 27 changed files with 288 additions and 301 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package no.nav.arbeidsgiver.min_side.clients.azuread
package no.nav.arbeidsgiver.min_side.azuread

import com.fasterxml.jackson.annotation.JsonProperty
import no.nav.arbeidsgiver.min_side.clients.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.retryInterceptor
import org.springframework.boot.web.client.RestTemplateBuilder
import org.springframework.http.HttpEntity
import org.springframework.http.HttpHeaders
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.arbeidsgiver.min_side.clients.azuread
package no.nav.arbeidsgiver.min_side.azuread

import com.github.benmanes.caffeine.cache.Cache
import com.github.benmanes.caffeine.cache.Caffeine
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.arbeidsgiver.min_side.clients
package no.nav.arbeidsgiver.min_side.config

import org.springframework.http.client.ClientHttpRequestInterceptor
import org.springframework.retry.RetryCallback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package no.nav.arbeidsgiver.min_side.kontaktinfo

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import no.nav.arbeidsgiver.min_side.clients.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.retryInterceptor
import no.nav.arbeidsgiver.min_side.maskinporten.MaskinportenTokenService
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.web.client.RestTemplateBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package no.nav.arbeidsgiver.min_side.kontostatus

import com.github.benmanes.caffeine.cache.Caffeine
import no.nav.arbeidsgiver.min_side.clients.azuread.AzureService
import no.nav.arbeidsgiver.min_side.clients.retryInterceptor
import no.nav.arbeidsgiver.min_side.azuread.AzureService
import no.nav.arbeidsgiver.min_side.config.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.GittMiljø
import no.nav.arbeidsgiver.min_side.config.callIdIntercetor
import org.springframework.beans.factory.annotation.Value
Expand All @@ -15,7 +15,9 @@ import org.springframework.http.HttpStatus
import org.springframework.http.client.ClientHttpRequestInterceptor
import org.springframework.stereotype.Component
import org.springframework.web.client.RestClientResponseException
import java.net.SocketException
import java.util.concurrent.TimeUnit
import javax.net.ssl.SSLHandshakeException

@Component
class KontoregisterClient(
Expand All @@ -41,8 +43,8 @@ class KontoregisterClient(
retryInterceptor(
3,
250L,
java.net.SocketException::class.java,
javax.net.ssl.SSLHandshakeException::class.java,
SocketException::class.java,
SSLHandshakeException::class.java,
)
)
.build()
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.github.benmanes.caffeine.cache.Cache
import com.github.benmanes.caffeine.cache.Caffeine
import no.nav.arbeidsgiver.min_side.clients.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.retryInterceptor
import no.nav.arbeidsgiver.min_side.controller.AuthenticatedUserHolder
import no.nav.arbeidsgiver.min_side.models.Organisasjon
import no.nav.arbeidsgiver.min_side.services.altinn.AltinnTilganger.AltinnTilgang
import no.nav.arbeidsgiver.min_side.services.tokenExchange.TokenExchangeClient
import org.springframework.beans.factory.annotation.Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package no.nav.arbeidsgiver.min_side.services.ereg

import com.fasterxml.jackson.databind.JsonNode
import com.github.benmanes.caffeine.cache.Caffeine
import no.nav.arbeidsgiver.min_side.clients.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.callIdIntercetor
import no.nav.arbeidsgiver.min_side.models.Organisasjon
import org.springframework.beans.factory.annotation.Value
Expand All @@ -14,7 +14,9 @@ import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.stereotype.Component
import org.springframework.web.client.RestClientResponseException
import java.net.SocketException
import java.util.*
import javax.net.ssl.SSLHandshakeException

@Component
class EregService(
Expand All @@ -28,8 +30,8 @@ class EregService(
retryInterceptor(
3,
250L,
java.net.SocketException::class.java,
javax.net.ssl.SSLHandshakeException::class.java,
SocketException::class.java,
SSLHandshakeException::class.java,
)
)
.build()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package no.nav.arbeidsgiver.min_side.services.tokenExchange

import no.nav.arbeidsgiver.min_side.clients.retryInterceptor
import no.nav.arbeidsgiver.min_side.config.retryInterceptor
import org.springframework.boot.web.client.RestTemplateBuilder
import org.springframework.context.annotation.Profile
import org.springframework.http.HttpEntity
Expand All @@ -9,6 +9,9 @@ import org.springframework.http.MediaType
import org.springframework.stereotype.Component
import org.springframework.util.LinkedMultiValueMap
import org.springframework.util.MultiValueMap
import org.springframework.web.client.HttpServerErrorException
import java.net.SocketException
import javax.net.ssl.SSLHandshakeException

interface TokenExchangeClient {
fun exchange(subjectToken: String, audience: String): TokenXToken
Expand All @@ -26,10 +29,10 @@ class TokenExchangeClientImpl(
retryInterceptor(
3,
250L,
java.net.SocketException::class.java,
javax.net.ssl.SSLHandshakeException::class.java,
org.springframework.web.client.HttpServerErrorException.GatewayTimeout::class.java,
org.springframework.web.client.HttpServerErrorException.ServiceUnavailable::class.java,
SocketException::class.java,
SSLHandshakeException::class.java,
HttpServerErrorException.GatewayTimeout::class.java,
HttpServerErrorException.ServiceUnavailable::class.java,
)
).build()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package no.nav.arbeidsgiver.min_side.controller
package no.nav.arbeidsgiver.min_side.tilgangssoknad

import no.nav.arbeidsgiver.min_side.clients.altinn.AltinnTilgangssøknadClient
import no.nav.arbeidsgiver.min_side.config.logger
import no.nav.arbeidsgiver.min_side.models.AltinnTilgangssøknad
import no.nav.arbeidsgiver.min_side.models.AltinnTilgangssøknadsskjema
import no.nav.arbeidsgiver.min_side.controller.AuthenticatedUserHolder
import no.nav.arbeidsgiver.min_side.services.altinn.AltinnService
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package no.nav.arbeidsgiver.min_side.tilgangssoknad

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonInclude

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
data class AltinnTilgangssøknad(
val orgnr: String? = null,
val serviceCode: String? = null,
val serviceEdition: Int? = null,
val status: String? = null,
val createdDateTime: String? = null,
val lastChangedDateTime: String? = null,
val submitUrl: String? = null
)
Loading

0 comments on commit 19db797

Please sign in to comment.