Socket
Socket
Sign inDemoInstall

@octokit/auth-oauth-app

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/auth-oauth-app - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

21

dist-node/index.js

@@ -69,9 +69,18 @@ 'use strict';

* exception of these three endpoints, which require the client ID/secret to be sent as basic auth
* - [`GET /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) - Check an authorization
* - [`POST /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) - Reset an authorization
* - [`DELETE /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
*
* - [`POST /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token
* - [`PATCH /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token
* - [`DELETE /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token
* - [`DELETE /applications/:client_id/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization
*
* deprecated:
*
* - [`GET /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization
* - [`POST /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization
* - [`DELETE /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
* - [`DELETE /applications/:client_id/grants/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application
*/
const OAUTH_ROUTES_EXCEPTIONS_REGEX = /\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/;
const OAUTH_ROUTES_EXCEPTIONS = /\/applications\/:?[\w_]+\/(token|grant)(s\/:?[\w_]+)?($|\?)/;
function requiresBasicAuth(url) {
return url && OAUTH_ROUTES_EXCEPTIONS_REGEX.test(url);
return url && OAUTH_ROUTES_EXCEPTIONS.test(url);
}

@@ -151,3 +160,3 @@

const VERSION = "2.3.1";
const VERSION = "2.3.2";

@@ -154,0 +163,0 @@ function createOAuthAppAuth(options) {

/**
* An OAuth app authenticates using ?client_id=...&client_secret=... query parameters, with the
* exception of these three endpoints, which require the client ID/secret to be sent as basic auth
* - [`GET /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) - Check an authorization
* - [`POST /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) - Reset an authorization
* - [`DELETE /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
*
* - [`POST /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token
* - [`PATCH /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token
* - [`DELETE /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token
* - [`DELETE /applications/:client_id/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization
*
* deprecated:
*
* - [`GET /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization
* - [`POST /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization
* - [`DELETE /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
* - [`DELETE /applications/:client_id/grants/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application
*/
const OAUTH_ROUTES_EXCEPTIONS_REGEX = /\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/;
const OAUTH_ROUTES_EXCEPTIONS = /\/applications\/:?[\w_]+\/(token|grant)(s\/:?[\w_]+)?($|\?)/;
export function requiresBasicAuth(url) {
return url && OAUTH_ROUTES_EXCEPTIONS_REGEX.test(url);
return url && OAUTH_ROUTES_EXCEPTIONS.test(url);
}

@@ -1,1 +0,1 @@

export const VERSION = "2.3.1";
export const VERSION = "2.3.2";

@@ -1,1 +0,1 @@

export declare const VERSION = "2.3.1";
export declare const VERSION = "2.3.2";

@@ -55,9 +55,18 @@ import { getUserAgent } from 'universal-user-agent';

* exception of these three endpoints, which require the client ID/secret to be sent as basic auth
* - [`GET /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization) - Check an authorization
* - [`POST /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization) - Reset an authorization
* - [`DELETE /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
*
* - [`POST /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#check-a-token) - Check a token
* - [`PATCH /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Reset a token
* - [`DELETE /applications/:client_id/token`](https://developer.github.com/v3/apps/oauth_applications/#reset-a-token) - Delete an app token
* - [`DELETE /applications/:client_id/grant`](https://developer.github.com/v3/apps/oauth_applications/#delete-an-app-authorization) - Delete an app authorization
*
* deprecated:
*
* - [`GET /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization) - Check an authorization
* - [`POST /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization) - Reset an authorization
* - [`DELETE /applications/:client_id/tokens/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application) - Revoke an authorization for an application
* - [`DELETE /applications/:client_id/grants/:access_token`](https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application) - Revoke a grant for an application
*/
const OAUTH_ROUTES_EXCEPTIONS_REGEX = /\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/;
const OAUTH_ROUTES_EXCEPTIONS = /\/applications\/:?[\w_]+\/(token|grant)(s\/:?[\w_]+)?($|\?)/;
function requiresBasicAuth(url) {
return url && OAUTH_ROUTES_EXCEPTIONS_REGEX.test(url);
return url && OAUTH_ROUTES_EXCEPTIONS.test(url);
}

@@ -132,3 +141,3 @@

const VERSION = "2.3.1";
const VERSION = "2.3.2";

@@ -135,0 +144,0 @@ function createOAuthAppAuth(options) {

{
"name": "@octokit/auth-oauth-app",
"description": "GitHub OAuth App authentication for JavaScript",
"version": "2.3.1",
"version": "2.3.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc