Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit faa7260

Browse files
author
Dominik František Bučík
authored
Merge pull request #70 from dBucik/bbmri_ga4gh_passports
Bbmri ga4gh passports
2 parents 698777f + b9f5c4d commit faa7260

File tree

13 files changed

+1055
-629
lines changed

13 files changed

+1055
-629
lines changed

perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/attributesConsent.tag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true"
2-
import="cz.muni.ics.oidc.server.elixir.GA4GHClaimSource" %>
2+
import="cz.muni.ics.oidc.server.ga4gh.Ga4ghPassportAndVisaClaimSource" %>
33
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
44
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
55
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
@@ -53,7 +53,7 @@
5353
<c:forEach var="subValue" items="${claim.value}">
5454
<c:choose>
5555
<c:when test="${claim.key=='ga4gh_passport_v1'}">
56-
<li><%= GA4GHClaimSource.parseAndVerifyVisa(
56+
<li><%= Ga4ghPassportAndVisaClaimSource.parseAndVerifyVisa(
5757
(String) jspContext.findAttribute("subValue")).getPrettyString() %></li>
5858
</c:when>
5959
<c:otherwise>

perun-oidc-server-webapp/src/main/webapp/WEB-INF/views/themedApproveDevice.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%@ page import="cz.muni.ics.oidc.server.elixir.GA4GHClaimSource" %>
1+
<%@ page import="cz.muni.ics.oidc.server.ga4gh.ElixirGa4ghClaimSource" %>
22
<%@ page import="java.util.ArrayList" %>
33
<%@ page import="java.util.List" %>
44
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>

perun-oidc-server/src/main/java/cz/muni/ics/oidc/server/elixir/AddHeaderInterceptor.java renamed to perun-oidc-server/src/main/java/cz/muni/ics/oidc/server/AddHeaderInterceptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cz.muni.ics.oidc.server.elixir;
1+
package cz.muni.ics.oidc.server;
22

33
import java.io.IOException;
44
import org.springframework.http.HttpRequest;
@@ -12,12 +12,12 @@
1212
*
1313
* @author Martin Kuba <[email protected]>
1414
*/
15-
class AddHeaderInterceptor implements ClientHttpRequestInterceptor {
15+
public class AddHeaderInterceptor implements ClientHttpRequestInterceptor {
1616

1717
private final String header;
1818
private final String value;
1919

20-
AddHeaderInterceptor(String header, String value) {
20+
public AddHeaderInterceptor(String header, String value) {
2121
this.header = header;
2222
this.value = value;
2323
}

perun-oidc-server/src/main/java/cz/muni/ics/oidc/server/claims/ClaimSourceInitContext.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ public String getProperty(String suffix, String defaultValue) {
4141
return properties.getProperty(propertyPrefix + "." + suffix, defaultValue);
4242
}
4343

44+
public Long getLongProperty(String suffix, Long defaultValue) {
45+
String propKey = propertyPrefix + '.' + suffix;
46+
String prop = properties.getProperty(propertyPrefix + "." + suffix);
47+
try {
48+
return Long.parseLong(prop);
49+
} catch (NumberFormatException e) {
50+
log.warn("Could not parse value '{}' for property '{}' as Long", prop, propKey);
51+
}
52+
return defaultValue;
53+
}
54+
4455
public JWTSigningAndValidationService getJwtService() {
4556
return jwtService;
4657
}

0 commit comments

Comments
 (0)