feat: add query arg for oidc expiration (#7312)

* feat: add query arg for oidc expiration

* Update ee-repo-ref.txt

* Update ee-repo-ref.txt

---------

Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
This commit is contained in:
hugocasa
2025-12-08 19:00:51 +01:00
committed by GitHub
parent e8ca7c5f95
commit e6adf16fc9
4 changed files with 13 additions and 4 deletions

View File

@@ -945,13 +945,15 @@ export function getResumeEndpoints(approver?: string): Promise<{
/**
* Get an OIDC jwt token for auth to external services (e.g: Vault, AWS) (ee only)
* @param audience audience of the token
* @param expiresIn Optional number of seconds until the token expires
* @returns jwt token
*/
export async function getIdToken(audience: string): Promise<string> {
export async function getIdToken(audience: string, expiresIn?: number): Promise<string> {
const workspace = getWorkspace();
return await OidcService.getOidcToken({
workspace,
audience,
expiresIn,
});
}