package Ġio . char le sc d . m oo ve . infrastructure . service . client Ċ Ċ import Ġorg . springframework . cloud . open fe ign . Fe ign Client Ċ import Ġorg . springframework . http . MediaType Ċ import Ġorg . springframework . web . bind . annotation . GetMapping Ċ import Ġorg . springframework . web . bind . annotation . PathVariable Ċ import Ġorg . springframework . web . bind . annotation . Request Header Ċ Ċ @ Fe ign Client ( name Ġ= Ġ" keycloak Custom Client ", Ġurl Ġ= Ġ"\ ${ char le sc d . keycloak . server Url }") Ċ interface ĠKey cloak Custom Client Ġ{ ĊĊĠĠĠ Ġ@ GetMapping ( ĊĠĠĠĠĠĠĠ Ġvalue Ġ= Ġ["/ real ms /{ realm }/ protocol / openid - connect / userinfo "], ĊĠĠĠĠĠĠĠ Ġconsume s Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ], ĊĠĠĠĠĠĠĠ Ġproduces Ġ= Ġ[ MediaType . APPLICATION _ JSON _ VALUE ] ĊĠĠĠ Ġ) ĊĠĠĠ Ġfun ĠuserInfo (@ PathVariable (" realm ") Ġrealm : ĠString , Ġ@ Request Header (" Authorization ") Ġauthorization : ĠString ) Ċ } Ċ