问题
I would like to convert the following Postman Authorization
request into an Axios http Authorization
request.
Here is an example of the headers from Postman
{ Authorization:
OAuth oauth_consumer_key="Oauth%20key",oauth_token="I9mo8rYA1t7U7bu51mdMlSGx6pBkAGVz",oauth_signature_method="RSA-SHA1",oauth_timestamp="1607311840",oauth_nonce="UmbuDisXoIy",oauth_version="1.0",oauth_signature="QcO7tTLIgOv5AJVkNZzZwraV4T6fmGM8wCQM0zpLfylhv7ubL%2F1zYSEm6Pou7RGd4h9Z4CEIQ0J6zieC2djx3TmHkoZzx1nTJf%2Bc4mCs%2BKzfMZOYm2VKtMpfJf17HoEG6T18FMK75pfQIKbY0C45comcE%2Bna3TWR3Utb4YwKftY%3D"
}
How will I get the same headers generated by Postman with the use of axios?
I've tried the method stated here : OAuth1.0 header in Node.js, but I think its for HMAC signature. I cannot find any example that uses RSA-SHA1 to create Auth
header, most of them are using HMAC.
Note: above example works fine with Postman. I just need a way to do it in NodeJS via axios.
来源:https://stackoverflow.com/questions/65193587/how-to-create-oauthv1-rsa-sha1-postman-authorization-request-header-with-axios