mirror of
https://github.com/honojs/hono.git
synced 2024-11-21 18:18:57 +01:00
chore(utils/jwt): add @module
docs (#3101)
This commit is contained in:
parent
e513fe7c46
commit
a90ff2d4fd
@ -1,5 +1,8 @@
|
||||
// JSON Web Algorithms (JWA)
|
||||
// https://datatracker.ietf.org/doc/html/rfc7518
|
||||
/**
|
||||
* @module
|
||||
* JSON Web Algorithms (JWA)
|
||||
* https://datatracker.ietf.org/doc/html/rfc7518
|
||||
*/
|
||||
|
||||
export enum AlgorithmTypes {
|
||||
HS256 = 'HS256',
|
||||
|
@ -1,12 +1,15 @@
|
||||
/**
|
||||
* @module
|
||||
* JSON Web Signature (JWS)
|
||||
* https://datatracker.ietf.org/doc/html/rfc7515
|
||||
*/
|
||||
|
||||
import { getRuntimeKey } from '../../helper/adapter'
|
||||
import { decodeBase64 } from '../encode'
|
||||
import type { SignatureAlgorithm } from './jwa'
|
||||
import { CryptoKeyUsage, JwtAlgorithmNotImplemented } from './types'
|
||||
import { utf8Encoder } from './utf8'
|
||||
|
||||
// JSON Web Signature (JWS)
|
||||
// https://datatracker.ietf.org/doc/html/rfc7515
|
||||
|
||||
type KeyImporterAlgorithm = Parameters<typeof crypto.subtle.importKey>[2]
|
||||
type KeyAlgorithm =
|
||||
| AlgorithmIdentifier
|
||||
|
@ -1,3 +1,9 @@
|
||||
/**
|
||||
* @module
|
||||
* JSON Web Token (JWT)
|
||||
* https://datatracker.ietf.org/doc/html/rfc7519
|
||||
*/
|
||||
|
||||
import { decodeBase64Url, encodeBase64Url } from '../../utils/encode'
|
||||
import { AlgorithmTypes } from './jwa'
|
||||
import type { SignatureAlgorithm } from './jwa'
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @module
|
||||
* Type definitions for JWT utilities.
|
||||
*/
|
||||
|
||||
export class JwtAlgorithmNotImplemented extends Error {
|
||||
constructor(alg: string) {
|
||||
super(`${alg} is not an implemented algorithm`)
|
||||
|
@ -1,2 +1,7 @@
|
||||
/**
|
||||
* @module
|
||||
* Functions for encoding/decoding UTF8.
|
||||
*/
|
||||
|
||||
export const utf8Encoder: TextEncoder = new TextEncoder()
|
||||
export const utf8Decoder: TextDecoder = new TextDecoder()
|
||||
|
Loading…
Reference in New Issue
Block a user