Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(credentials): add partnerId on getCredentialsRoles #140

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

jggrimal
Copy link
Contributor

Review the #138 fix

…ntial, because it is the one that is in the context and used during getCredential"

This reverts commit 36d5154.
@jggrimal jggrimal requested a review from lilgallon October 31, 2024 15:43
@jggrimal jggrimal added bug Something isn't working module: credentials labels Oct 31, 2024
@jggrimal jggrimal force-pushed the fix/#138-add-partner-id-on-get-credentials-roles branch from aa0571d to 4c1910b Compare October 31, 2024 15:47
Comment on lines 29 to 30
partnerRepository.getPartnerIdByCredentialsServerToken(token)
?: throw OcpiClientInvalidParametersException("Invalid ServerToken ($token)"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tokenA is allowed for credentials module (see PartnerRepository.checkToken in HttpUtils)

Suggested change
partnerRepository.getPartnerIdByCredentialsServerToken(token)
?: throw OcpiClientInvalidParametersException("Invalid ServerToken ($token)"),
partnerRepository.getPartnerIdByCredentialsServerToken(token)
?: partnerRepository.getPartnerIdByCredentialsTokenA(credentialsTokenA = token)
?: throw OcpiClientInvalidParametersException(
"Invalid token ($token) - should be either a TokenA or a ServerToken",
),

@jggrimal jggrimal force-pushed the fix/#138-add-partner-id-on-get-credentials-roles branch from 4c1910b to e6440a4 Compare October 31, 2024 15:51
@jggrimal jggrimal force-pushed the fix/#138-add-partner-id-on-get-credentials-roles branch from e6440a4 to ccdef49 Compare October 31, 2024 15:52
Copy link

@lilgallon lilgallon merged commit 6050bab into main Oct 31, 2024
2 checks passed
@lilgallon lilgallon deleted the fix/#138-add-partner-id-on-get-credentials-roles branch October 31, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: credentials
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants