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

Store partner URL during POST /credentials #137

Open
lilgallon opened this issue Oct 14, 2024 · 0 comments
Open

Store partner URL during POST /credentials #137

lilgallon opened this issue Oct 14, 2024 · 0 comments
Labels

Comments

@lilgallon
Copy link
Member

lilgallon commented Oct 14, 2024

from: #132 (comment)

We need to store url given in Credentials object sent by partner during its registration (POST /credentials). We currently store token and roles but not url (/~https://github.com/ocpi/ocpi/blob/release-2.2.1-bugfixes/credentials.asciidoc#131-credentials-object).

In the code below, partnerRepository.saveUrl(partnerId, credentials.url) needs to be called (the method does not exist, so it has to be created). Also, savePartnerUrlForTokenA needs to be removed because it is no longer used by the lib.

/~https://github.com/IZIVIA/ocpi-toolkit/blob/8e9f7a873242046bad248bce6c0d9296e02999dc/ocpi-toolkit-2.2.1/src/main/kotlin/com/izivia/ocpi/toolkit/modules/credentials/services/CredentialsServerService.kt#L45C1-L56C10

        // Save credentials roles of partner
        partnerRepository.saveCredentialsRoles(
            partnerId = partnerId,
            credentialsRoles = credentials.roles,
        )


        // Save token B, which is in our case the client token, because it's the one that we will use to communicate
        // with the sender
        partnerRepository.saveCredentialsClientToken(
            partnerId = partnerId,
            credentialsClientToken = credentials.token,
        )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant