/opt/canhelp/node_modules/google-auth-library/build/src/auth
NameSizeModeActions
authclient.d.ts107640644editdlrm
authclient.js112470644editdlrm
awsclient.d.ts53150644editdlrm
awsclient.js75560644editdlrm
awsrequestsigner.d.ts16260644editdlrm
awsrequestsigner.js94420644editdlrm
baseexternalclient.d.ts130200644editdlrm
baseexternalclient.js208570644editdlrm
certificatesubjecttokensupplier.d.ts22020644editdlrm
certificatesubjecttokensupplier.js106190644editdlrm
computeclient.d.ts13590644editdlrm
computeclient.js44970644editdlrm
credentials.d.ts23590644editdlrm
credentials.js7040644editdlrm
defaultawssecuritycredentialssupplier.d.ts37950644editdlrm
defaultawssecuritycredentialssupplier.js93300644editdlrm
downscopedclient.d.ts66930644editdlrm
downscopedclient.js123530644editdlrm
envDetect.d.ts3630644editdlrm
envDetect.js28310644editdlrm
executable-response.d.ts44890644editdlrm
executable-response.js75190644editdlrm
externalAccountAuthorizedUserClient.d.ts31730644editdlrm
externalAccountAuthorizedUserClient.js100050644editdlrm
externalclient.d.ts15280644editdlrm
externalclient.js30480644editdlrm
filesubjecttokensupplier.d.ts16080644editdlrm
filesubjecttokensupplier.js35150644editdlrm
googleauth.d.ts235740644editdlrm
googleauth.js363740644editdlrm
iam.d.ts6230644editdlrm
iam.js13730644editdlrm
identitypoolclient.d.ts56260644editdlrm
identitypoolclient.js67750644editdlrm
idtokenclient.d.ts9380644editdlrm
idtokenclient.js21060644editdlrm
impersonated.d.ts56870644editdlrm
impersonated.js86540644editdlrm
jwtaccess.d.ts23360644editdlrm
jwtaccess.js72130644editdlrm
jwtclient.d.ts51220644editdlrm
jwtclient.js112560644editdlrm
loginticket.d.ts53670644editdlrm
loginticket.js17950644editdlrm
oauth2client.d.ts253260644editdlrm
oauth2client.js336620644editdlrm
oauth2common.d.ts40940644editdlrm
oauth2common.js80800644editdlrm
passthrough.d.ts10970644editdlrm
passthrough.js18420644editdlrm
pluggable-auth-client.d.ts54850644editdlrm
pluggable-auth-client.js100020644editdlrm
pluggable-auth-handler.d.ts21090644editdlrm
pluggable-auth-handler.js72600644editdlrm
refreshclient.d.ts34360644editdlrm
refreshclient.js66500644editdlrm
stscredentials.d.ts52610644editdlrm
stscredentials.js47380644editdlrm
urlsubjecttokensupplier.d.ts21860644editdlrm
urlsubjecttokensupplier.js28590644editdlrm
Edit: /opt/canhelp/node_modules/google-auth-library/build/src/auth/downscopedclient.d.ts (6693B)
import { GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios'; import { Credentials } from './credentials'; import { AuthClient, AuthClientOptions, GetAccessTokenResponse, BodyResponseCallback } from './authclient'; /** * The maximum number of access boundary rules a Credential Access Boundary * can contain. */ export declare const MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; /** * Offset to take into account network delays and server clock skews. */ export declare const EXPIRATION_TIME_OFFSET: number; /** * Internal interface for tracking the access token expiration time. */ interface CredentialsWithResponse extends Credentials { res?: GaxiosResponse | null; } /** * Internal interface for tracking and returning the Downscoped access token * expiration time in epoch time (seconds). */ interface DownscopedAccessTokenResponse extends GetAccessTokenResponse { expirationTime?: number | null; } /** * Defines an upper bound of permissions available for a GCP credential. */ export interface CredentialAccessBoundary { accessBoundary: { accessBoundaryRules: AccessBoundaryRule[]; }; } /** Defines an upper bound of permissions on a particular resource. */ interface AccessBoundaryRule { availablePermissions: string[]; availableResource: string; availabilityCondition?: AvailabilityCondition; } /** * An optional condition that can be used as part of a * CredentialAccessBoundary to further restrict permissions. */ interface AvailabilityCondition { expression: string; title?: string; description?: string; } export interface DownscopedClientOptions extends AuthClientOptions { /** * The source AuthClient to be downscoped based on the provided Credential Access Boundary rules. */ authClient: AuthClient; /** * The Credential Access Boundary which contains a list of access boundary rules. * Each rule contains information on the resource that the rule applies to, the upper bound of the * permissions that are available on that resource and an optional * condition to further restrict permissions. */ credentialAccessBoundary: CredentialAccessBoundary; } /** * Defines a set of Google credentials that are downscoped from an existing set * of Google OAuth2 credentials. This is useful to restrict the Identity and * Access Management (IAM) permissions that a short-lived credential can use. * The common pattern of usage is to have a token broker with elevated access * generate these downscoped credentials from higher access source credentials * and pass the downscoped short-lived access tokens to a token consumer via * some secure authenticated channel for limited access to Google Cloud Storage * resources. */ export declare class DownscopedClient extends AuthClient { private readonly authClient; private readonly credentialAccessBoundary; private cachedDownscopedAccessToken; private readonly stsCredential; /** * Instantiates a downscoped client object using the provided source * AuthClient and credential access boundary rules. * To downscope permissions of a source AuthClient, a Credential Access * Boundary that specifies which resources the new credential can access, as * well as an upper bound on the permissions that are available on each * resource, has to be defined. A downscoped client can then be instantiated * using the source AuthClient and the Credential Access Boundary. * @param options the {@link DownscopedClientOptions `DownscopedClientOptions`} to use. Passing an `AuthClient` directly is **@DEPRECATED**. * @param credentialAccessBoundary **@DEPRECATED**. Provide a {@link DownscopedClientOptions `DownscopedClientOptions`} object in the first parameter instead. */ constructor( /** * AuthClient is for backwards-compatibility. */ options: AuthClient | DownscopedClientOptions, /** * @deprecated - provide a {@link DownscopedClientOptions `DownscopedClientOptions`} object in the first parameter instead */ credentialAccessBoundary?: CredentialAccessBoundary); /** * Provides a mechanism to inject Downscoped access tokens directly. * The expiry_date field is required to facilitate determination of the token * expiration which would make it easier for the token consumer to handle. * @param credentials The Credentials object to set on the current client. */ setCredentials(credentials: Credentials): void; getAccessToken(): Promise; /** * The main authentication interface. It takes an optional url which when * present is the endpoint being accessed, and returns a Promise which * resolves with authorization header fields. * * The result has the form: * { authorization: 'Bearer ' } */ getRequestHeaders(): Promise; /** * Provides a request implementation with OAuth 2.0 flow. In cases of * HTTP 401 and 403 responses, it automatically asks for a new access token * and replays the unsuccessful request. * @param opts Request options. * @param callback callback. * @return A promise that resolves with the HTTP response when no callback * is provided. */ request(opts: GaxiosOptions): GaxiosPromise; request(opts: GaxiosOptions, callback: BodyResponseCallback): void; /** * Authenticates the provided HTTP request, processes it and resolves with the * returned response. * @param opts The HTTP request options. * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure * @return A promise that resolves with the successful response. */ protected requestAsync(opts: GaxiosOptions, reAuthRetried?: boolean): Promise>; /** * Forces token refresh, even if unexpired tokens are currently cached. * GCP access tokens are retrieved from authclient object/source credential. * Then GCP access tokens are exchanged for downscoped access tokens via the * token exchange endpoint. * @return A promise that resolves with the fresh downscoped access token. */ protected refreshAccessTokenAsync(): Promise; /** * Returns whether the provided credentials are expired or not. * If there is no expiry time, assumes the token is not expired or expiring. * @param downscopedAccessToken The credentials to check for expiration. * @return Whether the credentials are expired or not. */ private isExpired; } export {};