@sphereon/oid4vci-common
Advanced tools
Comparing version 0.16.1-feature.MWALL.715.280 to 0.16.1-feature.MWALL.715.281
@@ -22,9 +22,9 @@ import { JWK } from '@sphereon/oid4vc-common'; | ||
*/ | ||
export declare const createProofOfPossession: <DIDDoc>(popMode: PoPMode, callbacks: ProofOfPossessionCallbacks<DIDDoc>, jwtProps?: JwtProps, existingJwt?: Jwt) => Promise<ProofOfPossession>; | ||
export declare const createProofOfPossession: <DIDDoc extends object = never>(popMode: PoPMode, callbacks: ProofOfPossessionCallbacks, jwtProps?: JwtProps, existingJwt?: Jwt) => Promise<ProofOfPossession>; | ||
export declare const isJWS: (token: string) => boolean; | ||
export declare const extractBearerToken: (authorizationHeader?: string) => string | undefined; | ||
export declare const validateJWT: (jwt?: string, opts?: { | ||
export declare const validateJWT: <DIDDoc extends object = never>(jwt?: string, opts?: { | ||
kid?: string; | ||
accessTokenVerificationCallback?: JWTVerifyCallback<never>; | ||
}) => Promise<JwtVerifyResult<any>>; | ||
accessTokenVerificationCallback?: JWTVerifyCallback; | ||
}) => Promise<JwtVerifyResult>; | ||
export interface JwtProps { | ||
@@ -31,0 +31,0 @@ typ?: Typ; |
@@ -162,3 +162,3 @@ import { CreateDPoPClientOpts } from '@sphereon/oid4vc-common'; | ||
alg?: Alg; | ||
signCallbacks?: ProofOfPossessionCallbacks<never>; | ||
signCallbacks?: ProofOfPossessionCallbacks; | ||
}; | ||
@@ -230,3 +230,3 @@ export interface IssuerOpts { | ||
requestObjectMode?: CreateRequestObjectMode; | ||
signCallbacks?: ProofOfPossessionCallbacks<never>; | ||
signCallbacks?: ProofOfPossessionCallbacks; | ||
clientMetadata?: Record<string, any>; | ||
@@ -233,0 +233,0 @@ iss?: string; |
@@ -76,5 +76,5 @@ import { BaseJWK } from '@sphereon/oid4vc-common'; | ||
} | ||
export interface ProofOfPossessionCallbacks<DIDDoc = never> { | ||
export interface ProofOfPossessionCallbacks { | ||
signCallback: JWTSignerCallback; | ||
verifyCallback?: JWTVerifyCallback<DIDDoc>; | ||
verifyCallback?: JWTVerifyCallback; | ||
} | ||
@@ -133,7 +133,7 @@ /** | ||
export type JWTSignerCallback = (jwt: Jwt, kid?: string) => Promise<string>; | ||
export type JWTVerifyCallback<DIDDoc = never> = (args: { | ||
export type JWTVerifyCallback = (args: { | ||
jwt: string; | ||
kid?: string; | ||
}) => Promise<JwtVerifyResult<DIDDoc>>; | ||
export interface JwtVerifyResult<DIDDoc = never> { | ||
}) => Promise<JwtVerifyResult>; | ||
export interface JwtVerifyResult { | ||
jwt: Jwt; | ||
@@ -143,3 +143,3 @@ kid?: string; | ||
did?: string; | ||
didDocument?: DIDDoc; | ||
didDocument?: Record<string, unknown>; | ||
x5c?: string[]; | ||
@@ -146,0 +146,0 @@ jwk?: BaseJWK; |
@@ -0,1 +1,2 @@ | ||
export * from './OpenIDClient'; | ||
export * from './Authorization.types'; | ||
@@ -2,0 +3,0 @@ export * from './CredentialIssuance.types'; |
@@ -17,2 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./OpenIDClient"), exports); | ||
__exportStar(require("./Authorization.types"), exports); | ||
@@ -19,0 +20,0 @@ __exportStar(require("./CredentialIssuance.types"), exports); |
import { randomBytes } from './randomBytes.js'; | ||
export * from './CredentialRequestUtil'; | ||
@@ -3,0 +4,0 @@ export * from './CredentialResponseUtil'; |
@@ -39,5 +39,5 @@ import { BaseJWK, JWK } from '@sphereon/oid4vc-common'; | ||
*/ | ||
export const createProofOfPossession = async <DIDDoc>( | ||
export const createProofOfPossession = async <DIDDoc extends object = never>( | ||
popMode: PoPMode, | ||
callbacks: ProofOfPossessionCallbacks<DIDDoc>, | ||
callbacks: ProofOfPossessionCallbacks, | ||
jwtProps?: JwtProps, | ||
@@ -92,6 +92,6 @@ existingJwt?: Jwt, | ||
export const validateJWT = async ( | ||
export const validateJWT = async <DIDDoc extends object = never>( | ||
jwt?: string, | ||
opts?: { kid?: string; accessTokenVerificationCallback?: JWTVerifyCallback<never> }, | ||
): Promise<JwtVerifyResult<any>> => { | ||
opts?: { kid?: string; accessTokenVerificationCallback?: JWTVerifyCallback }, | ||
): Promise<JwtVerifyResult> => { | ||
if (!jwt) { | ||
@@ -98,0 +98,0 @@ throw Error('No JWT was supplied'); |
@@ -215,3 +215,3 @@ import { CreateDPoPClientOpts } from '@sphereon/oid4vc-common'; | ||
alg?: Alg; | ||
signCallbacks?: ProofOfPossessionCallbacks<never>; | ||
signCallbacks?: ProofOfPossessionCallbacks; | ||
}; | ||
@@ -303,3 +303,3 @@ | ||
requestObjectMode?: CreateRequestObjectMode; | ||
signCallbacks?: ProofOfPossessionCallbacks<never>; | ||
signCallbacks?: ProofOfPossessionCallbacks; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -306,0 +306,0 @@ clientMetadata?: Record<string, any>; // TODO: Merge SIOP/OID4VP |
@@ -103,5 +103,5 @@ import { BaseJWK } from '@sphereon/oid4vc-common'; | ||
export interface ProofOfPossessionCallbacks<DIDDoc = never> { | ||
export interface ProofOfPossessionCallbacks { | ||
signCallback: JWTSignerCallback; | ||
verifyCallback?: JWTVerifyCallback<DIDDoc>; | ||
verifyCallback?: JWTVerifyCallback; | ||
} | ||
@@ -174,5 +174,5 @@ | ||
export type JWTSignerCallback = (jwt: Jwt, kid?: string) => Promise<string>; | ||
export type JWTVerifyCallback<DIDDoc = never> = (args: { jwt: string; kid?: string }) => Promise<JwtVerifyResult<DIDDoc>>; | ||
export type JWTVerifyCallback = (args: { jwt: string; kid?: string }) => Promise<JwtVerifyResult>; | ||
export interface JwtVerifyResult<DIDDoc = never> { | ||
export interface JwtVerifyResult { | ||
jwt: Jwt; | ||
@@ -182,5 +182,5 @@ kid?: string; | ||
did?: string; | ||
didDocument?: DIDDoc; | ||
didDocument?: Record<string, unknown>; | ||
x5c?: string[]; | ||
jwk?: BaseJWK; | ||
} |
@@ -0,1 +1,2 @@ | ||
export * from './OpenIDClient'; | ||
export * from './Authorization.types'; | ||
@@ -2,0 +3,0 @@ export * from './CredentialIssuance.types'; |
@@ -155,2 +155,3 @@ import { JWK } from '@sphereon/oid4vc-common'; | ||
scheme?: string; | ||
// auth_session?: string; Would be a nice extension to support, to allow external systems to determine what the auth_session value should be | ||
pinLength?: number; | ||
@@ -157,0 +158,0 @@ qrCodeOpts?: QRCodeOpts; |
{ | ||
"name": "@sphereon/oid4vci-common", | ||
"version": "0.16.1-feature.MWALL.715.280+dd6f740", | ||
"version": "0.16.1-feature.MWALL.715.281+c9b4d6f", | ||
"description": "OpenID 4 Verifiable Credential Issuance Common Types", | ||
@@ -13,3 +13,3 @@ "source": "lib/index.ts", | ||
"dependencies": { | ||
"@sphereon/oid4vc-common": "0.16.1-feature.MWALL.715.280+dd6f740", | ||
"@sphereon/oid4vc-common": "0.16.1-feature.MWALL.715.281+c9b4d6f", | ||
"@sphereon/ssi-types": "0.32.0", | ||
@@ -56,3 +56,3 @@ "cross-fetch": "^3.1.8", | ||
}, | ||
"gitHead": "dd6f7409c28cf15c37f63f6f07e3e9d689a73139" | ||
"gitHead": "c9b4d6f8df62a11d6235d75bee63deb352f66926" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
480302
166
7310