@happyvertical/auth 0.80.0 → 0.80.2
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/dist/chunks/cognito-thQmKf7L.js +124 -0
- package/dist/chunks/cognito-thQmKf7L.js.map +1 -0
- package/dist/chunks/decode_jwt-BvtACpi_.js +1183 -0
- package/dist/chunks/decode_jwt-BvtACpi_.js.map +1 -0
- package/dist/chunks/errors-RgVH84_1.js +343 -0
- package/dist/chunks/errors-RgVH84_1.js.map +1 -0
- package/dist/chunks/github-uNnnVjFZ.js +311 -0
- package/dist/chunks/github-uNnnVjFZ.js.map +1 -0
- package/dist/chunks/google-C_p8rExJ.js +374 -0
- package/dist/chunks/google-C_p8rExJ.js.map +1 -0
- package/dist/chunks/kanidm-DTcc6ufi.js +567 -0
- package/dist/chunks/kanidm-DTcc6ufi.js.map +1 -0
- package/dist/chunks/keycloak-CzPHgI2z.js +632 -0
- package/dist/chunks/keycloak-CzPHgI2z.js.map +1 -0
- package/dist/chunks/nostr-zrMaYMU-.js +141 -0
- package/dist/chunks/nostr-zrMaYMU-.js.map +1 -0
- package/dist/cli/claude-context.js +17 -17
- package/dist/cli/claude-context.js.map +1 -1
- package/dist/index.js +204 -486
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunks/cognito-dmypylFX.js +0 -128
- package/dist/chunks/cognito-dmypylFX.js.map +0 -1
- package/dist/chunks/decode_jwt-D2OK1b8a.js +0 -1395
- package/dist/chunks/decode_jwt-D2OK1b8a.js.map +0 -1
- package/dist/chunks/github-NSZp5tVm.js +0 -413
- package/dist/chunks/github-NSZp5tVm.js.map +0 -1
- package/dist/chunks/google-HXk2ctYR.js +0 -483
- package/dist/chunks/google-HXk2ctYR.js.map +0 -1
- package/dist/chunks/index-BpsMhFXS.js +0 -151
- package/dist/chunks/index-BpsMhFXS.js.map +0 -1
- package/dist/chunks/kanidm-hkw-YPVF.js +0 -747
- package/dist/chunks/kanidm-hkw-YPVF.js.map +0 -1
- package/dist/chunks/keycloak-t6JEUeOz.js +0 -871
- package/dist/chunks/keycloak-t6JEUeOz.js.map +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { x as NotImplementedError } from "./errors-RgVH84_1.js";
|
|
2
|
+
//#region src/shared/providers/cognito.ts
|
|
3
|
+
/**
|
|
4
|
+
* AWS Cognito Provider - OAuth2 Authentication
|
|
5
|
+
*
|
|
6
|
+
* This is a stub implementation. The full implementation will be added in Phase 3.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* AWS Cognito authentication provider.
|
|
10
|
+
*
|
|
11
|
+
* Implements OAuth2 authentication with AWS Cognito User Pools.
|
|
12
|
+
*/
|
|
13
|
+
var CognitoProvider = class {
|
|
14
|
+
options;
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.options = {
|
|
17
|
+
scopes: [
|
|
18
|
+
"openid",
|
|
19
|
+
"profile",
|
|
20
|
+
"email"
|
|
21
|
+
],
|
|
22
|
+
...options
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
async getAuthorizationUrl(_options) {
|
|
26
|
+
throw new NotImplementedError("getAuthorizationUrl", "cognito");
|
|
27
|
+
}
|
|
28
|
+
async exchangeCode(_params) {
|
|
29
|
+
throw new NotImplementedError("exchangeCode", "cognito");
|
|
30
|
+
}
|
|
31
|
+
async authenticate(_credentials) {
|
|
32
|
+
throw new NotImplementedError("authenticate", "cognito");
|
|
33
|
+
}
|
|
34
|
+
async refresh(_refreshToken) {
|
|
35
|
+
throw new NotImplementedError("refresh", "cognito");
|
|
36
|
+
}
|
|
37
|
+
async logout(_options) {
|
|
38
|
+
throw new NotImplementedError("logout", "cognito");
|
|
39
|
+
}
|
|
40
|
+
async validateToken(_token, _options) {
|
|
41
|
+
throw new NotImplementedError("validateToken", "cognito");
|
|
42
|
+
}
|
|
43
|
+
decodeToken(_token) {
|
|
44
|
+
throw new NotImplementedError("decodeToken", "cognito");
|
|
45
|
+
}
|
|
46
|
+
async introspectToken(_token) {
|
|
47
|
+
throw new NotImplementedError("introspectToken", "cognito");
|
|
48
|
+
}
|
|
49
|
+
async getProfile(_tokenOrSession) {
|
|
50
|
+
throw new NotImplementedError("getProfile", "cognito");
|
|
51
|
+
}
|
|
52
|
+
async updateProfile(_tokenOrSession, _profile) {
|
|
53
|
+
throw new NotImplementedError("updateProfile", "cognito");
|
|
54
|
+
}
|
|
55
|
+
async getUser(_userId, _adminToken) {
|
|
56
|
+
throw new NotImplementedError("getUser", "cognito");
|
|
57
|
+
}
|
|
58
|
+
async createUser(_user, _adminToken) {
|
|
59
|
+
throw new NotImplementedError("createUser", "cognito");
|
|
60
|
+
}
|
|
61
|
+
async updateUser(_userId, _updates, _adminToken) {
|
|
62
|
+
throw new NotImplementedError("updateUser", "cognito");
|
|
63
|
+
}
|
|
64
|
+
async deleteUser(_userId, _adminToken) {
|
|
65
|
+
throw new NotImplementedError("deleteUser", "cognito");
|
|
66
|
+
}
|
|
67
|
+
async listUsers(_query, _adminToken) {
|
|
68
|
+
throw new NotImplementedError("listUsers", "cognito");
|
|
69
|
+
}
|
|
70
|
+
async requestPasswordReset(_email) {
|
|
71
|
+
throw new NotImplementedError("requestPasswordReset", "cognito");
|
|
72
|
+
}
|
|
73
|
+
async resetPassword(_token, _newPassword) {
|
|
74
|
+
throw new NotImplementedError("resetPassword", "cognito");
|
|
75
|
+
}
|
|
76
|
+
async listSessions(_userId, _adminToken) {
|
|
77
|
+
throw new NotImplementedError("listSessions", "cognito");
|
|
78
|
+
}
|
|
79
|
+
async revokeSession(_sessionId, _adminToken) {
|
|
80
|
+
throw new NotImplementedError("revokeSession", "cognito");
|
|
81
|
+
}
|
|
82
|
+
async revokeAllSessions(_userId, _adminToken) {
|
|
83
|
+
throw new NotImplementedError("revokeAllSessions", "cognito");
|
|
84
|
+
}
|
|
85
|
+
async hasRole(_tokenOrUserId, _role) {
|
|
86
|
+
throw new NotImplementedError("hasRole", "cognito");
|
|
87
|
+
}
|
|
88
|
+
async hasPermission(_tokenOrUserId, _permission, _resource) {
|
|
89
|
+
throw new NotImplementedError("hasPermission", "cognito");
|
|
90
|
+
}
|
|
91
|
+
async getRoles(_tokenOrUserId, _adminToken) {
|
|
92
|
+
throw new NotImplementedError("getRoles", "cognito");
|
|
93
|
+
}
|
|
94
|
+
async assignRole(_userId, _role, _adminToken) {
|
|
95
|
+
throw new NotImplementedError("assignRole", "cognito");
|
|
96
|
+
}
|
|
97
|
+
async removeRole(_userId, _role, _adminToken) {
|
|
98
|
+
throw new NotImplementedError("removeRole", "cognito");
|
|
99
|
+
}
|
|
100
|
+
async getCapabilities() {
|
|
101
|
+
return {
|
|
102
|
+
authorizationCode: true,
|
|
103
|
+
passwordGrant: true,
|
|
104
|
+
clientCredentials: false,
|
|
105
|
+
tokenRefresh: true,
|
|
106
|
+
oidc: true,
|
|
107
|
+
userManagement: true,
|
|
108
|
+
sessionManagement: true,
|
|
109
|
+
rbac: true,
|
|
110
|
+
passwordReset: true,
|
|
111
|
+
mfa: true,
|
|
112
|
+
socialLogin: true,
|
|
113
|
+
federation: true,
|
|
114
|
+
decentralized: false
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
async getDiscoveryDocument() {
|
|
118
|
+
throw new NotImplementedError("getDiscoveryDocument", "cognito");
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
//#endregion
|
|
122
|
+
export { CognitoProvider };
|
|
123
|
+
|
|
124
|
+
//# sourceMappingURL=cognito-thQmKf7L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cognito-thQmKf7L.js","names":[],"sources":["../../src/shared/providers/cognito.ts"],"sourcesContent":["/**\n * AWS Cognito Provider - OAuth2 Authentication\n *\n * This is a stub implementation. The full implementation will be added in Phase 3.\n */\n\nimport { NotImplementedError } from '../errors.js';\nimport type {\n AuthCapabilities,\n AuthCredentials,\n AuthInterface,\n AuthorizationOptions,\n AuthorizationResult,\n AuthResult,\n CodeExchangeParams,\n CognitoOptions,\n CreateUserRequest,\n LogoutOptions,\n OIDCDiscoveryDocument,\n Session,\n TokenClaims,\n TokenIntrospection,\n TokenPayload,\n TokenValidationOptions,\n UserListResult,\n UserProfile,\n UserQuery,\n} from '../types.js';\n\n/**\n * AWS Cognito authentication provider.\n *\n * Implements OAuth2 authentication with AWS Cognito User Pools.\n */\nexport class CognitoProvider implements AuthInterface {\n // biome-ignore lint/correctness/noUnusedPrivateClassMembers: Will be used when implemented\n private options: CognitoOptions;\n\n constructor(options: CognitoOptions) {\n this.options = {\n scopes: ['openid', 'profile', 'email'],\n ...options,\n };\n }\n\n // ---------------------------------------------------------------------------\n // AUTHENTICATION FLOWS\n // ---------------------------------------------------------------------------\n\n async getAuthorizationUrl(\n _options?: AuthorizationOptions,\n ): Promise<AuthorizationResult> {\n throw new NotImplementedError('getAuthorizationUrl', 'cognito');\n }\n\n async exchangeCode(_params: CodeExchangeParams): Promise<AuthResult> {\n throw new NotImplementedError('exchangeCode', 'cognito');\n }\n\n async authenticate(_credentials: AuthCredentials): Promise<AuthResult> {\n throw new NotImplementedError('authenticate', 'cognito');\n }\n\n async refresh(_refreshToken: string): Promise<AuthResult> {\n throw new NotImplementedError('refresh', 'cognito');\n }\n\n async logout(_options?: LogoutOptions): Promise<void> {\n throw new NotImplementedError('logout', 'cognito');\n }\n\n // ---------------------------------------------------------------------------\n // TOKEN OPERATIONS\n // ---------------------------------------------------------------------------\n\n async validateToken(\n _token: string,\n _options?: TokenValidationOptions,\n ): Promise<TokenClaims | null> {\n throw new NotImplementedError('validateToken', 'cognito');\n }\n\n decodeToken(_token: string): TokenPayload {\n throw new NotImplementedError('decodeToken', 'cognito');\n }\n\n async introspectToken(_token: string): Promise<TokenIntrospection> {\n throw new NotImplementedError('introspectToken', 'cognito');\n }\n\n // ---------------------------------------------------------------------------\n // USER OPERATIONS\n // ---------------------------------------------------------------------------\n\n async getProfile(_tokenOrSession: string): Promise<UserProfile> {\n throw new NotImplementedError('getProfile', 'cognito');\n }\n\n async updateProfile(\n _tokenOrSession: string,\n _profile: Partial<UserProfile>,\n ): Promise<UserProfile> {\n throw new NotImplementedError('updateProfile', 'cognito');\n }\n\n async getUser(_userId: string, _adminToken?: string): Promise<UserProfile> {\n throw new NotImplementedError('getUser', 'cognito');\n }\n\n async createUser(\n _user: CreateUserRequest,\n _adminToken: string,\n ): Promise<UserProfile> {\n throw new NotImplementedError('createUser', 'cognito');\n }\n\n async updateUser(\n _userId: string,\n _updates: Partial<CreateUserRequest>,\n _adminToken: string,\n ): Promise<UserProfile> {\n throw new NotImplementedError('updateUser', 'cognito');\n }\n\n async deleteUser(_userId: string, _adminToken: string): Promise<void> {\n throw new NotImplementedError('deleteUser', 'cognito');\n }\n\n async listUsers(\n _query: UserQuery,\n _adminToken?: string,\n ): Promise<UserListResult> {\n throw new NotImplementedError('listUsers', 'cognito');\n }\n\n async requestPasswordReset(_email: string): Promise<void> {\n throw new NotImplementedError('requestPasswordReset', 'cognito');\n }\n\n async resetPassword(_token: string, _newPassword: string): Promise<void> {\n throw new NotImplementedError('resetPassword', 'cognito');\n }\n\n // ---------------------------------------------------------------------------\n // SESSION OPERATIONS\n // ---------------------------------------------------------------------------\n\n async listSessions(\n _userId: string,\n _adminToken?: string,\n ): Promise<Session[]> {\n throw new NotImplementedError('listSessions', 'cognito');\n }\n\n async revokeSession(_sessionId: string, _adminToken?: string): Promise<void> {\n throw new NotImplementedError('revokeSession', 'cognito');\n }\n\n async revokeAllSessions(\n _userId: string,\n _adminToken?: string,\n ): Promise<void> {\n throw new NotImplementedError('revokeAllSessions', 'cognito');\n }\n\n // ---------------------------------------------------------------------------\n // AUTHORIZATION\n // ---------------------------------------------------------------------------\n\n async hasRole(_tokenOrUserId: string, _role: string): Promise<boolean> {\n throw new NotImplementedError('hasRole', 'cognito');\n }\n\n async hasPermission(\n _tokenOrUserId: string,\n _permission: string,\n _resource?: string,\n ): Promise<boolean> {\n throw new NotImplementedError('hasPermission', 'cognito');\n }\n\n async getRoles(\n _tokenOrUserId: string,\n _adminToken?: string,\n ): Promise<string[]> {\n throw new NotImplementedError('getRoles', 'cognito');\n }\n\n async assignRole(\n _userId: string,\n _role: string,\n _adminToken: string,\n ): Promise<void> {\n throw new NotImplementedError('assignRole', 'cognito');\n }\n\n async removeRole(\n _userId: string,\n _role: string,\n _adminToken: string,\n ): Promise<void> {\n throw new NotImplementedError('removeRole', 'cognito');\n }\n\n // ---------------------------------------------------------------------------\n // PROVIDER INFORMATION\n // ---------------------------------------------------------------------------\n\n async getCapabilities(): Promise<AuthCapabilities> {\n return {\n authorizationCode: true,\n passwordGrant: true,\n clientCredentials: false,\n tokenRefresh: true,\n oidc: true,\n userManagement: true,\n sessionManagement: true,\n rbac: true,\n passwordReset: true,\n mfa: true,\n socialLogin: true,\n federation: true,\n decentralized: false,\n };\n }\n\n async getDiscoveryDocument(): Promise<OIDCDiscoveryDocument | null> {\n throw new NotImplementedError('getDiscoveryDocument', 'cognito');\n }\n}\n"],"mappings":";;;;;;;;;;;;AAkCA,IAAa,kBAAb,MAAsD;CAEpD;CAEA,YAAY,SAAyB;EACnC,KAAK,UAAU;GACb,QAAQ;IAAC;IAAU;IAAW;GAAO;GACrC,GAAG;EACL;CACF;CAMA,MAAM,oBACJ,UAC8B;EAC9B,MAAM,IAAI,oBAAoB,uBAAuB,SAAS;CAChE;CAEA,MAAM,aAAa,SAAkD;EACnE,MAAM,IAAI,oBAAoB,gBAAgB,SAAS;CACzD;CAEA,MAAM,aAAa,cAAoD;EACrE,MAAM,IAAI,oBAAoB,gBAAgB,SAAS;CACzD;CAEA,MAAM,QAAQ,eAA4C;EACxD,MAAM,IAAI,oBAAoB,WAAW,SAAS;CACpD;CAEA,MAAM,OAAO,UAAyC;EACpD,MAAM,IAAI,oBAAoB,UAAU,SAAS;CACnD;CAMA,MAAM,cACJ,QACA,UAC6B;EAC7B,MAAM,IAAI,oBAAoB,iBAAiB,SAAS;CAC1D;CAEA,YAAY,QAA8B;EACxC,MAA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