package Ġno . nav . yr k ess k ade . ek st ern . gateway . config Ċ Ċ import Ġno . nav . security . token . support . core . configuration . Multi Issuer Configuration Ċ import Ġno . nav . security . token . support . core . configuration . Proxy Aware Resource Retriever Ċ import Ġorg . slf 4 j . LoggerFactory Ċ import Ġorg . springframework . boot . context . properties . Enable Configuration Properties Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . core . env . Environment Ċ import Ġjava . lang . invoke . Method Handles Ċ import Ġjava . net . URL Ċ Ċ @ Configuration Ċ @ Enable Configuration Properties ( Multi Issuer Properties :: class ) Ċ class ĠEnable Jwt Token Validation Configuration ( private Ġval Ġenv : ĠEnvironment ) Ġ{ ĊĠĠĠ Ġval Ġlog Ġ= ĠLoggerFactory . getLogger ( Method Handles . lookup (). lookup Class ()) ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġoid c Resource Retriever () Ġ= ĠProxy Aware Resource Retriever ( ĊĠĠĠĠĠĠĠ Ġconfigured Proxy (), ĊĠĠĠĠĠĠĠ Ġenv . getProperty (" https . plaintext ", ĠBoolean :: class . java , Ġfalse ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġmulti Issuer Configuration ( ĊĠĠĠĠĠĠĠ Ġissuer Properties : ĠMulti Issuer Properties , ĊĠĠĠĠĠĠĠ Ġresource Retriever : ĠProxy Aware Resource Retriever ? ĊĠĠĠ Ġ) Ġ= ĠMulti Issuer Configuration ( issuer Properties . issuer , Ġresource Retriever ) ĊĊĠĠĠ Ġprivate Ġfun Ġconfigured Proxy () Ġ= Ġenv . getProperty ( ĊĠĠĠĠĠĠĠ Ġenv . getProperty (" http . proxy . parameter name ", Ġ" http . proxy "), ĠURL :: class . java ĊĠĠĠ Ġ). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( env . getProperty (" na is . cluster . name "," local "). contains (" gcp ")) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlog . warn (" You Ġhave Ġenabled Ġproxy ing Ġin ĠG CP , Ġthis Ġis Ġprobably Ġnot Ġwhat Ġyou Ġwant ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }