few more things
This commit is contained in:
@@ -49,7 +49,9 @@ export class ReactNativeKey extends Key {
|
||||
|
||||
// We don't need to validate this, because the native types ensure it is correct. But this is a TODO
|
||||
// for the same reason above
|
||||
const protectedHeader = result.protectedHeader
|
||||
const protectedHeader = Object.fromEntries(
|
||||
Object.entries(result.protectedHeader).filter(([_, v]) => v !== null),
|
||||
)
|
||||
|
||||
if (options?.audience != null) {
|
||||
const audience = Array.isArray(options.audience)
|
||||
|
||||
@@ -14,13 +14,10 @@ type Item = {
|
||||
|
||||
type EncodedKey = {
|
||||
keyId: string
|
||||
keyPair: CryptoKeyPair
|
||||
keyPair: CryptoKey
|
||||
}
|
||||
|
||||
function encodeKey(key: Key): EncodedKey {
|
||||
if (!(key instanceof WebcryptoKey) || !key.kid) {
|
||||
throw new Error('Invalid key object')
|
||||
}
|
||||
return {
|
||||
keyId: key.kid,
|
||||
keyPair: key.cryptoKeyPair,
|
||||
@@ -42,7 +39,6 @@ export type Schema = {
|
||||
}>
|
||||
session: Item<{
|
||||
dpopKey: EncodedKey
|
||||
|
||||
tokenSet: TokenSet
|
||||
}>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user