Send feedback
Class JWTAccess (7.4.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 7.4.1 keyboard_arrow_down
Package
google-auth-library!
Constructors
(constructor)(email, key, keyId, eagerRefreshThresholdMillis)
constructor ( email ? : string | null , key ? : string | null , keyId ? : string | null , eagerRefreshThresholdMillis ? : number );
JWTAccess service account credentials.
Create a new access token by using the credential to create a new JWT token that's recognized as the access token.
Parameters
Name Description email
string | null
the service account email address.
key
string | null
the private key that will be used to sign the token.
keyId
string | null
the ID of the private key used to sign the token.
eagerRefreshThresholdMillis
number
Properties
eagerRefreshThresholdMillis
eagerRefreshThresholdMillis : number ;
Property Value
email
Property Value
Type Description string | null
key
Property Value
Type Description string | null
keyId
Property Value
Type Description string | null
projectId
Property Value
Methods
fromJSON(json)
fromJSON ( json : JWTInput ): void ;
Create a JWTAccess credentials instance using the given input options.
Parameter
Name Description json
JWTInput
The input object.
Returns
fromStream(inputStream)
fromStream ( inputStream : stream . Readable ): Promise<void> ;
Create a JWTAccess credentials instance using the given input stream.
Parameter
Name Description inputStream
stream.Readable
The input stream.
Returns
Type Description Promise <void>
fromStream(inputStream, callback)
fromStream ( inputStream : stream . Readable , callback : ( err ?: Error ) = > void ): void ;
Parameters
Name Description inputStream
stream.Readable
callback
(err?: Error ) => void
Returns
getRequestHeaders ( url : string , additionalClaims ?: Claims ): Headers ;
Get a non-expired access token, after refreshing if necessary.
Parameters
Name Description url
string
The URI being authorized.
additionalClaims
Claims
An object with a set of additional claims to include in the payload.
Returns
Type Description Headers An object that includes the authorization header.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-10 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-10 UTC."],[],[]]