package Ġno . nav . yr k ess k ade . ska def ork lar ing . security Ċ Ċ import Ġno . nav . security . token . support . client . core . oauth 2 . OAuth 2 AccessToken Service Ċ import Ġno . nav . security . token . support . client . spring . Client Configuration Properties Ċ import Ġorg . springframework . stereotype . Service Ċ Ċ @ Service Ċ class ĠToken Service Ġ( ĊĠĠĠ Ġprivate Ġval Ġclient Configuration Properties : ĠClient Configuration Properties , ĊĠĠĠ Ġprivate Ġval Ġo Auth 2 AccessToken Service : ĠOAuth 2 AccessToken Service Ċ ) Ġ{ ĊĊĠĠĠ Ġfun Ġget App AccessToken With Scope ( client Name : ĠString ): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġclient Properties Ġ= Ġclient Configuration Properties . registration [ client Name ] ĊĠĠĠĠĠĠĠ Ġval Ġresponse Ġ= Ġo Auth 2 AccessToken Service . get AccessToken ( client Properties ) ĊĠĠĠĠĠĠĠ Ġreturn Ġresponse . accessToken ĊĠĠĠ Ġ} Ċ }