Removes redundant code on OrcId custom provider.
This commit is contained in:
parent
9a90e3f8af
commit
b5bf65413c
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue