Skip to content

Commit

Permalink
fix(common): Use clientToken before using TokenA when building author…
Browse files Browse the repository at this point in the history
…ize header
  • Loading branch information
pbourseau committed Jun 27, 2024
1 parent 93a128b commit 9935978
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ suspend fun PartnerRepository.buildAuthorizationHeader(
allowTokenA: Boolean = false
): Pair<String, String> =
if (allowTokenA) {
getCredentialsTokenA(partnerUrl = partnerUrl)
?: getCredentialsClientToken(partnerUrl = partnerUrl)
getCredentialsClientToken(partnerUrl = partnerUrl)
?: getCredentialsTokenA(partnerUrl = partnerUrl)
?: throw throw OcpiClientUnknownTokenException(
"Could not find token A or client token associated with partner $partnerUrl"
)
Expand Down

0 comments on commit 9935978

Please sign in to comment.