@openverifiable/connector-bluesky 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -4
- package/package.json +1 -1
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAIV,eAAe,EACf,eAAe,EAChB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAIV,eAAe,EACf,eAAe,EAChB,MAAM,sBAAsB,CAAC;AA0pB9B;;GAEG;AACH,QAAA,MAAM,sBAAsB,EAAE,eAAe,CAAC,eAAe,CAW5D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -770,8 +770,10 @@ async function exchangeCodeForTokens(code, redirectUri, tokenEndpoint, codeVerif
|
|
|
770
770
|
};
|
|
771
771
|
// For confidential clients, add client assertion JWT
|
|
772
772
|
if (config.tokenEndpointAuthMethod === 'private_key_jwt') {
|
|
773
|
+
// Extract issuer origin from token endpoint URL
|
|
774
|
+
const issuer = new URL(tokenEndpoint).origin;
|
|
773
775
|
try {
|
|
774
|
-
const clientAssertion = await generateClientAssertion(effectiveClientId,
|
|
776
|
+
const clientAssertion = await generateClientAssertion(effectiveClientId, issuer, config);
|
|
775
777
|
if (clientAssertion) {
|
|
776
778
|
params.append('client_assertion', clientAssertion);
|
|
777
779
|
params.append('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
|
|
@@ -781,7 +783,7 @@ async function exchangeCodeForTokens(code, redirectUri, tokenEndpoint, codeVerif
|
|
|
781
783
|
const assertionEndpoint = config.assertionEndpoint;
|
|
782
784
|
if (assertionEndpoint) {
|
|
783
785
|
const assertionResponse = await got.post(assertionEndpoint, {
|
|
784
|
-
json: { clientId: effectiveClientId,
|
|
786
|
+
json: { clientId: effectiveClientId, issuer },
|
|
785
787
|
headers: {
|
|
786
788
|
'X-API-Key': config.assertionApiKey || '',
|
|
787
789
|
},
|
|
@@ -963,7 +965,7 @@ const getAuthorizationUri = (getConfig) => async ({ state, redirectUri, ...rest
|
|
|
963
965
|
// Add client assertion for confidential clients (required for PAR)
|
|
964
966
|
if (validatedConfig.tokenEndpointAuthMethod === 'private_key_jwt') {
|
|
965
967
|
try {
|
|
966
|
-
const clientAssertion = await generateClientAssertion(effectiveClientId, authServerMetadata.
|
|
968
|
+
const clientAssertion = await generateClientAssertion(effectiveClientId, authServerMetadata.issuer, validatedConfig);
|
|
967
969
|
if (clientAssertion) {
|
|
968
970
|
parParams.append('client_assertion', clientAssertion);
|
|
969
971
|
parParams.append('client_assertion_type', 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer');
|
|
@@ -975,7 +977,7 @@ const getAuthorizationUri = (getConfig) => async ({ state, redirectUri, ...rest
|
|
|
975
977
|
const assertionResponse = await got.post(assertionEndpoint, {
|
|
976
978
|
json: {
|
|
977
979
|
clientId: effectiveClientId,
|
|
978
|
-
|
|
980
|
+
issuer: authServerMetadata.issuer
|
|
979
981
|
},
|
|
980
982
|
headers: {
|
|
981
983
|
'X-API-Key': config.assertionApiKey || '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openverifiable/connector-bluesky",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Bluesky/AT Protocol OAuth connector for LogTo with PAR, PKCE, and DPoP support",
|
|
5
5
|
"author": "OpenVerifiable (https://github.com/openverifiable)",
|
|
6
6
|
"homepage": "https://openverifiable.org",
|