@Override @Transactional(value="defaultTransactionManager") public OAuth2AccessTokenEntity saveAccessToken(OAuth2AccessTokenEntity accessToken) { OAuth2AccessTokenEntity newToken = tokenRepository.saveAccessToken(accessToken); // if the old token has any additional information for the return from the token endpoint, carry it through here after save if (accessToken.getAdditionalInformation() != null && !accessToken.getAdditionalInformation().isEmpty()) { newToken.getAdditionalInformation().putAll(accessToken.getAdditionalInformation()); } return newToken; }
@Override @Transactional(value="defaultTransactionManager") public OAuth2AccessTokenEntity saveAccessToken(OAuth2AccessTokenEntity accessToken) { OAuth2AccessTokenEntity newToken = tokenRepository.saveAccessToken(accessToken); // if the old token has any additional information for the return from the token endpoint, carry it through here after save if (accessToken.getAdditionalInformation() != null && !accessToken.getAdditionalInformation().isEmpty()) { newToken.getAdditionalInformation().putAll(accessToken.getAdditionalInformation()); } return newToken; }
@Override public Map<String, Object> getAdditionalInformation() { Map<String, Object> additionalInfoMap = this.rootToken.getAdditionalInformation(); if(launchContext != null){ additionalInfoMap.put(PATIENT_ID_FIELD_NAME, launchContext.getPatientId()); } return additionalInfoMap; }