Skip to content

Commit

Permalink
RL tech review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rustagir committed Jun 28, 2024
1 parent 17a9f0e commit b3e6913
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions examples/src/test/kotlin/EnterpriseAuthTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,17 @@ internal class EnterpriseAuthTest {
fun oidcCallback() = runBlocking {
// :snippet-start: oidc-callback
val credential = MongoCredential.createOidcCredential(null)
.withMechanismProperty("OIDC_CALLBACK") { Context context ->
.withMechanismProperty("OIDC_CALLBACK") { context: Context ->
val accessToken = "..."
OidcCallbackResult(accessToken)
}
// :snippet-end:
}


fun oidcCallbackFile() = runBlocking {
// :snippet-start: oidc-callback-file
val credential = MongoCredential.createOidcCredential(null)
.withMechanismProperty("OIDC_CALLBACK") { Context context ->
.withMechanismProperty("OIDC_CALLBACK") { context: Context ->
val accessToken = String(Files.readAllBytes(Paths.get("access-token.dat")))
OidcCallbackResult(accessToken)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val credential = MongoCredential.createOidcCredential(null)
.withMechanismProperty("OIDC_CALLBACK") { Context context ->
.withMechanismProperty("OIDC_CALLBACK") { context: Context ->
val accessToken = String(Files.readAllBytes(Paths.get("access-token.dat")))
OidcCallbackResult(accessToken)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val credential = MongoCredential.createOidcCredential(null)
.withMechanismProperty("OIDC_CALLBACK") { Context context ->
.withMechanismProperty("OIDC_CALLBACK") { context: Context ->
val accessToken = "..."
OidcCallbackResult(accessToken)
}

0 comments on commit b3e6913

Please sign in to comment.