2525@ Slf4j
2626public class AuthTransactionHelper {
2727
28- private static final String AUTH_TOKEN_CACHE = "AUTH_TOKEN_CACHE " ;
28+ private static final String AUTH_TOKEN_CACHE = "authtokens " ;
2929
30- public static final String AUTH_TOKEN_CACHE_KEY = "auth_token" ;
30+ public static final String AUTH_TOKEN_CACHE_KEY = "auth_token" ;
3131
32- @ Autowired
32+ @ Autowired
3333 private ObjectMapper objectMapper ;
3434
35- @ Autowired
35+ @ Autowired
3636 private RestTemplate restTemplate ;
3737
38- @ Value ("${mosip.esignet.authenticator.ida.auth-token-url}" )
38+ @ Value ("${mosip.esignet.authenticator.ida.auth-token-url}" )
3939 private String authTokenUrl ;
4040
41- @ Value ("${mosip.esignet.authenticator.ida.client-id}" )
41+ @ Value ("${mosip.esignet.authenticator.ida.client-id}" )
4242 private String clientId ;
4343
4444 @ Value ("${mosip.esignet.authenticator.ida.secret-key}" )
@@ -48,11 +48,11 @@ public class AuthTransactionHelper {
4848 private String appId ;
4949
5050 @ Cacheable (value = AUTH_TOKEN_CACHE , key = "#root.target.AUTH_TOKEN_CACHE_KEY" )
51- public String getAuthToken () throws Exception {
51+ public String getAuthToken () throws Exception {
5252 log .info ("Started to get auth-token with appId : {} && clientId : {}" ,
5353 appId , clientId );
5454
55- RequestWrapper <ClientIdSecretKeyRequest > authRequest = new RequestWrapper <>();
55+ RequestWrapper <ClientIdSecretKeyRequest > authRequest = new RequestWrapper <>();
5656 authRequest .setRequesttime (LocalDateTime .now ());
5757 ClientIdSecretKeyRequest clientIdSecretKeyRequest = new ClientIdSecretKeyRequest (clientId , secretKey , appId );
5858 authRequest .setRequest (clientIdSecretKeyRequest );
@@ -67,7 +67,7 @@ public String getAuthToken() throws Exception {
6767
6868 String authToken = responseEntity .getHeaders ().getFirst ("authorization" );
6969 return authToken ;
70- }
70+ }
7171
7272 @ CacheEvict (value = AUTH_TOKEN_CACHE , allEntries = true )
7373 public void purgeAuthTokenCache () {
0 commit comments