e8b9855 Fix otptoken_sync plugin

Authored and Committed by cheimes 4 years ago
    Fix otptoken_sync plugin
    
    The plugin had two bugs:
    
    For one it did not work under Python 3 because urlencode() returns a string
    but HTTPSHandler expects bytes as data argument.
    
    The primary key field name is not available in client plugins. Just pass
    the token name and let server code convert the name to DN.
    
    Fixes: https://pagure.io/freeipa/issue/7804
    Signed-off-by: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>