Skip to content

Commit

Permalink
Revert "fix(credentials): move the tokenA invalidation after getCrede…
Browse files Browse the repository at this point in the history
…ntial, because it is the one that is in the context and used during getCredential"

This reverts commit 36d5154.
  • Loading branch information
jggrimal committed Oct 31, 2024
1 parent 29e9bd2 commit b754cc9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ open class CredentialsServerService(
debugHeaders = debugHeaders,
)

// Remove token A because it is useless from now on
partnerRepository.invalidateCredentialsTokenA(partnerId = partnerId)

// Return Credentials objet to sender with the token C inside (which is for us the server token)
getCredentials(
serverToken = partnerRepository.saveCredentialsServerToken(
partnerId = partnerId,
credentialsServerToken = generateUUIDv4Token(),
),
).also {
// Remove token A because it is useless from now on
partnerRepository.invalidateCredentialsTokenA(partnerId = partnerId)
}
)
}

override suspend fun put(
Expand Down

0 comments on commit b754cc9

Please sign in to comment.