Leseratte10 / acsm-calibre-plugin

Calibre plugin for ACSM->EPUB and ACSM->PDF conversion.
https://www.mobileread.com/forums/showthread.php?t=341975
GNU General Public License v3.0
600 stars 23 forks source link

Create implementation-agnostic ADEPT documentation #10

Closed JJTech0130 closed 2 years ago

JJTech0130 commented 2 years ago

It would be great if you could create some kind of spec for ADEPT so that different implementations can be made without reading all of the source code. I'm doing a lot of work for my rust implementation just trying to figure out all of what needs to be done.

Leseratte10 commented 2 years ago

Interesting suggestion (and I agree that something like that might have been helpful when I created the plugin based on libgourou), but creating a complete documentation that's actually useful and contains all information needed to reimplement this would probably be a ton of work, with no direct benefit to me, so I don't think I'm going to be doing that.

Also, a ton of stuff in my code basically was "trial-and-error", try a ton of different things until Adobe finally doesn't return errors anymore - that means I could probably write some kind of documentation for my code, but not necessarily documentation for the ADEPT protocol itself (as I have no idea why it works how it works).

Though, if you have any specific issues with your own implementation or if you are stuck somewhere, like a particular error code from Adobe you can't get fixed, feel free to let me know and I'll see if I can help.

JJTech0130 commented 2 years ago

Well, I'm trying to design my version in a more object oriented fashion. For now, I have a User object that is created with the sign in method, a username, and a password, and has a getLicenseKey function that will return the license key for the user. I haven't gotten much further 😄

JJTech0130 commented 2 years ago

@Leseratte10 What is the auth key in the sign-in used for? Can I simply reuse the license key?

Leseratte10 commented 2 years ago

I'm not sure what it's used for. ~Looking through the code it looks like it's not used for anything.~ Though, ADE does use two different keys for auth and license so I decided to do that, too. No idea if you could re-use the license key.

EDIT: I am assuming (but I didn't verify) that that key pair might be what's returned as pkcs12 by the Adobe server. If that is the case then you can probably try using the same keys (though I would not do that if I were you, as it makes it easy for Adobe to detect your client as a nonstandard client), but your client must also be able to handle situations where the auth key and the license key are different, otherwise it will only work once for each AdobeID.

Leseratte10 commented 2 years ago

As I currently don't plan writing an ADEPT documentation as requested in this issue, I'm going to close this issue as "wont fix" for now. If you have more questions while implementing your Rust version feel free to post them here regardless.