package Ġcom ._ 2 horizon . cv a . dialogflow . manager . auth Ċ Ċ import Ġcom . nim bus ds . jwt . JWT Claims Set Ċ import Ġio . mic ronaut . context . annotation . Re places Ċ import Ġio . mic ronaut . runtime . ApplicationConfiguration Ċ import Ġio . mic ronaut . security . authentication . UserDetails Ċ import Ġio . mic ronaut . security . token . config . Token Configuration Ċ import Ġio . mic ronaut . security . token . jwt . generator . claims . Claims Audience Provider Ċ import Ġio . mic ronaut . security . token . jwt . generator . claims . JWT Claims Set Generator Ċ import Ġio . mic ronaut . security . token . jwt . generator . claims . Jwt Id Generator Ċ import Ġjavax . inject . Singleton Ċ Ċ /** Ċ Ġ* ĠCreated Ġby ĠFrank ĠL ie ber Ġ( li ef ra ) Ġon Ġ 2 0 2 0 - 0 9 - 1 3 . Ċ Ġ*/ Ċ @ Singleton Ċ @ Re places ( bean Ġ= ĠJWT Claims Set Generator :: class ) Ċ class ĠCustom JWT Claims Set Generator ( ĊĠĠĠ Ġtoken Configuration : ĠToken Configuration , ĊĠĠĠ Ġjwt Id Generator : ĠJwt Id Generator ?, ĊĠĠĠ Ġclaims Audience Provider : ĠCla ims Audience Provider ?, ĊĠĠĠ Ġapplication Configuration : ĠApplication Configuration ? Ċ ) Ġ: ĠJWT Claims Set Generator ( token Configuration , Ġjwt Id Generator , Ġclaims Audience Provider , Ġapplication Configuration ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġpopulate With UserDetails ( builder : ĠJWT Claims Set . Builder , Ġuser Details : ĠUser Details ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . populate With UserDetails ( builder , Ġuser Details ) ĊĠĠĠĠĠĠĠ Ġif Ġ( user Details Ġis ĠEmail UserDetails ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . claim (" email ", Ġuser Details . email ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ