mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
fix: rename signatureEncoding to signatureMethod for OAuth1 in opencollection types (#7724)
Align with @opencollection/types 0.9.1 which renamed the OAuth1 field from signatureEncoding to signatureMethod. Update converters, filestore, and all YML test fixtures. Increase OAuth1 UI test timeouts from 30s to 60s.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.4",
|
||||
"@opencollection/types": "0.9.0",
|
||||
"@opencollection/types": "0.9.1",
|
||||
"@rollup/plugin-alias": "^5.1.0",
|
||||
"@rollup/plugin-commonjs": "^23.0.2",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
|
||||
@@ -292,7 +292,7 @@ export const fromOpenCollectionAuth = (auth: Auth | undefined): BrunoAuth => {
|
||||
accessTokenSecret: oauth1Auth.accessTokenSecret || null,
|
||||
callbackUrl: oauth1Auth.callbackUrl || null,
|
||||
verifier: oauth1Auth.verifier || null,
|
||||
signatureMethod: (oauth1Auth.signatureEncoding as BrunoAuthOauth1['signatureMethod']) || 'HMAC-SHA1',
|
||||
signatureMethod: (oauth1Auth.signatureMethod as BrunoAuthOauth1['signatureMethod']) || 'HMAC-SHA1',
|
||||
privateKey: (typeof oauth1Auth.privateKey === 'object' && oauth1Auth.privateKey ? oauth1Auth.privateKey.value : oauth1Auth.privateKey) || null,
|
||||
privateKeyType: (typeof oauth1Auth.privateKey === 'object' && oauth1Auth.privateKey ? oauth1Auth.privateKey.type : 'text') as BrunoAuthOauth1['privateKeyType'],
|
||||
timestamp: oauth1Auth.timestamp || null,
|
||||
@@ -500,7 +500,7 @@ export const toOpenCollectionAuth = (auth: BrunoAuth | null | undefined): Auth |
|
||||
accessTokenSecret: auth.oauth1?.accessTokenSecret || '',
|
||||
callbackUrl: auth.oauth1?.callbackUrl || '',
|
||||
verifier: auth.oauth1?.verifier || '',
|
||||
signatureEncoding: auth.oauth1?.signatureMethod || 'HMAC-SHA1',
|
||||
signatureMethod: auth.oauth1?.signatureMethod || 'HMAC-SHA1',
|
||||
privateKey: auth.oauth1?.privateKeyType === 'file'
|
||||
? { type: 'file' as const, value: auth.oauth1?.privateKey || '' }
|
||||
: { type: 'text' as const, value: auth.oauth1?.privateKey || '' },
|
||||
|
||||
@@ -129,7 +129,7 @@ const buildOAuth1Auth = (config?: BrunoAuth['oauth1']): AuthOAuth1 => {
|
||||
if (isString(config.accessTokenSecret)) auth.accessTokenSecret = config.accessTokenSecret;
|
||||
if (isString(config.callbackUrl)) auth.callbackUrl = config.callbackUrl;
|
||||
if (isString(config.verifier)) auth.verifier = config.verifier;
|
||||
if (isString(config.signatureMethod)) auth.signatureEncoding = config.signatureMethod;
|
||||
if (isString(config.signatureMethod)) auth.signatureMethod = config.signatureMethod;
|
||||
if (isString(config.privateKey)) {
|
||||
auth.privateKey = config.privateKeyType === 'file'
|
||||
? { type: 'file' as const, value: config.privateKey }
|
||||
@@ -272,7 +272,7 @@ export const toBrunoAuth = (auth: Auth | null | undefined): BrunoAuth | null =>
|
||||
accessTokenSecret: auth.accessTokenSecret || null,
|
||||
callbackUrl: auth.callbackUrl || null,
|
||||
verifier: auth.verifier || null,
|
||||
signatureMethod: (auth.signatureEncoding as BrunoAuthOauth1['signatureMethod']) || 'HMAC-SHA1',
|
||||
signatureMethod: (auth.signatureMethod as BrunoAuthOauth1['signatureMethod']) || 'HMAC-SHA1',
|
||||
privateKey: (typeof auth.privateKey === 'object' && auth.privateKey ? auth.privateKey.value : auth.privateKey) || null,
|
||||
privateKeyType: (typeof auth.privateKey === 'object' && auth.privateKey ? auth.privateKey.type : 'text') as BrunoAuthOauth1['privateKeyType'],
|
||||
timestamp: auth.timestamp || null,
|
||||
|
||||
Reference in New Issue
Block a user