oauth4webapi
Advanced tools
Comparing version 2.2.4 to 2.3.0
@@ -616,3 +616,3 @@ type JsonObject = { | ||
*/ | ||
export declare function issueRequestObject(as: AuthorizationServer, client: Client, parameters: URLSearchParams, privateKey: CryptoKey | PrivateKey): Promise<string>; | ||
export declare function issueRequestObject(as: AuthorizationServer, client: Client, parameters: URLSearchParams | Record<string, string> | string[][], privateKey: CryptoKey | PrivateKey): Promise<string>; | ||
/** | ||
@@ -629,3 +629,3 @@ * Performs a Pushed Authorization Request at the | ||
*/ | ||
export declare function pushedAuthorizationRequest(as: AuthorizationServer, client: Client, parameters: URLSearchParams, options?: PushedAuthorizationRequestOptions): Promise<Response>; | ||
export declare function pushedAuthorizationRequest(as: AuthorizationServer, client: Client, parameters: URLSearchParams | Record<string, string> | string[][], options?: PushedAuthorizationRequestOptions): Promise<Response>; | ||
export interface PushedAuthorizationResponse { | ||
@@ -784,3 +784,3 @@ readonly request_uri: string; | ||
/** Any additional parameters to send. This cannot override existing parameter values. */ | ||
additionalParameters?: URLSearchParams; | ||
additionalParameters?: URLSearchParams | Record<string, string> | string[][]; | ||
} | ||
@@ -966,3 +966,3 @@ /** | ||
*/ | ||
export declare function clientCredentialsGrantRequest(as: AuthorizationServer, client: Client, parameters: URLSearchParams, options?: ClientCredentialsGrantRequestOptions): Promise<Response>; | ||
export declare function clientCredentialsGrantRequest(as: AuthorizationServer, client: Client, parameters: URLSearchParams | Record<string, string> | string[][], options?: ClientCredentialsGrantRequestOptions): Promise<Response>; | ||
/** | ||
@@ -984,3 +984,3 @@ * Validates Client Credentials Grant Response instance to be one coming from the | ||
/** Any additional parameters to send. This cannot override existing parameter values. */ | ||
additionalParameters?: URLSearchParams; | ||
additionalParameters?: URLSearchParams | Record<string, string> | string[][]; | ||
} | ||
@@ -1011,3 +1011,3 @@ /** | ||
/** Any additional parameters to send. This cannot override existing parameter values. */ | ||
additionalParameters?: URLSearchParams; | ||
additionalParameters?: URLSearchParams | Record<string, string> | string[][]; | ||
/** | ||
@@ -1132,3 +1132,3 @@ * Request a JWT Response from the | ||
*/ | ||
export declare function deviceAuthorizationRequest(as: AuthorizationServer, client: Client, parameters: URLSearchParams, options?: DeviceAuthorizationRequestOptions): Promise<Response>; | ||
export declare function deviceAuthorizationRequest(as: AuthorizationServer, client: Client, parameters: URLSearchParams | Record<string, string> | string[][], options?: DeviceAuthorizationRequestOptions): Promise<Response>; | ||
export interface DeviceAuthorizationResponse { | ||
@@ -1135,0 +1135,0 @@ readonly device_code: string; |
let USER_AGENT; | ||
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) { | ||
const NAME = 'oauth4webapi'; | ||
const VERSION = 'v2.2.4'; | ||
const VERSION = 'v2.3.0'; | ||
USER_AGENT = `${NAME}/${VERSION}`; | ||
@@ -446,5 +446,2 @@ } | ||
assertClient(client); | ||
if (!(parameters instanceof URLSearchParams)) { | ||
throw new TypeError('"parameters" must be an instance of URLSearchParams'); | ||
} | ||
parameters = new URLSearchParams(parameters); | ||
@@ -538,5 +535,2 @@ const { key, kid } = getKeyAndKid(privateKey); | ||
assertClient(client); | ||
if (!(parameters instanceof URLSearchParams)) { | ||
throw new TypeError('"parameters" must be an instance of URLSearchParams'); | ||
} | ||
if (typeof as.pushed_authorization_request_endpoint !== 'string') { | ||
@@ -1531,5 +1525,2 @@ throw new TypeError('"as.pushed_authorization_request_endpoint" must be a string'); | ||
assertClient(client); | ||
if (!(parameters instanceof URLSearchParams)) { | ||
throw new TypeError('"parameters" must be an instance of URLSearchParams'); | ||
} | ||
if (typeof as.device_authorization_endpoint !== 'string') { | ||
@@ -1536,0 +1527,0 @@ throw new TypeError('"as.device_authorization_endpoint" must be a string'); |
{ | ||
"name": "oauth4webapi", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"description": "OAuth 2 / OpenID Connect for Web Platform API JavaScript runtimes", | ||
@@ -66,3 +66,3 @@ "keywords": [ | ||
"@esbuild-kit/esm-loader": "^2.5.5", | ||
"@types/node": "^18.16.0", | ||
"@types/node": "^18.16.1", | ||
"@types/qunit": "^2.19.4", | ||
@@ -73,3 +73,3 @@ "ava": "^5.2.0", | ||
"jose": "^4.14.1", | ||
"patch-package": "^6.5.1", | ||
"patch-package": "^7.0.0", | ||
"prettier": "^2.8.8", | ||
@@ -76,0 +76,0 @@ "prettier-plugin-jsdoc": "^0.4.2", |
@@ -42,3 +42,3 @@ # OAuth 2 / OpenID Connect for Web Platform API JavaScript runtimes | ||
```js | ||
import * as oauth2 from 'https://deno.land/x/oauth4webapi@v2.2.4/mod.ts' | ||
import * as oauth2 from 'https://deno.land/x/oauth4webapi@v2.3.0/mod.ts' | ||
``` | ||
@@ -45,0 +45,0 @@ |
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
124027
2794