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

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

There is a newer version: 26.0.7
Show newest version
import{jsxs as l,Fragment as A,jsx as e}from"react/jsx-runtime";import{a as F,aj as y,aH as D,ac as I,ad as c,ae as o,a4 as k,aJ as p,bu as S,bv as s,bb as u,bc as n,bS as h,aI as T,y as z,O as E}from"./main-C7ps2lmX.js";import{D as v}from"./SwitchControl-C_9Y74oV.js";import{F as H}from"./FormAccess-DyLNkc18.js";const j=({unWrap:g,protocol:i})=>{const{t:a}=F(),{control:r,watch:f,setValue:m}=y(),w=i||f("protocol"),d=f("publicClient"),C=f("authorizationServicesEnabled"),x=D();return l(H,{isHorizontal:!0,role:"manage-clients",unWrap:g,className:"keycloak__capability-config__form","data-testid":"capability-config-form",children:[w==="openid-connect"&&l(A,{children:[e(I,{hasNoPaddingTop:!0,label:a("clientAuthentication"),fieldId:"kc-authentication",labelIcon:e(c,{helpText:a("authenticationHelp"),fieldLabelId:"authentication"}),children:e(o,{name:"publicClient",defaultValue:!1,control:r,render:({field:t})=>e(k,{"data-testid":"authentication",id:"kc-authentication-switch",label:a("on"),labelOff:a("off"),isChecked:!t.value,onChange:(G,b)=>{t.onChange(!b),b||(m("authorizationServicesEnabled",!1),m("serviceAccountsEnabled",!1),m(p("attributes.oidc.ciba.grant.enabled"),!1))},"aria-label":a("clientAuthentication")})})}),e(I,{hasNoPaddingTop:!0,label:a("clientAuthorization"),fieldId:"kc-authorization",labelIcon:e(c,{helpText:a("authorizationHelp"),fieldLabelId:"authorization"}),children:e(o,{name:"authorizationServicesEnabled",defaultValue:!1,control:r,render:({field:t})=>e(k,{"data-testid":"authorization",id:"kc-authorization-switch",label:a("on"),labelOff:a("off"),isChecked:t.value&&!d,onChange:(G,b)=>{t.onChange(b),b&&m("serviceAccountsEnabled",!0)},isDisabled:d,"aria-label":a("clientAuthorization")})})}),e(I,{hasNoPaddingTop:!0,label:a("authenticationFlow"),fieldId:"kc-flow",children:l(S,{id:"authenticationFlowGrid",hasGutter:!0,children:[e(s,{lg:4,sm:6,children:e(o,{name:"standardFlowEnabled",defaultValue:!0,control:r,render:({field:t})=>l(u,{children:[e(n,{children:e(h,{"data-testid":"standard",label:a("standardFlow"),id:"kc-flow-standard",isChecked:t.value?.toString()==="true",onChange:t.onChange})}),e(n,{children:e(c,{helpText:a("standardFlowHelp"),fieldLabelId:"standardFlow"})})]})})}),e(s,{lg:8,sm:6,children:e(o,{name:"directAccessGrantsEnabled",defaultValue:!0,control:r,render:({field:t})=>l(u,{children:[e(n,{children:e(h,{"data-testid":"direct",label:a("directAccess"),id:"kc-flow-direct",isChecked:t.value,onChange:t.onChange})}),e(n,{children:e(c,{helpText:a("directAccessHelp"),fieldLabelId:"directAccess"})})]})})}),e(s,{lg:4,sm:6,children:e(o,{name:"implicitFlowEnabled",defaultValue:!0,control:r,render:({field:t})=>l(u,{children:[e(n,{children:e(h,{"data-testid":"implicit",label:a("implicitFlow"),id:"kc-flow-implicit",isChecked:t.value?.toString()==="true",onChange:t.onChange})}),e(n,{children:e(c,{helpText:a("implicitFlowHelp"),fieldLabelId:"implicitFlow"})})]})})}),e(s,{lg:8,sm:6,children:e(o,{name:"serviceAccountsEnabled",defaultValue:!1,control:r,render:({field:t})=>l(u,{children:[e(n,{children:e(h,{"data-testid":"service-account",label:a("serviceAccount"),id:"kc-flow-service-account",isChecked:t.value?.toString()==="true"||d&&C,onChange:t.onChange,isDisabled:d&&!C||!d&&C})}),e(n,{children:e(c,{helpText:a("serviceAccountHelp"),fieldLabelId:"serviceAccount"})})]})})}),x(T.DeviceFlow)&&e(s,{lg:8,sm:6,children:e(o,{name:p("attributes.oauth2.device.authorization.grant.enabled"),defaultValue:!1,control:r,render:({field:t})=>l(u,{children:[e(n,{children:e(h,{"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(n,{children:e(c,{helpText:a("oauthDeviceAuthorizationGrantHelp"),fieldLabelId:"oauthDeviceAuthorizationGrant"})})]})})}),e(s,{lg:8,sm:6,children:e(o,{name:p("attributes.oidc.ciba.grant.enabled"),defaultValue:!1,control:r,render:({field:t})=>l(u,{children:[e(n,{children:e(h,{"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:d})}),e(n,{children:e(c,{helpText:a("oidcCibaGrantHelp"),fieldLabelId:"oidcCibaGrant"})})]})})})]})})]}),w==="saml"&&l(A,{children:[e(v,{name:p("attributes.saml.encrypt"),label:a("encryptAssertions"),labelIcon:a("encryptAssertionsHelp")}),e(v,{name:p("attributes.saml.client.signature"),label:a("clientSignature"),labelIcon:a("clientSignatureHelp")})]})]})},O=({hasConfigureAccess:g})=>{const{t:i}=F();return l(H,{role:"manage-clients",fineGrainedAccess:g,unWrap:!0,children:[e(z,{name:"clientId",label:i("clientId"),labelIcon:i("clientIdHelp"),rules:{required:{value:!0,message:i("required")}}}),e(z,{name:"name",label:i("name"),labelIcon:i("clientNameHelp")}),e(E,{name:"description",label:i("description"),labelIcon:i("clientDescriptionHelp"),rules:{maxLength:{value:255,message:i("maxLength",{length:255})}}}),e(v,{name:"alwaysDisplayInConsole",label:i("alwaysDisplayInUI"),labelIcon:i("alwaysDisplayInUIHelp")})]})};export{O as C,j as a};
//# sourceMappingURL=ClientDescription-p94dy3yH.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy