Base64 Authentication Python

 

python3

import base64
userpass = username + ':' + password
encoded_u = base64.b64encode(userpass.encode()).decode()
headers = {"Authorization" : "Basic %s" % encoded_u}

 

参考

Base64 Authentication Python

posted @ 2022-09-11 06:46  jihite  阅读(51)  评论(0编辑  收藏  举报