package Ġcom . app ify hub . mon ol ith . domain . mapper Ċ Ċ import Ġcom . app ify hub . mon ol ith . domain . user . User Ċ import Ġcom . app ify hub . mon ol ith . domain . user . UserId Ċ import Ġcom . app ify hub . mon ol ith . util . Time Provider Ċ import Ġorg . springframework . security . core . user details . UserDetails Ċ Ċ fun ĠUser . to Security User (): ĠUser Details Ġ= ĊĠ Ġorg . springframework . security . core . user details . User . builder () ĊĠĠĠ Ġ. username ( id . to Universal Format ()) ĊĠĠĠ Ġ. password ( signature ) ĊĠĠĠ Ġ. author ities (* all Author ities . to Typed Array ()) ĊĠĠĠ Ġ. account Locked ( verification Token Ġ!= Ġnull ) ĊĠĠĠ Ġ. disabled ( verification Token Ġ!= Ġnull ) ĊĠĠĠ Ġ. credentials Expired ( false ) ĊĠĠĠ Ġ. build () Ċ Ċ fun ĠUser Details . to Domain ( time Provider : ĠTime Provider ): ĠUser Ġ= ĠUser ( ĊĠ Ġid Ġ= ĠUserId . from Universal Format ( username Ġ?: Ġ""), ĊĠ Ġsignature Ġ= Ġpassword Ġ?: Ġ"", ĊĠ Ġname Ġ= Ġnull , ĊĠ Ġtype Ġ= ĠUser . Type . PERSON AL , ĊĠ Ġauthority Ġ= ĠUser . Authority . find ( author ities , ĠUser . Authority . DEFAULT ), ĊĠ Ġallows Sp am Ġ= Ġfalse , ĊĠ Ġcontact Ġ= Ġnull , ĊĠ Ġcontact Type Ġ= ĠUser . Contact Type . CUSTOM , ĊĠ Ġverification Token Ġ= Ġif Ġ( is Account Non Locked ) Ġnull Ġelse Ġ"", ĊĠ Ġbirthday Ġ= Ġnull , ĊĠ ĠcreatedAt Ġ= Ġtime Provider . current Date , ĊĠ ĠupdatedAt Ġ= Ġtime Provider . current Date , ĊĠ Ġcompany Ġ= Ġnull , Ċ ) Ċ