Comparing version 0.23.1 to 0.23.2
@@ -84,6 +84,6 @@ import { ECDSA, HMAC, RSASSAPKCS1v1_5, RSASSAPSS } from "../crypto/index.js"; | ||
} | ||
if (!("typ" in header) || !("alg" in header)) { | ||
if (!("alg" in header) || !isValidAlgorithm(header.alg)) { | ||
return null; | ||
} | ||
if (!isValidAlgorithm(header.alg) || header.typ !== "JWT") { | ||
if ("typ" in header && header.typ !== "JWT") { | ||
return null; | ||
@@ -90,0 +90,0 @@ } |
@@ -18,3 +18,3 @@ import { sha256 } from "../crypto/index.js"; | ||
async createAuthorizationURL(options) { | ||
const scope = options?.scope ?? []; | ||
const scope = Array.from(new Set(options?.scope ?? [])); // remove duplicates | ||
const authorizationUrl = new URL(this.authorizeEndpoint); | ||
@@ -21,0 +21,0 @@ authorizationUrl.searchParams.set("response_type", "code"); |
@@ -25,3 +25,3 @@ import { TimeSpan } from "../index.js"; | ||
export declare class SessionCookie { | ||
constructor(name: string, value: string, attributes: CookieAttributes); | ||
constructor(name: string, value: string, attributes?: CookieAttributes); | ||
name: string; | ||
@@ -28,0 +28,0 @@ value: string; |
@@ -58,3 +58,3 @@ import { createDate, isWithinExpirationDate, TimeSpan } from "../index.js"; | ||
this.value = value; | ||
this.attributes = attributes; | ||
this.attributes = attributes ?? {}; | ||
} | ||
@@ -61,0 +61,0 @@ name; |
{ | ||
"name": "oslo", | ||
"type": "module", | ||
"version": "0.23.1", | ||
"version": "0.23.2", | ||
"description": "A collection of auth-related utilities", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57480