Skip to content

Commit d8340e1

Browse files
Merge pull request #1 from ase-101/patch-4
Update AuthTransactionHelper.java
2 parents c7b3c15 + a743550 commit d8340e1

File tree

1 file changed

+9
-9
lines changed
  • authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/helper

1 file changed

+9
-9
lines changed

authentication/esignet-integration-impl/src/main/java/io/mosip/authentication/esignet/integration/helper/AuthTransactionHelper.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@
2525
@Slf4j
2626
public 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

Comments
 (0)