Skip to content

Commit

Permalink
Merge pull request #139 from IZIVIA/fix/#138-invalidate-token-a-after…
Browse files Browse the repository at this point in the history
…-get-credentials
  • Loading branch information
lilgallon authored Oct 31, 2024
2 parents 8e9f7a8 + 36d5154 commit 29e9bd2
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 29e9bd2

Please sign in to comment.