-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oppdaterer dependencies og gradle. Bytter ut kluent og kotlinx serial…
…ization.
- Loading branch information
1 parent
7539b86
commit f04e623
Showing
50 changed files
with
723 additions
and
542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
azure-exchange/src/main/kotlin/no/nav/tms/token/support/azure/exchange/AzureEnvironment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package no.nav.tms.token.support.azure.exchange | ||
|
||
// Proxy for System environment which allows for mocking or overwriting default env | ||
object AzureEnvironment { | ||
private val baseEnv = System.getenv() | ||
|
||
private val env = mutableMapOf<String, String>() | ||
|
||
init { | ||
env.putAll(baseEnv) | ||
} | ||
|
||
fun get(name: String) = env[name] | ||
|
||
fun extend(envMap: Map<String, String>) { | ||
env.putAll(envMap) | ||
} | ||
|
||
fun reset() { | ||
env.clear() | ||
env.putAll(baseEnv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 5 additions & 7 deletions
12
...ge/src/main/kotlin/no/nav/tms/token/support/azure/exchange/consumer/AzureTokenResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
package no.nav.tms.token.support.azure.exchange.consumer | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
import com.fasterxml.jackson.annotation.JsonAlias | ||
|
||
@Serializable | ||
internal data class AzureTokenResponse( | ||
@SerialName("access_token") val accessToken: String, | ||
@SerialName("token_type") val tokenType: String, | ||
@SerialName("expires_in") val expiresIn: Int, | ||
@SerialName("ext_expires_in") val extExpiresIn: Int | ||
@JsonAlias("access_token") val accessToken: String, | ||
@JsonAlias("token_type") val tokenType: String, | ||
@JsonAlias("expires_in") val expiresIn: Int, | ||
@JsonAlias("ext_expires_in") val extExpiresIn: Int | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...-validation/src/main/kotlin/no/nav/tms/token/support/azure/validation/AzureEnvironment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package no.nav.tms.token.support.azure.validation | ||
|
||
// Proxy for System environment which allows for mocking or overwriting default env | ||
object AzureEnvironment { | ||
private val baseEnv = System.getenv() | ||
|
||
private val env = mutableMapOf<String, String>() | ||
|
||
init { | ||
env.putAll(baseEnv) | ||
} | ||
|
||
fun get(name: String) = env[name] | ||
|
||
fun extend(envMap: Map<String, String>) { | ||
env.putAll(envMap) | ||
} | ||
|
||
fun reset() { | ||
env.clear() | ||
env.putAll(baseEnv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.