Skip to content

Commit

Permalink
validate product env, no template
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyjux committed Feb 13, 2024
1 parent 5e99eaf commit 8d51502
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,5 @@ const flowTypes: { value: string; label: string }[] = [
{ value: 'kong-acl-only', label: 'Kong ACL Only' },
{ value: 'kong-api-key-only', label: 'Kong API Key Only' },
{ value: 'kong-api-key-acl', label: 'Kong API Key with ACL Flow' },
{ value: 'protected-externally', label: 'Protected Externally' },
];
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const AuthorizationFlow: React.FC<AuthorizationFlowProps> = ({
if (flow === 'client-credentials' || flow === 'authorization-code') {
return !credentialIssuer;
}
return flow === 'public';
return flow === 'public' || flow === 'protected-externally';
}, [flow, credentialIssuer]);
const { data, isSuccess } = useCurrentNamespace();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const EditEnvironment: React.FC<EditEnvironmentProps> = ({ data }) => {
{ value: 'kong-acl-only', label: 'Kong ACL Only' },
{ value: 'kong-api-key-only', label: 'Kong API Key Only' },
{ value: 'kong-api-key-acl', label: 'Kong API Key with ACL Flow' },
{ value: 'protected-externally', label: 'Protected Externally' },
];

return (
Expand Down
2 changes: 2 additions & 0 deletions src/nextapp/shared/services/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const getAuthToken = (method: string): IconType => {
return FaLock;
case 'client-credentials':
return FaLock;
case 'protected-externally':
return FaLock;
// case 'private':
// return FaUserSecret;
case 'public':
Expand Down
2 changes: 1 addition & 1 deletion src/services/workflow/validate-active-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export const ValidateActiveEnvironment = async (
'] missing or incomplete oidc plugin.'
);
}
} else if (flow == 'public') {
} else if (flow == 'public' || flow == 'protected-externally') {
} else {
addValidationError(
'Unexpected error when trying to validate the environment.'
Expand Down

0 comments on commit 8d51502

Please sign in to comment.