Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions types/defines/oidc-token.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* An `oidc_token` binding: issues OpenID Connect tokens for the Worker's own
* identity, to exchange for cloud credentials or send to an API as a bearer
Comment thread
edevil marked this conversation as resolved.
Resolved
* token. Each binding has one audience, set in its config.
*/
interface OidcTokenBinding {
/**
* Returns a newly signed JWT for the configured audience, valid for 5
* minutes. Each call gets a new `jti`. Call it when you need a token; don't
Comment thread
edevil marked this conversation as resolved.
Resolved
* store the token across requests.
*/
getToken(): Promise<string>;
}
13 changes: 13 additions & 0 deletions types/generated-snapshot/experimental/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16215,6 +16215,19 @@ declare module "cloudflare:node" {
ctx?: ExecutionContext,
): Promise<void>;
}
/**
* An `oidc_token` binding: issues OpenID Connect tokens for the Worker's own
* identity, to exchange for cloud credentials or send to an API as a bearer
* token. Each binding has one audience, set in its config.
*/
interface OidcTokenBinding {
/**
* Returns a newly signed JWT for the configured audience, valid for 5
* minutes. Each call gets a new `jti`. Call it when you need a token; don't
* store the token across requests.
*/
getToken(): Promise<string>;
}
type Params<P extends string = any> = Record<P, string | string[]>;
type EventContext<Env, P extends string, Data> = {
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
Expand Down
13 changes: 13 additions & 0 deletions types/generated-snapshot/experimental/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16163,6 +16163,19 @@ export declare class MessageChannel {
export interface MessagePortPostMessageOptions {
transfer?: any[];
}
/**
* An `oidc_token` binding: issues OpenID Connect tokens for the Worker's own
* identity, to exchange for cloud credentials or send to an API as a bearer
* token. Each binding has one audience, set in its config.
*/
export interface OidcTokenBinding {
/**
* Returns a newly signed JWT for the configured audience, valid for 5
* minutes. Each call gets a new `jti`. Call it when you need a token; don't
* store the token across requests.
*/
getToken(): Promise<string>;
}
export type Params<P extends string = any> = Record<P, string | string[]>;
export type EventContext<Env, P extends string, Data> = {
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
Expand Down
13 changes: 13 additions & 0 deletions types/generated-snapshot/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15847,6 +15847,19 @@ declare module "cloudflare:node" {
ctx?: ExecutionContext,
): Promise<void>;
}
/**
* An `oidc_token` binding: issues OpenID Connect tokens for the Worker's own
* identity, to exchange for cloud credentials or send to an API as a bearer
* token. Each binding has one audience, set in its config.
*/
interface OidcTokenBinding {
/**
* Returns a newly signed JWT for the configured audience, valid for 5
* minutes. Each call gets a new `jti`. Call it when you need a token; don't
* store the token across requests.
*/
getToken(): Promise<string>;
}
type Params<P extends string = any> = Record<P, string | string[]>;
type EventContext<Env, P extends string, Data> = {
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
Expand Down
13 changes: 13 additions & 0 deletions types/generated-snapshot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15798,6 +15798,19 @@ export declare class MessageChannel {
export interface MessagePortPostMessageOptions {
transfer?: any[];
}
/**
* An `oidc_token` binding: issues OpenID Connect tokens for the Worker's own
* identity, to exchange for cloud credentials or send to an API as a bearer
* token. Each binding has one audience, set in its config.
*/
export interface OidcTokenBinding {
/**
* Returns a newly signed JWT for the configured audience, valid for 5
* minutes. Each call gets a new `jti`. Call it when you need a token; don't
* store the token across requests.
*/
getToken(): Promise<string>;
}
export type Params<P extends string = any> = Record<P, string | string[]>;
export type EventContext<Env, P extends string, Data> = {
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
Expand Down
Loading