@happyvertical/auth 0.102.0 → 0.102.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.
@@ -1,4 +1,10 @@
1
- import { AuthInterface, GetAuthOptions } from './types';
1
+ /**
2
+ * @happyvertical/auth - Factory Functions
3
+ *
4
+ * Creates authentication provider instances based on configuration.
5
+ * Supports Keycloak, AWS Cognito, and Nostr providers.
6
+ */
7
+ import type { AuthInterface, GetAuthOptions } from "./types.js";
2
8
  /**
3
9
  * Creates an authentication provider instance based on the provided options.
4
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/shared/factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EACV,aAAa,EAEb,cAAc,EAMf,MAAM,SAAS,CAAC;AAsDjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAqF7E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,aAAa,CAAC,CA4BxB"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/shared/factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EACV,aAAa,EAEb,cAAc,EAMf,MAAM,YAAS,CAAC;AAsDjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAqF7E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,aAAa,CAAC,CA4BxB"}
@@ -1,4 +1,9 @@
1
- import { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CognitoOptions, CreateUserRequest, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
1
+ /**
2
+ * AWS Cognito Provider - OAuth2 Authentication
3
+ *
4
+ * This is a stub implementation. The full implementation will be added in Phase 3.
5
+ */
6
+ import type { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CognitoOptions, CreateUserRequest, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
2
7
  /**
3
8
  * AWS Cognito authentication provider.
4
9
  *
@@ -1,4 +1,11 @@
1
- import { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, GitHubOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
1
+ /**
2
+ * GitHub Provider - OAuth2 Authentication
3
+ *
4
+ * Implements OAuth2 authentication with GitHub.
5
+ * Note: GitHub does NOT support full OIDC (no id_token).
6
+ * User info must be fetched via GitHub API.
7
+ */
8
+ import type { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, GitHubOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
2
9
  /**
3
10
  * GitHub authentication provider.
4
11
  *
@@ -1,4 +1,13 @@
1
- import { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, GoogleOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
1
+ /**
2
+ * Google Provider - OAuth2/OIDC Authentication
3
+ *
4
+ * Implements OAuth2/OIDC authentication with Google including:
5
+ * - OIDC Discovery
6
+ * - Authorization Code Flow with PKCE
7
+ * - Token validation using JWKS (RS256)
8
+ * - ID token claims extraction
9
+ */
10
+ import type { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, GoogleOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
2
11
  /**
3
12
  * Google authentication provider.
4
13
  *
@@ -1,4 +1,14 @@
1
- import { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, KanidmOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
1
+ /**
2
+ * Kanidm Provider - OAuth2/OIDC Authentication
3
+ *
4
+ * Implements OAuth2/OIDC authentication with Kanidm server including:
5
+ * - OIDC Discovery (client-specific endpoints)
6
+ * - Authorization Code Flow with PKCE (required by Kanidm)
7
+ * - Token validation using JWKS (ES256)
8
+ * - Token introspection
9
+ * - User management via Kanidm's native /v1/ API
10
+ */
11
+ import type { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, KanidmOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
2
12
  /**
3
13
  * Kanidm authentication provider.
4
14
  *
@@ -1,4 +1,15 @@
1
- import { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, KeycloakOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
1
+ /**
2
+ * Keycloak Provider - OIDC/OAuth2 Authentication
3
+ *
4
+ * Implements full OIDC/OAuth2 authentication with Keycloak server including:
5
+ * - OIDC Discovery
6
+ * - Authorization Code Flow with PKCE
7
+ * - Token validation using JWKS
8
+ * - Token introspection
9
+ * - User management via Admin API
10
+ * - Session management
11
+ */
12
+ import type { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, KeycloakOptions, LogoutOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../types.js';
2
13
  /**
3
14
  * Keycloak authentication provider.
4
15
  *
@@ -1,4 +1,15 @@
1
- import { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, LogoutOptions, NostrOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../../types.js';
1
+ /**
2
+ * Nostr Provider - Public Key Identity Authentication
3
+ *
4
+ * This is a stub implementation. The full implementation will be added in Phase 4.
5
+ *
6
+ * Nostr authentication uses public key cryptography:
7
+ * - Identity = public key (npub)
8
+ * - Authentication = proving private key ownership via signatures
9
+ * - Tokens = NIP-98 signed events
10
+ * - Profiles = kind:0 events from relays
11
+ */
12
+ import type { AuthCapabilities, AuthCredentials, AuthInterface, AuthorizationOptions, AuthorizationResult, AuthResult, CodeExchangeParams, CreateUserRequest, LogoutOptions, NostrOptions, OIDCDiscoveryDocument, Session, TokenClaims, TokenIntrospection, TokenPayload, TokenValidationOptions, UserListResult, UserProfile, UserQuery } from '../../types.js';
2
13
  /**
3
14
  * Nostr authentication provider.
4
15
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/auth",
3
- "version": "0.102.0",
3
+ "version": "0.102.2",
4
4
  "description": "Unified authentication interface supporting Keycloak, AWS Cognito, and Nostr with OAuth2/OIDC and public key identity",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "homepage": "https://github.com/happyvertical/sdk/tree/main/packages/auth#readme",
37
37
  "license": "MIT",
38
38
  "dependencies": {
39
- "@happyvertical/utils": "0.102.0",
39
+ "@happyvertical/utils": "0.102.2",
40
40
  "jose": "^6.2.2"
41
41
  },
42
42
  "optionalDependencies": {