@authhero/adapter-interfaces 3.11.0 → 3.12.0
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/adapter-interfaces.cjs +1 -1
- package/dist/adapter-interfaces.d.ts +41 -1
- package/dist/adapter-interfaces.mjs +444 -405
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils/base32.d.ts +16 -0
- package/dist/types/utils/base64.d.ts +13 -0
- package/dist/types/utils/hex.d.ts +8 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base32 (RFC 4648 §6, uppercase alphabet), the canonical implementation
|
|
3
|
+
* for the AuthHero packages. Replaces the `oslo/encoding` dependency we
|
|
4
|
+
* are migrating away from.
|
|
5
|
+
*
|
|
6
|
+
* The primary consumer is TOTP secret handling (RFC 6238 secrets are
|
|
7
|
+
* conventionally shared as unpadded base32). Encoding is padding-free;
|
|
8
|
+
* decoding is lenient and accepts input with or without padding.
|
|
9
|
+
*/
|
|
10
|
+
/** Encode raw bytes as a padding-free base32 string. */
|
|
11
|
+
export declare function encodeBase32(bytes: Uint8Array): string;
|
|
12
|
+
/** Decode a base32 string (with or without padding, case-insensitive)
|
|
13
|
+
* back to raw bytes. Throws on non-canonical input: characters outside
|
|
14
|
+
* the alphabet, impossible unpadded lengths, or non-zero trailing bits —
|
|
15
|
+
* so distinct malformed strings can never normalize to the same bytes. */
|
|
16
|
+
export declare function decodeBase32(input: string): Uint8Array;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard base64 (RFC 4648 §4), the canonical implementation for the
|
|
3
|
+
* AuthHero packages (see base64url.ts for the URL-safe variant). Replaces
|
|
4
|
+
* the `oslo/encoding` dependency we are migrating away from.
|
|
5
|
+
*
|
|
6
|
+
* Encoding emits padding ("=") to match the conventional wire format
|
|
7
|
+
* (PEM bodies, `openssl rand -base64` keys). Decoding is lenient and
|
|
8
|
+
* accepts input with or without padding.
|
|
9
|
+
*/
|
|
10
|
+
/** Encode raw bytes as a padded standard-base64 string. */
|
|
11
|
+
export declare function encodeBase64(bytes: Uint8Array): string;
|
|
12
|
+
/** Decode a standard-base64 string (with or without padding) to raw bytes. */
|
|
13
|
+
export declare function decodeBase64(input: string): Uint8Array;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lowercase hex encoding, the canonical implementation for the AuthHero
|
|
3
|
+
* packages. Replaces the `oslo/encoding` dependency we are migrating
|
|
4
|
+
* away from.
|
|
5
|
+
*/
|
|
6
|
+
/** Encode bytes as a lowercase hex string. Accepts an ArrayBuffer so
|
|
7
|
+
* Web Crypto digest/thumbprint results can be passed directly. */
|
|
8
|
+
export declare function encodeHex(data: Uint8Array | ArrayBuffer): string;
|
|
@@ -3,5 +3,8 @@ export * from "./passthrough";
|
|
|
3
3
|
export * from "./connection-attributes";
|
|
4
4
|
export * from "./guards";
|
|
5
5
|
export * from "./base64url";
|
|
6
|
+
export * from "./base64";
|
|
7
|
+
export * from "./base32";
|
|
8
|
+
export * from "./hex";
|
|
6
9
|
export * from "./cursor";
|
|
7
10
|
export * from "./lucene";
|