package Ġno . nav . security . examples Ċ Ċ import Ġcom . fasterxml . jackson . annotation . JsonProperty Ċ import Ġcom . nat pr y ce . kon fig . Configuration Ċ import Ġcom . nat pr y ce . kon fig . Configuration Properties Ċ import Ġcom . nat pr y ce . kon fig . Configuration Properties . Companion . system Properties Ċ import Ġcom . nat pr y ce . kon fig . Empty Configuration Ċ import Ġcom . nat pr y ce . kon fig . Environment Variables Ċ import Ġcom . nat pr y ce . kon fig . Key Ċ import Ġcom . nat pr y ce . kon fig . int Type Ċ import Ġcom . nat pr y ce . kon fig . over riding Ċ import Ġcom . nat pr y ce . kon fig . string Type Ċ import Ġio . ktor . client . request . get Ċ import Ġkotlinx . coroutines . run Blocking Ċ Ċ private Ġval Ġconfig Ġ= Ġsystem Properties () Ġoverriding ĊĠĠĠ ĠEnvironment Variables () Ġoverriding ĊĠĠĠ ĠConfiguration Properties . from Optional Resource (" application - local . secrets . properties ") Ġoverriding ĊĠĠĠ ĠConfiguration Properties . from Resource (" application . properties ") Ċ Ċ data Ġclass ĠConfiguration ( ĊĠĠĠ Ġval Ġapplication : ĠApplication Ġ= ĠApplication (), ĊĠĠĠ Ġval Ġazure Ad : ĠAzure Ad Ġ= ĠAzure Ad () Ċ ) Ġ{ ĊĠĠĠ Ġdata Ġclass ĠApplication ( ĊĠĠĠĠĠĠĠ Ġval Ġport : ĠInt Ġ= Ġconfig [ Key (" application . port ", Ġint Type )], ĊĠĠĠĠĠĠĠ Ġval Ġname : ĠString Ġ= Ġconfig [ Key (" application . name ", Ġstring Type )] ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġdata Ġclass ĠAzure Ad ( ĊĠĠĠĠĠĠĠ Ġval ĠclientId : ĠString Ġ= Ġconfig [ Key (" azure . app . client . id ", Ġstring Type )], ĊĠĠĠĠĠĠĠ Ġval Ġwell Known Configuration Url : ĠString Ġ= Ġconfig [ Key (" azure . app . well . known . url ", Ġstring Type )], ĊĠĠĠĠĠĠĠ Ġval Ġopen Id Configuration : ĠAzure Ad Open Id Configuration Ġ= Ġrun Blocking Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠhttpClient . get ( well Known Configuration Url ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ) Ċ } Ċ Ċ data Ġclass ĠAzure Ad Open Id Configuration ( ĊĠĠĠ Ġ@ JsonProperty (" jw ks _ uri ") ĊĠĠĠ Ġval Ġj w ks Uri : ĠString , ĊĠĠĠ Ġ@ JsonProperty (" issuer ") ĊĠĠĠ Ġval Ġissuer : ĠString , ĊĠĠĠ Ġ@ JsonProperty (" token _ endpoint ") ĊĠĠĠ Ġval Ġtoken Endpoint : ĠString , ĊĠĠĠ Ġ@ JsonProperty (" authorization _ endpoint ") ĊĠĠĠ Ġval Ġauthorization Endpoint : ĠString Ċ ) Ċ Ċ private Ġfun ĠConfiguration Properties . Companion . from Optional Resource ( resourceName : ĠString ): ĠConfiguration Ġ= ĊĠĠĠ ĠClassLoader . getSystem ClassLoader (). getResource ( resourceName )?. let Ġ{ ĊĠĠĠĠĠĠĠ Ġfrom Resource ( resourceName ) ĊĠĠĠ Ġ} Ġ?: ĠEmpty Configuration Ċ