refactor: update OAuth1 fields and normalize signature method display type

This commit is contained in:
Udhay-Adithya
2025-07-23 11:35:15 +05:30
parent a29f594f00
commit 0c87374602
2 changed files with 4 additions and 4 deletions

View File

@@ -76,9 +76,8 @@ class _OAuth1FieldsState extends State<OAuth1Fields> {
ADPopupMenu<String>( ADPopupMenu<String>(
value: _addAuthDataTo, value: _addAuthDataTo,
values: const [ values: const [
('URL', 'url'), ('Request URL / Request Body', 'url'),
('Header', 'header'), ('Request Header', 'header'),
('Body', 'body'),
], ],
tooltip: "Select where to add API key", tooltip: "Select where to add API key",
isOutlined: true, isOutlined: true,

View File

@@ -26,7 +26,8 @@ String generateOAuth1AuthHeader(
// Build OAuth parameters map // Build OAuth parameters map
final oauthParams = <String, String>{ final oauthParams = <String, String>{
'oauth_consumer_key': oauth1Model.consumerKey, 'oauth_consumer_key': oauth1Model.consumerKey,
'oauth_signature_method': oauth1Model.signatureMethod.displayType, 'oauth_signature_method': oauth1Model.signatureMethod.displayType
.toUpperCase(),
'oauth_timestamp': timestamp, 'oauth_timestamp': timestamp,
'oauth_nonce': nonce, 'oauth_nonce': nonce,
'oauth_version': oauth1Model.version, 'oauth_version': oauth1Model.version,