Removes redundant code on OrcId custom provider.

This commit is contained in:
gkolokythas 2019-09-05 17:48:23 +03:00
parent 9a90e3f8af
commit b5bf65413c
2 changed files with 0 additions and 13 deletions

View File

@ -3,7 +3,5 @@ package eu.eudat.logic.security.customproviders.ORCID;
import eu.eudat.logic.security.validators.orcid.helpers.ORCIDResponseToken;
public interface ORCIDCustomProvider {
ORCIDUser getUser(String accessToken);
ORCIDResponseToken getAccessToken(String code, String redirectUri, String clientId, String clientSecret);
}

View File

@ -22,7 +22,6 @@ public class ORCIDCustomProviderImpl implements ORCIDCustomProvider {
this.environment = environment;
}
@Override
public ORCIDResponseToken getAccessToken(String code, String redirectUri, String clientId, String clientSecret) {
RestTemplate restTemplate = new RestTemplate();
@ -46,16 +45,6 @@ public class ORCIDCustomProviderImpl implements ORCIDCustomProvider {
return orcidResponseToken;
}
@Override
public ORCIDUser getUser(String accessToken) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = this.createBearerAuthHeaders(accessToken);
HttpEntity<String> entity = new HttpEntity<>(headers);
//Map<String, Object> values = restTemplate.exchange(this.environment.getProperty("orcid.login.access_token_url"),);
return null;
}
private HttpHeaders createBearerAuthHeaders(String accessToken) {
return new HttpHeaders() {{
String authHeader = "Bearer " + accessToken;