I would like to use token authentication from within the torrent-done-script. A token would only be associated with a specific torrent. It could be generated from the torrenthash + timestamp. The lifespan of a token is limited by the instantiation of the daemon, the lifetime of the torrent in transmission and by the generation of a new token.
Example: When the torrent-done-script is run a TR_TORRENT environment variable is available.
transmission-remote --token $TR_TORRENT --remove-and-delete
This would remove the specific torrent without any further authentication.
transmission-remote --token --auth username:password --torrent $TR_TORRENT_ID
This would generate a new token and output it to stdout.
Cheers,
K.
Use token for transmission authentication
Re: Use token for transmission authentication
This sounds like RPC's "torrent id" field.
Re: Use token for transmission authentication
It is most definitely NOT. As far as I know, $TR_TORRENT_ID or the parameter for rpc just hold a simple integer index. That in itself may be error prone.Jordan wrote:This sounds like RPC's "torrent id" field.
The ultimate goal is that you do not have to use a username/password to manipulate a single(!) torrent if you have a token for that torrent.