Socket
Socket
Sign inDemoInstall

@octokit/oauth-methods

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/oauth-methods - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

dist-node/index.js

@@ -12,3 +12,3 @@ 'use strict';

const VERSION = "2.0.4";
const VERSION = "2.0.5";

@@ -15,0 +15,0 @@ function requestToOAuthBaseUrl(request) {

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

export const VERSION = "2.0.4";
export const VERSION = "2.0.5";
import { RequestInterface, Endpoints } from "@octokit/types";
import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types";
export declare type CheckTokenOAuthAppOptions = {
export type CheckTokenOAuthAppOptions = {
clientType: "oauth-app";

@@ -10,3 +10,3 @@ clientId: string;

};
export declare type CheckTokenGitHubAppOptions = {
export type CheckTokenGitHubAppOptions = {
clientType: "github-app";

@@ -18,6 +18,6 @@ clientId: string;

};
export declare type CheckTokenOAuthAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & {
export type CheckTokenOAuthAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & {
authentication: OAuthAppAuthentication;
};
export declare type CheckTokenGitHubAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & {
export type CheckTokenGitHubAppResponse = Endpoints["POST /applications/{client_id}/token"]["response"] & {
authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled;

@@ -24,0 +24,0 @@ };

import { OctokitResponse, RequestInterface } from "@octokit/types";
export declare type CreateDeviceCodeOAuthAppOptions = {
export type CreateDeviceCodeOAuthAppOptions = {
clientType: "oauth-app";

@@ -8,3 +8,3 @@ clientId: string;

};
export declare type CreateDeviceCodeGitHubAppOptions = {
export type CreateDeviceCodeGitHubAppOptions = {
clientType: "github-app";

@@ -14,3 +14,3 @@ clientId: string;

};
export declare type CreateDeviceCodeDeviceTokenResponse = OctokitResponse<{
export type CreateDeviceCodeDeviceTokenResponse = OctokitResponse<{
device_code: string;

@@ -17,0 +17,0 @@ user_code: string;

import { RequestInterface, Endpoints } from "@octokit/types";
export declare type DeleteAuthorizationOAuthAppOptions = {
export type DeleteAuthorizationOAuthAppOptions = {
clientType: "oauth-app";

@@ -9,3 +9,3 @@ clientId: string;

};
export declare type DeleteAuthorizationGitHubAppOptions = {
export type DeleteAuthorizationGitHubAppOptions = {
clientType: "github-app";

@@ -17,4 +17,4 @@ clientId: string;

};
export declare type DeleteAuthorizationResponse = Endpoints["DELETE /applications/{client_id}/grant"]["response"];
export type DeleteAuthorizationResponse = Endpoints["DELETE /applications/{client_id}/grant"]["response"];
export declare function deleteAuthorization(options: DeleteAuthorizationOAuthAppOptions): Promise<DeleteAuthorizationResponse>;
export declare function deleteAuthorization(options: DeleteAuthorizationGitHubAppOptions): Promise<DeleteAuthorizationResponse>;
import { RequestInterface, Endpoints } from "@octokit/types";
export declare type DeleteTokenOAuthAppOptions = {
export type DeleteTokenOAuthAppOptions = {
clientType: "oauth-app";

@@ -9,3 +9,3 @@ clientId: string;

};
export declare type DeleteTokenGitHubAppOptions = {
export type DeleteTokenGitHubAppOptions = {
clientType: "github-app";

@@ -17,4 +17,4 @@ clientId: string;

};
export declare type DeleteTokenResponse = Endpoints["DELETE /applications/{client_id}/token"]["response"];
export type DeleteTokenResponse = Endpoints["DELETE /applications/{client_id}/token"]["response"];
export declare function deleteToken(options: DeleteTokenOAuthAppOptions): Promise<DeleteTokenResponse>;
export declare function deleteToken(options: DeleteTokenGitHubAppOptions): Promise<DeleteTokenResponse>;
import { OctokitResponse, RequestInterface } from "@octokit/types";
import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types";
export declare type ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret = {
export type ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret = {
clientType: "oauth-app";

@@ -12,6 +12,6 @@ clientId: string;

};
export declare type ExchangeDeviceCodeOAuthAppOptions = ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret & {
export type ExchangeDeviceCodeOAuthAppOptions = ExchangeDeviceCodeOAuthAppOptionsWithoutClientSecret & {
clientSecret: string;
};
export declare type ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret = {
export type ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret = {
clientType: "github-app";

@@ -24,18 +24,18 @@ clientId: string;

};
export declare type ExchangeDeviceCodeGitHubAppOptions = ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret & {
export type ExchangeDeviceCodeGitHubAppOptions = ExchangeDeviceCodeGitHubAppOptionsWithoutClientSecret & {
clientSecret: string;
};
declare type OAuthAppAuthenticationWithoutClientSecret = Omit<OAuthAppAuthentication, "clientSecret">;
declare type GitHubAppAuthenticationWithoutClientSecret = Omit<GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled, "clientSecret">;
declare type GitHubAppAuthenticationWithExpirationWithoutClientSecret = Omit<GitHubAppAuthenticationWithRefreshToken, "clientSecret">;
export declare type ExchangeDeviceCodeOAuthAppResponse = OctokitResponse<OAuthAppCreateTokenResponseData> & {
type OAuthAppAuthenticationWithoutClientSecret = Omit<OAuthAppAuthentication, "clientSecret">;
type GitHubAppAuthenticationWithoutClientSecret = Omit<GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled, "clientSecret">;
type GitHubAppAuthenticationWithExpirationWithoutClientSecret = Omit<GitHubAppAuthenticationWithRefreshToken, "clientSecret">;
export type ExchangeDeviceCodeOAuthAppResponse = OctokitResponse<OAuthAppCreateTokenResponseData> & {
authentication: OAuthAppAuthentication;
};
export declare type ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret = OctokitResponse<OAuthAppCreateTokenResponseData> & {
export type ExchangeDeviceCodeOAuthAppResponseWithoutClientSecret = OctokitResponse<OAuthAppCreateTokenResponseData> & {
authentication: OAuthAppAuthenticationWithoutClientSecret;
};
export declare type ExchangeDeviceCodeGitHubAppResponse = OctokitResponse<GitHubAppCreateTokenResponseData | GitHubAppCreateTokenWithExpirationResponseData> & {
export type ExchangeDeviceCodeGitHubAppResponse = OctokitResponse<GitHubAppCreateTokenResponseData | GitHubAppCreateTokenWithExpirationResponseData> & {
authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken;
};
export declare type ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret = OctokitResponse<GitHubAppCreateTokenResponseData | GitHubAppCreateTokenWithExpirationResponseData> & {
export type ExchangeDeviceCodeGitHubAppResponseWithoutClientSecret = OctokitResponse<GitHubAppCreateTokenResponseData | GitHubAppCreateTokenWithExpirationResponseData> & {
authentication: GitHubAppAuthenticationWithoutClientSecret | GitHubAppAuthenticationWithExpirationWithoutClientSecret;

@@ -42,0 +42,0 @@ };

import { OctokitResponse, RequestInterface } from "@octokit/types";
import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled, GitHubAppAuthenticationWithRefreshToken, OAuthAppCreateTokenResponseData, GitHubAppCreateTokenResponseData, GitHubAppCreateTokenWithExpirationResponseData } from "./types";
export declare type ExchangeWebFlowCodeOAuthAppOptions = {
export type ExchangeWebFlowCodeOAuthAppOptions = {
clientType: "oauth-app";

@@ -11,3 +11,3 @@ clientId: string;

};
export declare type ExchangeWebFlowCodeGitHubAppOptions = {
export type ExchangeWebFlowCodeGitHubAppOptions = {
clientType: "github-app";

@@ -20,6 +20,6 @@ clientId: string;

};
export declare type ExchangeWebFlowCodeOAuthAppResponse = OctokitResponse<OAuthAppCreateTokenResponseData> & {
export type ExchangeWebFlowCodeOAuthAppResponse = OctokitResponse<OAuthAppCreateTokenResponseData> & {
authentication: OAuthAppAuthentication;
};
export declare type ExchangeWebFlowCodeGitHubAppResponse = OctokitResponse<GitHubAppCreateTokenResponseData | GitHubAppCreateTokenWithExpirationResponseData> & {
export type ExchangeWebFlowCodeGitHubAppResponse = OctokitResponse<GitHubAppCreateTokenResponseData | GitHubAppCreateTokenWithExpirationResponseData> & {
authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled | GitHubAppAuthenticationWithRefreshToken;

@@ -26,0 +26,0 @@ };

import { OAuthAppResult, GitHubAppResult } from "@octokit/oauth-authorization-url";
import { RequestInterface } from "@octokit/types";
export declare type GetWebFlowAuthorizationUrlOAuthAppOptions = {
export type GetWebFlowAuthorizationUrlOAuthAppOptions = {
clientType: "oauth-app";

@@ -13,3 +13,3 @@ clientId: string;

};
export declare type GetWebFlowAuthorizationUrlGitHubAppOptions = {
export type GetWebFlowAuthorizationUrlGitHubAppOptions = {
clientType: "github-app";

@@ -23,5 +23,5 @@ clientId: string;

};
export declare type GetWebFlowAuthorizationUrlOAuthAppResult = OAuthAppResult;
export declare type GetWebFlowAuthorizationUrlGitHubAppResult = GitHubAppResult;
export type GetWebFlowAuthorizationUrlOAuthAppResult = OAuthAppResult;
export type GetWebFlowAuthorizationUrlGitHubAppResult = GitHubAppResult;
export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlOAuthAppOptions): OAuthAppResult;
export declare function getWebFlowAuthorizationUrl(options: GetWebFlowAuthorizationUrlGitHubAppOptions): GitHubAppResult;
import { OctokitResponse, RequestInterface } from "@octokit/types";
import { GitHubAppAuthenticationWithRefreshToken, GitHubAppCreateTokenWithExpirationResponseData } from "./types";
export declare type RefreshTokenOptions = {
export type RefreshTokenOptions = {
clientType: "github-app";

@@ -10,5 +10,5 @@ clientId: string;

};
export declare type RefreshTokenResponse = OctokitResponse<GitHubAppCreateTokenWithExpirationResponseData> & {
export type RefreshTokenResponse = OctokitResponse<GitHubAppCreateTokenWithExpirationResponseData> & {
authentication: GitHubAppAuthenticationWithRefreshToken;
};
export declare function refreshToken(options: RefreshTokenOptions): Promise<RefreshTokenResponse>;
import { RequestInterface, Endpoints } from "@octokit/types";
import { OAuthAppAuthentication, GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types";
export declare type ResetTokenOAuthAppOptions = {
export type ResetTokenOAuthAppOptions = {
clientType: "oauth-app";

@@ -10,3 +10,3 @@ clientId: string;

};
export declare type ResetTokenGitHubAppOptions = {
export type ResetTokenGitHubAppOptions = {
clientType: "github-app";

@@ -18,6 +18,6 @@ clientId: string;

};
export declare type ResetTokenOAuthAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & {
export type ResetTokenOAuthAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & {
authentication: OAuthAppAuthentication;
};
export declare type ResetTokenGitHubAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & {
export type ResetTokenGitHubAppResponse = Endpoints["PATCH /applications/{client_id}/token"]["response"] & {
authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled;

@@ -24,0 +24,0 @@ };

import { RequestInterface, Endpoints } from "@octokit/types";
import { GitHubAppAuthenticationWithExpirationEnabled, GitHubAppAuthenticationWithExpirationDisabled } from "./types";
declare type CommonOptions = {
type CommonOptions = {
clientType: "github-app";

@@ -11,17 +11,17 @@ clientId: string;

};
declare type TargetOption = {
type TargetOption = {
target: string;
};
declare type TargetIdOption = {
type TargetIdOption = {
target_id: number;
};
declare type RepositoriesOption = {
type RepositoriesOption = {
repositories?: string[];
};
declare type RepositoryIdsOption = {
type RepositoryIdsOption = {
repository_ids?: number[];
};
declare type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"];
export declare type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption);
export declare type ScopeTokenResponse = Endpoint["response"] & {
type Endpoint = Endpoints["POST /applications/{client_id}/token/scoped"];
export type ScopeTokenOptions = (CommonOptions & TargetOption & RepositoriesOption) | (CommonOptions & TargetIdOption & RepositoriesOption) | (CommonOptions & TargetOption & RepositoryIdsOption) | (CommonOptions & TargetIdOption & RepositoryIdsOption);
export type ScopeTokenResponse = Endpoint["response"] & {
authentication: GitHubAppAuthenticationWithExpirationEnabled | GitHubAppAuthenticationWithExpirationDisabled;

@@ -28,0 +28,0 @@ };

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

export declare type OAuthAppAuthentication = {
export type OAuthAppAuthentication = {
clientType: "oauth-app";

@@ -8,3 +8,3 @@ clientId: string;

};
export declare type GitHubAppAuthenticationWithExpirationDisabled = {
export type GitHubAppAuthenticationWithExpirationDisabled = {
clientType: "github-app";

@@ -15,6 +15,6 @@ clientId: string;

};
export declare type GitHubAppAuthenticationWithExpirationEnabled = GitHubAppAuthenticationWithExpirationDisabled & {
export type GitHubAppAuthenticationWithExpirationEnabled = GitHubAppAuthenticationWithExpirationDisabled & {
expiresAt: string;
};
export declare type GitHubAppAuthenticationWithRefreshToken = GitHubAppAuthenticationWithExpirationEnabled & {
export type GitHubAppAuthenticationWithRefreshToken = GitHubAppAuthenticationWithExpirationEnabled & {
refreshToken: string;

@@ -27,3 +27,3 @@ refreshTokenExpiresAt: string;

*/
export declare type GitHubAppAuthentication = {
export type GitHubAppAuthentication = {
clientType: "github-app";

@@ -37,3 +37,3 @@ clientId: string;

*/
export declare type GitHubAppAuthenticationWithExpiration = {
export type GitHubAppAuthenticationWithExpiration = {
clientType: "github-app";

@@ -47,3 +47,3 @@ clientId: string;

};
export declare type OAuthAppCreateTokenResponseData = {
export type OAuthAppCreateTokenResponseData = {
access_token: string;

@@ -53,7 +53,7 @@ scope: string;

};
export declare type GitHubAppCreateTokenResponseData = {
export type GitHubAppCreateTokenResponseData = {
access_token: string;
token_type: "bearer";
};
export declare type GitHubAppCreateTokenWithExpirationResponseData = {
export type GitHubAppCreateTokenWithExpirationResponseData = {
access_token: string;

@@ -60,0 +60,0 @@ token_type: "bearer";

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

export declare const VERSION = "2.0.4";
export declare const VERSION = "2.0.5";
{
"name": "@octokit/oauth-methods",
"description": "Set of stateless request methods to create, check, reset, refresh, and delete user access tokens for OAuth and GitHub Apps",
"version": "2.0.4",
"version": "2.0.5",
"license": "MIT",

@@ -22,5 +22,5 @@ "files": [

"@octokit/oauth-authorization-url": "^5.0.0",
"@octokit/request": "^6.0.0",
"@octokit/request-error": "^3.0.0",
"@octokit/types": "^8.0.0",
"@octokit/request": "^6.2.3",
"@octokit/request-error": "^3.0.3",
"@octokit/types": "^9.0.0",
"btoa-lite": "^1.0.0"

@@ -36,7 +36,7 @@ },

"@types/jest": "^29.0.0",
"@types/node": "^16.0.0",
"@types/node": "^18.0.0",
"fetch-mock": "^9.11.0",
"jest": "^29.0.0",
"prettier": "2.7.1",
"semantic-release": "^19.0.0",
"prettier": "2.8.3",
"semantic-release": "^20.0.0",
"semantic-release-plugin-update-version-in-files": "^1.1.0",

@@ -43,0 +43,0 @@ "ts-jest": "^29.0.0",

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