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,
)
from: #132 (comment)
We need to store
urlgiven inCredentialsobject sent by partner during its registration (POST /credentials). We currently storetokenandrolesbut noturl(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,savePartnerUrlForTokenAneeds 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