@openverifiable/connector-bluesky 1.0.2 → 1.0.3
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/package.json +1 -1
- package/lib/__fixtures__/did-documents.d.ts +0 -54
- package/lib/__fixtures__/did-documents.d.ts.map +0 -1
- package/lib/__fixtures__/metadata.d.ts +0 -70
- package/lib/__fixtures__/metadata.d.ts.map +0 -1
- package/lib/__fixtures__/oauth-errors.d.ts +0 -42
- package/lib/__fixtures__/oauth-errors.d.ts.map +0 -1
- package/lib/__fixtures__/profile-responses.d.ts +0 -34
- package/lib/__fixtures__/profile-responses.d.ts.map +0 -1
- package/lib/__fixtures__/token-responses.d.ts +0 -38
- package/lib/__fixtures__/token-responses.d.ts.map +0 -1
- package/lib/__tests__/integration/real-account-helpers.d.ts +0 -43
- package/lib/__tests__/integration/real-account-helpers.d.ts.map +0 -1
- package/lib/__tests__/integration/real-account.test.d.ts +0 -12
- package/lib/__tests__/integration/real-account.test.d.ts.map +0 -1
- package/lib/client-assertion.test.d.ts +0 -6
- package/lib/client-assertion.test.d.ts.map +0 -1
- package/lib/dpop.test.d.ts +0 -6
- package/lib/dpop.test.d.ts.map +0 -1
- package/lib/index.test.d.ts +0 -7
- package/lib/index.test.d.ts.map +0 -1
- package/lib/pds-discovery.test.d.ts +0 -6
- package/lib/pds-discovery.test.d.ts.map +0 -1
- package/lib/pkce.test.d.ts +0 -6
- package/lib/pkce.test.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openverifiable/connector-bluesky",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DID Document Fixtures
|
|
3
|
-
* Valid DID documents for testing DID resolution and PDS discovery
|
|
4
|
-
*/
|
|
5
|
-
export declare const didPlcDocument: {
|
|
6
|
-
id: string;
|
|
7
|
-
'@context': string[];
|
|
8
|
-
service: {
|
|
9
|
-
id: string;
|
|
10
|
-
type: string;
|
|
11
|
-
serviceEndpoint: string;
|
|
12
|
-
}[];
|
|
13
|
-
verificationMethod: {
|
|
14
|
-
id: string;
|
|
15
|
-
type: string;
|
|
16
|
-
controller: string;
|
|
17
|
-
publicKeyMultibase: string;
|
|
18
|
-
}[];
|
|
19
|
-
};
|
|
20
|
-
export declare const didWebDocument: {
|
|
21
|
-
id: string;
|
|
22
|
-
'@context': string[];
|
|
23
|
-
service: {
|
|
24
|
-
id: string;
|
|
25
|
-
type: string;
|
|
26
|
-
serviceEndpoint: string;
|
|
27
|
-
}[];
|
|
28
|
-
verificationMethod: {
|
|
29
|
-
id: string;
|
|
30
|
-
type: string;
|
|
31
|
-
controller: string;
|
|
32
|
-
publicKeyMultibase: string;
|
|
33
|
-
}[];
|
|
34
|
-
};
|
|
35
|
-
export declare const didDocumentWithHandle: {
|
|
36
|
-
alsoKnownAs: string[];
|
|
37
|
-
id: string;
|
|
38
|
-
'@context': string[];
|
|
39
|
-
service: {
|
|
40
|
-
id: string;
|
|
41
|
-
type: string;
|
|
42
|
-
serviceEndpoint: string;
|
|
43
|
-
}[];
|
|
44
|
-
verificationMethod: {
|
|
45
|
-
id: string;
|
|
46
|
-
type: string;
|
|
47
|
-
controller: string;
|
|
48
|
-
publicKeyMultibase: string;
|
|
49
|
-
}[];
|
|
50
|
-
};
|
|
51
|
-
export declare const invalidDidDocument: {
|
|
52
|
-
id: string;
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=did-documents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"did-documents.d.ts","sourceRoot":"","sources":["../../src/__fixtures__/did-documents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAqB1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAqB1B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;CAGjC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;CAG9B,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OAuth Metadata Fixtures
|
|
3
|
-
* Authorization server and resource server metadata for testing
|
|
4
|
-
*/
|
|
5
|
-
export declare const authorizationServerMetadata: {
|
|
6
|
-
issuer: string;
|
|
7
|
-
pushed_authorization_request_endpoint: string;
|
|
8
|
-
authorization_endpoint: string;
|
|
9
|
-
token_endpoint: string;
|
|
10
|
-
scopes_supported: string;
|
|
11
|
-
response_types_supported: string[];
|
|
12
|
-
grant_types_supported: string[];
|
|
13
|
-
code_challenge_methods_supported: string[];
|
|
14
|
-
dpop_signing_alg_values_supported: string[];
|
|
15
|
-
};
|
|
16
|
-
export declare const authorizationServerMetadataWithoutAtproto: {
|
|
17
|
-
scopes_supported: string;
|
|
18
|
-
issuer: string;
|
|
19
|
-
pushed_authorization_request_endpoint: string;
|
|
20
|
-
authorization_endpoint: string;
|
|
21
|
-
token_endpoint: string;
|
|
22
|
-
response_types_supported: string[];
|
|
23
|
-
grant_types_supported: string[];
|
|
24
|
-
code_challenge_methods_supported: string[];
|
|
25
|
-
dpop_signing_alg_values_supported: string[];
|
|
26
|
-
};
|
|
27
|
-
export declare const resourceServerMetadata: {
|
|
28
|
-
resource: string;
|
|
29
|
-
authorization_servers: string[];
|
|
30
|
-
};
|
|
31
|
-
export declare const resourceServerMetadataWithEntryway: {
|
|
32
|
-
resource: string;
|
|
33
|
-
authorization_servers: string[];
|
|
34
|
-
};
|
|
35
|
-
export declare const clientMetadata: {
|
|
36
|
-
client_id: string;
|
|
37
|
-
application_type: string;
|
|
38
|
-
client_name: string;
|
|
39
|
-
client_uri: string;
|
|
40
|
-
dpop_bound_access_tokens: boolean;
|
|
41
|
-
grant_types: string[];
|
|
42
|
-
redirect_uris: string[];
|
|
43
|
-
response_types: string[];
|
|
44
|
-
scope: string;
|
|
45
|
-
token_endpoint_auth_method: string;
|
|
46
|
-
};
|
|
47
|
-
export declare const confidentialClientMetadata: {
|
|
48
|
-
token_endpoint_auth_method: string;
|
|
49
|
-
token_endpoint_auth_signing_alg: string;
|
|
50
|
-
jwks_uri: string;
|
|
51
|
-
jwks: {
|
|
52
|
-
keys: {
|
|
53
|
-
kty: string;
|
|
54
|
-
crv: string;
|
|
55
|
-
x: string;
|
|
56
|
-
y: string;
|
|
57
|
-
kid: string;
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
client_id: string;
|
|
61
|
-
application_type: string;
|
|
62
|
-
client_name: string;
|
|
63
|
-
client_uri: string;
|
|
64
|
-
dpop_bound_access_tokens: boolean;
|
|
65
|
-
grant_types: string[];
|
|
66
|
-
redirect_uris: string[];
|
|
67
|
-
response_types: string[];
|
|
68
|
-
scope: string;
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/__fixtures__/metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;CAUvC,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;CAGrD,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;CAGlC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;CAG9C,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;CAW1B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;CAgBtC,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OAuth Error Response Fixtures
|
|
3
|
-
* Standard OAuth error responses for testing error handling
|
|
4
|
-
*/
|
|
5
|
-
export declare const useDpopNonceError: {
|
|
6
|
-
error: string;
|
|
7
|
-
error_description: string;
|
|
8
|
-
nonce: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const invalidRequestError: {
|
|
11
|
-
error: string;
|
|
12
|
-
error_description: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const invalidClientError: {
|
|
15
|
-
error: string;
|
|
16
|
-
error_description: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const invalidGrantError: {
|
|
19
|
-
error: string;
|
|
20
|
-
error_description: string;
|
|
21
|
-
};
|
|
22
|
-
export declare const invalidScopeError: {
|
|
23
|
-
error: string;
|
|
24
|
-
error_description: string;
|
|
25
|
-
};
|
|
26
|
-
export declare const unauthorizedClientError: {
|
|
27
|
-
error: string;
|
|
28
|
-
error_description: string;
|
|
29
|
-
};
|
|
30
|
-
export declare const unsupportedGrantTypeError: {
|
|
31
|
-
error: string;
|
|
32
|
-
error_description: string;
|
|
33
|
-
};
|
|
34
|
-
export declare const serverError: {
|
|
35
|
-
error: string;
|
|
36
|
-
error_description: string;
|
|
37
|
-
};
|
|
38
|
-
export declare const temporarilyUnavailableError: {
|
|
39
|
-
error: string;
|
|
40
|
-
error_description: string;
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=oauth-errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-errors.d.ts","sourceRoot":"","sources":["../../src/__fixtures__/oauth-errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;CAG/B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;CAGnC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC;AAEF,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Profile Response Fixtures
|
|
3
|
-
* AT Protocol profile responses from PDS for testing
|
|
4
|
-
*/
|
|
5
|
-
export declare const profileResponse: {
|
|
6
|
-
did: string;
|
|
7
|
-
handle: string;
|
|
8
|
-
displayName: string;
|
|
9
|
-
avatar: string;
|
|
10
|
-
email: string;
|
|
11
|
-
description: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const profileResponseMinimal: {
|
|
15
|
-
did: string;
|
|
16
|
-
handle: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const profileResponseWithoutEmail: {
|
|
19
|
-
did: string;
|
|
20
|
-
handle: string;
|
|
21
|
-
displayName: string;
|
|
22
|
-
avatar: string;
|
|
23
|
-
description: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const profileResponseWithDifferentDID: {
|
|
26
|
-
did: string;
|
|
27
|
-
handle: string;
|
|
28
|
-
displayName: string;
|
|
29
|
-
avatar: string;
|
|
30
|
-
email: string;
|
|
31
|
-
description: string;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=profile-responses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile-responses.d.ts","sourceRoot":"","sources":["../../src/__fixtures__/profile-responses.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,eAAe;;;;;;;;CAQ3B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;CAGlC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;CAMvC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;CAG3C,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token Response Fixtures
|
|
3
|
-
* OAuth token exchange responses for testing
|
|
4
|
-
*/
|
|
5
|
-
export declare const tokenResponse: {
|
|
6
|
-
access_token: string;
|
|
7
|
-
refresh_token: string;
|
|
8
|
-
token_type: string;
|
|
9
|
-
expires_in: number;
|
|
10
|
-
scope: string;
|
|
11
|
-
sub: string;
|
|
12
|
-
did: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const tokenResponseWithoutRefresh: {
|
|
15
|
-
access_token: string;
|
|
16
|
-
token_type: string;
|
|
17
|
-
expires_in: number;
|
|
18
|
-
scope: string;
|
|
19
|
-
sub: string;
|
|
20
|
-
};
|
|
21
|
-
export declare const tokenResponseWithDifferentDID: {
|
|
22
|
-
sub: string;
|
|
23
|
-
did: string;
|
|
24
|
-
access_token: string;
|
|
25
|
-
refresh_token: string;
|
|
26
|
-
token_type: string;
|
|
27
|
-
expires_in: number;
|
|
28
|
-
scope: string;
|
|
29
|
-
};
|
|
30
|
-
export declare const refreshTokenResponse: {
|
|
31
|
-
access_token: string;
|
|
32
|
-
refresh_token: string;
|
|
33
|
-
token_type: string;
|
|
34
|
-
expires_in: number;
|
|
35
|
-
scope: string;
|
|
36
|
-
sub: string;
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=token-responses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-responses.d.ts","sourceRoot":"","sources":["../../src/__fixtures__/token-responses.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,aAAa;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;CAMvC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;CAIzC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;CAOhC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Real Account Test Helpers
|
|
3
|
-
* Utilities for testing with real AT Protocol accounts
|
|
4
|
-
*
|
|
5
|
-
* Note: For full token verification, you may need @atproto/api
|
|
6
|
-
* Install it as a dev dependency if needed: npm install --save-dev @atproto/api
|
|
7
|
-
*/
|
|
8
|
-
import type { BlueskyConfig } from '../../types.js';
|
|
9
|
-
export interface TestAccount {
|
|
10
|
-
handle: string;
|
|
11
|
-
did: string;
|
|
12
|
-
pdsUrl: string;
|
|
13
|
-
}
|
|
14
|
-
export interface TestSession {
|
|
15
|
-
accessToken: string;
|
|
16
|
-
refreshToken?: string;
|
|
17
|
-
did: string;
|
|
18
|
-
expiresAt: number;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get test account from environment variables
|
|
22
|
-
*/
|
|
23
|
-
export declare function getTestAccount(): TestAccount;
|
|
24
|
-
/**
|
|
25
|
-
* Verify access token is valid by making an authenticated request
|
|
26
|
-
*
|
|
27
|
-
* Note: This requires @atproto/api. For a simpler check, you can verify
|
|
28
|
-
* the token structure or make a direct HTTP request with DPoP.
|
|
29
|
-
*/
|
|
30
|
-
export declare function verifyAccessToken(accessToken: string, did: string, pdsUrl: string): Promise<boolean>;
|
|
31
|
-
/**
|
|
32
|
-
* Create test config from environment variables
|
|
33
|
-
*/
|
|
34
|
-
export declare function getTestConfig(): BlueskyConfig;
|
|
35
|
-
/**
|
|
36
|
-
* Check if integration tests should run
|
|
37
|
-
*/
|
|
38
|
-
export declare function shouldRunIntegrationTests(): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Get test redirect URI
|
|
41
|
-
*/
|
|
42
|
-
export declare function getTestRedirectUri(): string;
|
|
43
|
-
//# sourceMappingURL=real-account-helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"real-account-helpers.d.ts","sourceRoot":"","sources":["../../../src/__tests__/integration/real-account-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAa5C;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAmBlB;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,aAAa,CA0B7C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAMnD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAM3C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Real Account Integration Tests
|
|
3
|
-
*
|
|
4
|
-
* These tests require:
|
|
5
|
-
* 1. A real Bluesky test account
|
|
6
|
-
* 2. Publicly accessible client metadata and JWKS
|
|
7
|
-
* 3. Environment variables configured (see INTEGRATION_TESTING.md)
|
|
8
|
-
*
|
|
9
|
-
* These tests are skipped if TEST_BLUESKY_HANDLE is not set.
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=real-account.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"real-account.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/integration/real-account.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-assertion.test.d.ts","sourceRoot":"","sources":["../src/client-assertion.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/lib/dpop.test.d.ts
DELETED
package/lib/dpop.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dpop.test.d.ts","sourceRoot":"","sources":["../src/dpop.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/lib/index.test.d.ts
DELETED
package/lib/index.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pds-discovery.test.d.ts","sourceRoot":"","sources":["../src/pds-discovery.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/lib/pkce.test.d.ts
DELETED
package/lib/pkce.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pkce.test.d.ts","sourceRoot":"","sources":["../src/pkce.test.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|