Skip to content

Commit

Permalink
Merge pull request #117 from IZIVIA/fix/use-clientToken-before-TokenA
Browse files Browse the repository at this point in the history
fix(common): Use clientToken before using TokenA when building authorize header
  • Loading branch information
lilgallon authored Jun 28, 2024
2 parents 93a128b + 9935978 commit c6994d6
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 c6994d6

Please sign in to comment.