theme.keycloak.v2.admin.resources.assets.OIDCGeneralSettings--wdBI6nV.js Maven / Gradle / Ivy
import{jsx as e,jsxs as d,Fragment as p}from"react/jsx-runtime";import{useState as S}from"react";import{a as h,ac as k,ad as I,aj as b,ae as _,a4 as E,am as y,ab as m,y as r,O as H,v as T,b as F,b5 as w,b6 as C,U as A,b0 as M,e as q}from"./main-C7ps2lmX.js";import{D as v}from"./SwitchControl-C_9Y74oV.js";/* empty css */import{E as K}from"./ExpandableSection-CSay1Wbo.js";import{C as N}from"./ClientIdSecret-D4xxDCdD.js";import{R as P,D as V}from"./DisplayOrder-BDgUHroI.js";const j=({label:t,children:n})=>{const{t:i}=h();return e(k,{label:i(t),fieldId:t,labelIcon:e(I,{helpText:i(`${t}Help`),fieldLabelId:t}),children:n})},z=({label:t,field:n,fieldType:i="string",isReadOnly:a=!1,defaultValue:o})=>{const{t:c}=h(),{control:u}=b();return e(j,{label:t,children:e(_,{name:n,defaultValue:o||(i==="string"?"false":!1),control:u,render:({field:g})=>e(E,{id:t,label:c("on"),labelOff:c("off"),isChecked:i==="string"?g.value==="true":g.value,onChange:(f,s)=>g.onChange(i==="string"?""+s:s),isDisabled:a,"aria-label":t})})})},J=({label:t,field:n,isReadOnly:i=!1})=>{const{register:a}=b();return e(j,{label:t,children:e(y,{id:t,"data-testid":t,readOnly:i,...a(n)})})},D=["plain","S256"],U=({readOnly:t})=>{const{t:n}=h(),{control:i}=b(),a=m({control:i,name:"config.validateSignature"}),o=m({control:i,name:"config.useJwksUrl"}),c=m({control:i,name:"config.pkceEnabled"});return d("div",{className:"pf-v5-c-form pf-m-horizontal",children:[e(r,{name:"config.authorizationUrl",label:n("authorizationUrl"),type:"url",readOnly:t,rules:{required:n("required")}}),e(r,{name:"config.tokenUrl",label:n("tokenUrl"),type:"url",readOnly:t,rules:{required:n("required")}}),e(r,{name:"config.logoutUrl",label:n("logoutUrl"),readOnly:t}),e(r,{name:"config.userInfoUrl",label:n("userInfoUrl"),readOnly:t}),e(r,{name:"config.issuer",label:n("issuer"),readOnly:t}),e(v,{name:"config.validateSignature",label:n("validateSignature"),isDisabled:t,stringify:!0}),a==="true"&&d(p,{children:[e(v,{name:"config.useJwksUrl",label:n("useJwksUrl"),isDisabled:t,stringify:!0}),o==="true"?e(H,{name:"config.jwksUrl",label:n("jwksUrl"),readOnly:t}):d(p,{children:[e(r,{name:"config.publicKeySignatureVerifier",label:"validatingPublicKey"}),e(r,{name:"config.publicKeySignatureVerifierKeyId",label:n("validatingPublicKeyId"),readOnly:t})]})]}),e(v,{name:"config.pkceEnabled",label:n("pkceEnabled"),isDisabled:t,stringify:!0}),c==="true"&&e(T,{name:"config.pkceMethod",label:n("pkceMethod"),labelIcon:n("pkceMethodHelp"),controller:{defaultValue:D[0]},options:D.map(u=>({key:u,value:n(u)}))})]})},Q=({readOnly:t})=>{const{t:n}=h(),[i,a]=S(!1);return d(p,{children:[t&&e(K,{className:"keycloak__discovery-settings__metadata",toggleText:n(i?"hideMetaData":"showMetaData"),onToggle:()=>a(!i),isExpanded:i,children:e(U,{readOnly:t})}),!t&&e(U,{readOnly:t})]})},x=["client_secret_post","client_secret_basic","client_secret_jwt","private_key_jwt"],Y=({create:t=!0})=>{const n=F().providers.clientSignature.providers,{t:i}=h(),{control:a}=b(),[o,c]=S(!1),[u,g]=S(!1),f=m({control:a,name:"config.clientAuthMethod"});return d(p,{children:[e(k,{label:i("clientAuthentication"),labelIcon:e(I,{helpText:i("clientAuthenticationHelp"),fieldLabelId:"clientAuthentication"}),fieldId:"clientAuthentication",children:e(_,{name:"config.clientAuthMethod",defaultValue:x[0],control:a,render:({field:s})=>e(w,{toggleId:"clientAuthentication",onToggle:()=>c(!o),onSelect:l=>{s.onChange(l),c(!1)},selections:s.value,variant:C.single,"aria-label":i("clientAuthentication"),isOpen:o,children:x.map(l=>e(A,{selected:l===s.value,value:l,children:i(`clientAuthentications.${l}`)},l))})})}),e(N,{secretRequired:f!=="private_key_jwt",create:t}),e(k,{label:i("clientAssertionSigningAlg"),labelIcon:e(I,{helpText:i("clientAssertionSigningAlgHelp"),fieldLabelId:"clientAssertionSigningAlg"}),fieldId:"clientAssertionSigningAlg",children:e(_,{name:"config.clientAssertionSigningAlg",defaultValue:"",control:a,render:({field:s})=>e(w,{maxHeight:200,toggleId:"clientAssertionSigningAlg",onToggle:()=>g(!u),onSelect:l=>{s.onChange(l.toString()),g(!1)},selections:s.value||i("algorithmNotSpecified"),variant:C.single,"aria-label":i("selectClientAssertionSigningAlg"),isOpen:u,children:[e(A,{selected:s.value==="",value:"",children:i("algorithmNotSpecified")},""),...M(n).map(l=>e(A,{selected:l===s.value,value:l,children:l},l))]})})}),(f==="private_key_jwt"||f==="client_secret_jwt")&&e(J,{field:"config.clientAssertionAudience",label:"clientAssertionAudience"}),f==="private_key_jwt"&&e(z,{field:"config.jwtX509HeadersEnabled",label:"jwtX509HeadersEnabled"})]})},Z=()=>{const{t}=h(),{tab:n}=q(),{control:i}=b(),a=m({control:i,name:"alias"});return d(p,{children:[e(P,{id:a}),e(r,{name:"alias",label:t("alias"),labelIcon:t("aliasHelp"),readOnly:n==="settings",rules:{required:t("required")}}),e(r,{name:"displayName",label:t("displayName")}),e(V,{})]})};export{Q as D,j as F,Z as O,z as S,J as T,Y as a};
//# sourceMappingURL=OIDCGeneralSettings--wdBI6nV.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy