All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.ClientDescription-3fceb7f8.js Maven / Gradle / Ivy

There is a newer version: 25.0.1
Show newest version
import{u as I,a as k,j as e,F as u,h as l,C as s,S as x,ad as m,O as o,ae as C,b7 as A}from"./index-f33eb656.js";import{F as v}from"./FormAccess-29b78a4e.js";import{G as w,a as r}from"./GridItem-8422f423.js";import{C as d}from"./Checkbox-8826c1eb.js";import{D as z}from"./SwitchControl-a1cad449.js";const D=({unWrap:p,protocol:n})=>{const{t:a}=I("clients"),{control:i,watch:g,setValue:b}=k(),j=n||g("protocol"),c=g("publicClient"),f=g("authorizationServicesEnabled");return e.jsxs(v,{isHorizontal:!0,role:"manage-clients",unWrap:p,className:"keycloak__capability-config__form","data-testid":"capability-config-form",children:[j==="openid-connect"&&e.jsxs(e.Fragment,{children:[e.jsx(u,{hasNoPaddingTop:!0,label:a("clientAuthentication"),fieldId:"kc-authentication",labelIcon:e.jsx(l,{helpText:a("clients-help:authentication"),fieldLabelId:"clients:authentication"}),children:e.jsx(s,{name:"publicClient",defaultValue:!1,control:i,render:({field:t})=>e.jsx(x,{"data-testid":"authentication",id:"kc-authentication-switch",label:a("common:on"),labelOff:a("common:off"),isChecked:!t.value,onChange:h=>{t.onChange(!h),h||(b("authorizationServicesEnabled",!1),b("serviceAccountsEnabled",!1),b(m("attributes.oidc.ciba.grant.enabled"),!1))},"aria-label":a("clientAuthentication")})})}),e.jsx(u,{hasNoPaddingTop:!0,label:a("clientAuthorization"),fieldId:"kc-authorization",labelIcon:e.jsx(l,{helpText:a("clients-help:authorization"),fieldLabelId:"clients:authorization"}),children:e.jsx(s,{name:"authorizationServicesEnabled",defaultValue:!1,control:i,render:({field:t})=>e.jsx(x,{"data-testid":"authorization",id:"kc-authorization-switch",label:a("common:on"),labelOff:a("common:off"),isChecked:t.value&&!c,onChange:h=>{t.onChange(h),h&&b("serviceAccountsEnabled",!0)},isDisabled:c,"aria-label":a("clientAuthorization")})})}),e.jsx(u,{hasNoPaddingTop:!0,label:a("authenticationFlow"),fieldId:"kc-flow",children:e.jsxs(w,{id:"authenticationFlowGrid",hasGutter:!0,children:[e.jsx(r,{lg:4,sm:6,children:e.jsx(s,{name:"standardFlowEnabled",defaultValue:!0,control:i,render:({field:t})=>e.jsxs(o,{children:[e.jsx(d,{"data-testid":"standard",label:a("standardFlow"),id:"kc-flow-standard",isChecked:t.value?.toString()==="true",onChange:t.onChange}),e.jsx(l,{helpText:a("clients-help:standardFlow"),fieldLabelId:"clients:standardFlow"})]})})}),e.jsx(r,{lg:8,sm:6,children:e.jsx(s,{name:"directAccessGrantsEnabled",defaultValue:!0,control:i,render:({field:t})=>e.jsxs(o,{children:[e.jsx(d,{"data-testid":"direct",label:a("directAccess"),id:"kc-flow-direct",isChecked:t.value,onChange:t.onChange}),e.jsx(l,{helpText:a("clients-help:directAccess"),fieldLabelId:"clients:directAccess"})]})})}),e.jsx(r,{lg:4,sm:6,children:e.jsx(s,{name:"implicitFlowEnabled",defaultValue:!0,control:i,render:({field:t})=>e.jsxs(o,{children:[e.jsx(d,{"data-testid":"implicit",label:a("implicitFlow"),id:"kc-flow-implicit",isChecked:t.value?.toString()==="true",onChange:t.onChange}),e.jsx(l,{helpText:a("clients-help:implicitFlow"),fieldLabelId:"clients:implicitFlow"})]})})}),e.jsx(r,{lg:8,sm:6,children:e.jsx(s,{name:"serviceAccountsEnabled",defaultValue:!1,control:i,render:({field:t})=>e.jsxs(o,{children:[e.jsx(d,{"data-testid":"service-account",label:a("serviceAccount"),id:"kc-flow-service-account",isChecked:t.value?.toString()==="true"||c&&f,onChange:t.onChange,isDisabled:c&&!f||!c&&f}),e.jsx(l,{helpText:a("clients-help:serviceAccount"),fieldLabelId:"clients:serviceAccount"})]})})}),e.jsx(r,{lg:8,sm:6,children:e.jsx(s,{name:m("attributes.oauth2.device.authorization.grant.enabled"),defaultValue:!1,control:i,render:({field:t})=>e.jsxs(o,{children:[e.jsx(d,{"data-testid":"oauth-device-authorization-grant",label:a("oauthDeviceAuthorizationGrant"),id:"kc-oauth-device-authorization-grant",name:"oauth2.device.authorization.grant.enabled",isChecked:t.value.toString()==="true",onChange:t.onChange}),e.jsx(l,{helpText:a("clients-help:oauthDeviceAuthorizationGrant"),fieldLabelId:"clients:oauthDeviceAuthorizationGrant"})]})})}),e.jsx(r,{lg:8,sm:6,children:e.jsx(s,{name:m("attributes.oidc.ciba.grant.enabled"),defaultValue:!1,control:i,render:({field:t})=>e.jsxs(o,{children:[e.jsx(d,{"data-testid":"oidc-ciba-grant",label:a("oidcCibaGrant"),id:"kc-oidc-ciba-grant",name:"oidc.ciba.grant.enabled",isChecked:t.value.toString()==="true",onChange:t.onChange,isDisabled:c}),e.jsx(l,{helpText:a("clients-help:oidcCibaGrant"),fieldLabelId:"clients:oidcCibaGrant"})]})})})]})})]}),j==="saml"&&e.jsxs(e.Fragment,{children:[e.jsx(u,{labelIcon:e.jsx(l,{helpText:a("clients-help:encryptAssertions"),fieldLabelId:"clients:encryptAssertions"}),label:a("encryptAssertions"),fieldId:"kc-encrypt",hasNoPaddingTop:!0,children:e.jsx(s,{name:m("attributes.saml.encrypt"),control:i,defaultValue:!1,render:({field:t})=>e.jsx(x,{"data-testid":"encrypt",id:"kc-encrypt",label:a("common:on"),labelOff:a("common:off"),isChecked:t.value,onChange:t.onChange,"aria-label":a("encryptAssertions")})})}),e.jsx(u,{labelIcon:e.jsx(l,{helpText:a("clients-help:clientSignature"),fieldLabelId:"clients:clientSignature"}),label:a("clientSignature"),fieldId:"kc-client-signature",hasNoPaddingTop:!0,children:e.jsx(s,{name:m("attributes.saml.client.signature"),control:i,defaultValue:!1,render:({field:t})=>e.jsx(x,{"data-testid":"client-signature",id:"kc-client-signature",label:a("common:on"),labelOff:a("common:off"),isChecked:t.value,onChange:t.onChange,"aria-label":a("clientSignature")})})})]})]})},L=({hasConfigureAccess:p})=>{const{t:n}=I("clients");return e.jsxs(v,{role:"manage-clients",fineGrainedAccess:p,unWrap:!0,children:[e.jsx(C,{name:"clientId",label:n("common:clientId"),labelIcon:n("clients-help:clientId"),rules:{required:{value:!0,message:n("common:required")}}}),e.jsx(C,{name:"name",label:n("common:name"),labelIcon:n("clients-help:clientName")}),e.jsx(A,{name:"description",label:n("common:description"),labelIcon:n("clients-help:description"),rules:{maxLength:{value:255,message:n("common:maxLength",{length:255})}}}),e.jsx(z,{name:"alwaysDisplayInConsole",label:n("alwaysDisplayInUI"),labelIcon:n("clients-help:alwaysDisplayInUI")})]})};export{L as C,D as a};
//# sourceMappingURL=ClientDescription-3fceb7f8.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy