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

Commit

Permalink
Merge pull request #70 from dBucik/bbmri_ga4gh_passports
Browse files Browse the repository at this point in the history
Bbmri ga4gh passports
  • Loading branch information
Dominik František Bučík authored Dec 6, 2021
2 parents 698777f + b9f5c4d commit faa7260
Show file tree
Hide file tree
Showing 13 changed files with 1,055 additions and 629 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true"
import="cz.muni.ics.oidc.server.elixir.GA4GHClaimSource" %>
import="cz.muni.ics.oidc.server.ga4gh.Ga4ghPassportAndVisaClaimSource" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
Expand Down Expand Up @@ -53,7 +53,7 @@
<c:forEach var="subValue" items="${claim.value}">
<c:choose>
<c:when test="${claim.key=='ga4gh_passport_v1'}">
<li><%= GA4GHClaimSource.parseAndVerifyVisa(
<li><%= Ga4ghPassportAndVisaClaimSource.parseAndVerifyVisa(
(String) jspContext.findAttribute("subValue")).getPrettyString() %></li>
</c:when>
<c:otherwise>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%@ page import="cz.muni.ics.oidc.server.elixir.GA4GHClaimSource" %>
<%@ page import="cz.muni.ics.oidc.server.ga4gh.ElixirGa4ghClaimSource" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cz.muni.ics.oidc.server.elixir;
package cz.muni.ics.oidc.server;

import java.io.IOException;
import org.springframework.http.HttpRequest;
Expand All @@ -12,12 +12,12 @@
*
* @author Martin Kuba <[email protected]>
*/
class AddHeaderInterceptor implements ClientHttpRequestInterceptor {
public class AddHeaderInterceptor implements ClientHttpRequestInterceptor {

private final String header;
private final String value;

AddHeaderInterceptor(String header, String value) {
public AddHeaderInterceptor(String header, String value) {
this.header = header;
this.value = value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ public String getProperty(String suffix, String defaultValue) {
return properties.getProperty(propertyPrefix + "." + suffix, defaultValue);
}

public Long getLongProperty(String suffix, Long defaultValue) {
String propKey = propertyPrefix + '.' + suffix;
String prop = properties.getProperty(propertyPrefix + "." + suffix);
try {
return Long.parseLong(prop);
} catch (NumberFormatException e) {
log.warn("Could not parse value '{}' for property '{}' as Long", prop, propKey);
}
return defaultValue;
}

public JWTSigningAndValidationService getJwtService() {
return jwtService;
}
Expand Down
Loading

0 comments on commit faa7260

Please sign in to comment.