universal-github-app-jwt
Advanced tools
Comparing version 1.1.2 to 1.2.0
import { Options, Result } from "./types"; | ||
export declare function githubAppJwt({ id, privateKey, now, }: Options): Promise<Result>; | ||
export declare function githubAppJwt<T extends number | string = number>({ id, privateKey, now, }: Options<T>): Promise<Result<T>>; |
export type PrivateKey = string; | ||
export type AppId = number; | ||
export type Expiration = number; | ||
export type Token = string; | ||
export type Options = { | ||
id: AppId; | ||
export type Options<IdType extends number | string = number> = { | ||
id: IdType; | ||
privateKey: PrivateKey; | ||
now?: number; | ||
}; | ||
export type Result = { | ||
appId: AppId; | ||
export type Result<IdType extends number | string = number> = { | ||
appId: IdType; | ||
expiration: Expiration; | ||
@@ -18,3 +17,3 @@ token: Token; | ||
exp: number; | ||
iss: number; | ||
iss: number | string; | ||
}; | ||
@@ -21,0 +20,0 @@ export type GetTokenOptions = { |
{ | ||
"name": "universal-github-app-jwt", | ||
"description": "Calculate GitHub App bearer tokens for Node & modern browsers", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -110,6 +110,6 @@ # universal-github-app-jwt | ||
<th> | ||
<code>number</code> | ||
<code>number | string</code> | ||
</th> | ||
<td> | ||
<strong>Required</strong>. Find <strong>App ID</strong> on the app’s about page in settings. | ||
<strong>Required</strong>. The GitHub App's ID or Client ID. For <code>github.com</code> and GHES 3.14+, it is recommended to use the Client ID. | ||
</td> | ||
@@ -167,3 +167,3 @@ </tr> | ||
<td> | ||
The GitHub App database ID passed in <code>options.id</code>. | ||
The GitHub App database ID or Client ID passed in <code>options.id</code>. | ||
</td> | ||
@@ -170,0 +170,0 @@ </tr> |
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
29825
241