Skip to content

Commit

Permalink
Fjerner ubrukt kode
Browse files Browse the repository at this point in the history
  • Loading branch information
mettok committed Jan 24, 2025
1 parent ac23701 commit 50bfbfa
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/main/kotlin/no/nav/auth/AuthClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,3 @@ fun AuthClient.fetchToken(
}
}
}

fun AuthClient.fetchOboToken(
target: String,
userToken: String,
): () -> String =
{
runBlocking {
exchange(IdentityProvider.TOKEN_X, target, userToken).let {
when (it) {
is TokenResponse.Success -> it.accessToken
is TokenResponse.Error -> {
sikkerLogger().error("Feilet å hente obo token status: ${it.status} - ${it.error.errorDescription}")
throw RuntimeException("Feilet å hente obo token status: ${it.status} - ${it.error.errorDescription}")
}
}
}
}
}

0 comments on commit 50bfbfa

Please sign in to comment.