Skip to content
Snippets Groups Projects
Commit 4fa5c743 authored by Nicolas.Rod's avatar Nicolas.Rod
Browse files

feat(ORCID): add 'scope' parameter + DTO that can be sent in system properties

parent 32dbdfdf
No related branches found
No related tags found
1 merge request!432feat(ORCID): add 'scope' parameter + DTO that can be sent in system properties
...@@ -197,7 +197,7 @@ public class SolidifyProperties { ...@@ -197,7 +197,7 @@ public class SolidifyProperties {
private String clientId; private String clientId;
private String clientSecret; private String clientSecret;
private String grantType = "authorization_code"; private String grantType = "authorization_code";
private String scope = "/authenticate";
private String apiBaseUrl = "https://api.orcid.org/v3.0/"; private String apiBaseUrl = "https://api.orcid.org/v3.0/";
public String getClientId() { public String getClientId() {
...@@ -243,6 +243,14 @@ public class SolidifyProperties { ...@@ -243,6 +243,14 @@ public class SolidifyProperties {
public void setApiBaseUrl(String apiBaseUrl) { public void setApiBaseUrl(String apiBaseUrl) {
this.apiBaseUrl = apiBaseUrl; this.apiBaseUrl = apiBaseUrl;
} }
public String getScope() {
return this.scope;
}
public void setScope(String scope) {
this.scope = scope;
}
} }
public static class Sitemap { public static class Sitemap {
......
/*-
* %%----------------------------------------------------------------------------------------------
* Solidify Framework - Solidify ORCID - OrcidConfigDTO.java
* SPDX-License-Identifier: GPL-2.0-or-later
* %----------------------------------------------------------------------------------------------%
* Copyright (C) 2017 - 2024 University of Geneva
* %----------------------------------------------------------------------------------------------%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* ----------------------------------------------------------------------------------------------%%
*/
package ch.unige.solidify.model;
import ch.unige.solidify.config.SolidifyProperties;
public class OrcidConfigDTO {
private String authorizeUrl;
private String clientId;
private String scope;
public OrcidConfigDTO(SolidifyProperties.Orcid orcidProperties) {
this.authorizeUrl = orcidProperties.getOAuthBaseUrl() + "authorize";
this.clientId = orcidProperties.getClientId();
this.scope = orcidProperties.getScope();
}
public String getAuthorizeUrl() {
return this.authorizeUrl;
}
public void setAuthorizeUrl(String authorizeUrl) {
this.authorizeUrl = authorizeUrl;
}
public String getClientId() {
return this.clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getScope() {
return this.scope;
}
public void setScope(String scope) {
this.scope = scope;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment