release: @marketplaces/auth 0.1.0 (built from main)

This commit is contained in:
sdarbinyan
2026-08-18 01:55:26 +04:00
commit 93f99cc7b1
44 changed files with 1601 additions and 0 deletions

35
dist/ed25519/auth.service.d.ts vendored Normal file
View File

@@ -0,0 +1,35 @@
import { Observable } from 'rxjs';
import { AuthTokenPair } from './models/auth-api.model';
import { AuthError } from './models/auth-error.model';
export type LoginPhase = 'idle' | 'requesting-challenge' | 'signing' | 'verifying' | 'done';
/**
* Orchestrates the Ed25519 challenge/response admin auth flow end to end:
*
* GET /api/admin/auth/challenge -> { nonce }
* sign(nonce) with local Ed25519 key -> signature
* POST /api/admin/auth/verify -> { token, refreshToken }
*
* This is the lowest-level orchestrator; components should go through
* AuthFacade rather than calling this directly. Exported from the package
* barrel as `Ed25519AuthService` to avoid colliding with the telegram
* module's `AuthService`.
*/
export declare class AuthService {
private readonly api;
private readonly keypair;
private readonly session;
private readonly loginPhaseSignal;
private readonly lastErrorSignal;
readonly loginPhase: import("@angular/core").Signal<LoginPhase>;
readonly lastError: import("@angular/core").Signal<AuthError | null>;
constructor();
/** Restores a persisted session on app bootstrap. Call once from an APP_INITIALIZER or root component. */
restoreSession(): void;
login(): Observable<AuthTokenPair>;
refresh(): Observable<AuthTokenPair>;
logout(): Observable<void>;
private signChallenge;
private handleAuthError;
private toAuthErrorShape;
private toAuthError;
}