mirror of
https://github.com/google-github-actions/auth.git
synced 2026-06-06 09:17:05 +00:00
fix: repair a logic bug for domain-wide delegation (#178)
This commit is contained in:
parent
714f1fe243
commit
7c32666372
2 changed files with 9 additions and 7 deletions
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
14
src/main.ts
14
src/main.ts
|
|
@ -210,12 +210,14 @@ async function run(): Promise<void> {
|
|||
// perform Domain-Wide Delegation. Otherwise, use the modern IAM
|
||||
// Credentials endpoints.
|
||||
let accessToken, expiration;
|
||||
if (accessTokenSubject && accessTokenLifetime > 3600) {
|
||||
logInfo(
|
||||
`An access token subject was specified, triggering Domain-Wide ` +
|
||||
`Delegation flow. This flow does not support specifying an ` +
|
||||
`access token lifetime of greater than 1 hour.`,
|
||||
);
|
||||
if (accessTokenSubject) {
|
||||
if (accessTokenLifetime > 3600) {
|
||||
logInfo(
|
||||
`An access token subject was specified, triggering Domain-Wide ` +
|
||||
`Delegation flow. This flow does not support specifying an ` +
|
||||
`access token lifetime of greater than 1 hour.`,
|
||||
);
|
||||
}
|
||||
|
||||
const unsignedJWT = buildDomainWideDelegationJWT(
|
||||
serviceAccount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue