@octokit/auth-oauth-user
Advanced tools
Comparing version
@@ -98,3 +98,3 @@ 'use strict'; | ||
const VERSION = "1.2.2"; | ||
const VERSION = "1.2.3"; | ||
@@ -250,15 +250,16 @@ async function getAuthentication(state) { | ||
* | ||
* - [`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 | ||
* - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token | ||
* - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token | ||
* - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token | ||
* - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token | ||
* - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#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 | ||
* - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization | ||
* - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization | ||
* - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application | ||
* - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application | ||
*/ | ||
const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[:{]?[\w_]+\}?\/(token|grant)(s\/[:{]?[\w_]+\}?)?($|\?)/; | ||
const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; | ||
function requiresBasicAuth(url) { | ||
@@ -265,0 +266,0 @@ return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); |
/** | ||
* The following endpoints require an OAuth App to authenticate using its client_id and client_secret. | ||
* | ||
* - [`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 | ||
* - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token | ||
* - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token | ||
* - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token | ||
* - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token | ||
* - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#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 | ||
* - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization | ||
* - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization | ||
* - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application | ||
* - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application | ||
*/ | ||
const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[:{]?[\w_]+\}?\/(token|grant)(s\/[:{]?[\w_]+\}?)?($|\?)/; | ||
const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; | ||
export function requiresBasicAuth(url) { | ||
return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); | ||
} |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "1.2.2"; | ||
export const VERSION = "1.2.3"; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "1.2.2"; | ||
export declare const VERSION = "1.2.3"; |
@@ -7,3 +7,3 @@ import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "1.2.2"; | ||
const VERSION = "1.2.3"; | ||
@@ -153,15 +153,16 @@ // @ts-nocheck there is only place for one of us in this file. And it's not you, TS | ||
* | ||
* - [`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 | ||
* - [`POST /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#check-a-token) - Check a token | ||
* - [`PATCH /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#reset-a-token) - Reset a token | ||
* - [`POST /applications/{client_id}/token/scoped`](https://docs.github.com/en/rest/reference/apps#create-a-scoped-access-token) - Create a scoped access token | ||
* - [`DELETE /applications/{client_id}/token`](https://docs.github.com/en/rest/reference/apps#delete-an-app-token) - Delete an app token | ||
* - [`DELETE /applications/{client_id}/grant`](https://docs.github.com/en/rest/reference/apps#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 | ||
* - [`GET /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#check-an-authorization) - Check an authorization | ||
* - [`POST /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#reset-an-authorization) - Reset an authorization | ||
* - [`DELETE /applications/{client_id}/tokens/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-an-authorization-for-an-application) - Revoke an authorization for an application | ||
* - [`DELETE /applications/{client_id}/grants/{access_token}`](https://docs.github.com/en/rest/reference/apps#revoke-a-grant-for-an-application) - Revoke a grant for an application | ||
*/ | ||
const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[:{]?[\w_]+\}?\/(token|grant)(s\/[:{]?[\w_]+\}?)?($|\?)/; | ||
const ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; | ||
function requiresBasicAuth(url) { | ||
@@ -168,0 +169,0 @@ return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); |
{ | ||
"name": "@octokit/auth-oauth-user", | ||
"description": "Octokit authentication strategy for OAuth clients", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"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
95339
0.29%817
0.37%