Skip to content

Commit

Permalink
fix @mjnagel feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed Aug 2, 2024
1 parent 0de030b commit 575a585
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pepr/operator/crd/validators/package-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ export async function validator(req: PeprValidateRequest<UDSPackage>) {
`The client ID "${client.clientId}" uses an invalid secret name ${client.secretName}`,
);
}
// If standardFlowEnabled is undefined (defaults to `true`) or explicitly true and there are no redirectUris set, deny the req
if (
(client.standardFlowEnabled === undefined || client.standardFlowEnabled) &&
!client.redirectUris
) {
return req.Deny(
`The client ID "${client.clientId}" must specify redirectUris if standardFlowEnabled is turned on`,
);
}
}

return req.Approve();
Expand Down

0 comments on commit 575a585

Please sign in to comment.