Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed Aug 5, 2024
1 parent 0acc2f7 commit 0bc8e8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pepr/operator/crd/validators/package-validator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PeprValidateRequest } from "pepr";

import { Gateway, UDSPackage } from "..";
import { Gateway, Protocol, UDSPackage } from "..";
import { generateVSName } from "../../controllers/istio/virtual-service";
import { generateName } from "../../controllers/network/generate";
import { sanitizeResourceName } from "../../controllers/utils";
Expand Down Expand Up @@ -95,7 +95,7 @@ export async function validator(req: PeprValidateRequest<UDSPackage>) {
// If standardFlowEnabled is undefined (defaults to `true`) or explicitly true and there are no redirectUris set, deny the req
if (client.standardFlowEnabled !== false && !client.redirectUris) {
return req.Deny(
`The client ID "${client.clientId}" must specify redirectUris if standardFlowEnabled is turned on`,
`The client ID "${client.clientId}" must specify redirectUris if standardFlowEnabled is turned on (it is enabled by default)`,
);
}
// If this is a public client ensure that it only sets itself up as an OAuth Device Flow client
Expand All @@ -106,7 +106,7 @@ export async function validator(req: PeprValidateRequest<UDSPackage>) {
client.secretName !== undefined ||
client.secretTemplate !== undefined ||
client.enableAuthserviceSelector !== undefined ||
client.protocol === "saml" ||
client.protocol === Protocol.Saml ||
client.attributes?.["oauth2.device.authorization.grant.enabled"] !== "true")
) {
return req.Deny(
Expand Down

0 comments on commit 0bc8e8e

Please sign in to comment.