data-transfer-project
data-transfer-project copied to clipboard
Bake the app credential naming conventions into the code
Currently AppCredential keys are assembled in different ways between the transfer worker and the api:
- On the API the names are automatically derived from the service name https://github.com/google/data-transfer-project/blob/228378c5d92cd5853e26080f4328161f6c154a97/libraries/auth/src/main/java/org/datatransferproject/auth/OAuth1ServiceExtension.java#L87
- On the transfer worker they are fully written out https://github.com/google/data-transfer-project/blob/3555f624bf098fb41fd9fcb25836060f20e141c4/extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/GoogleTransferExtension.java#L83
We should write a Util class which calculates the keys based on the service name and use it in both the API and the transfer worker.