diff --git a/Gandalan.IDAS.Contracts/Token/JwtTokenService.cs b/Gandalan.IDAS.Contracts/Token/JwtTokenService.cs index aa7bcf66..faba4ae0 100644 --- a/Gandalan.IDAS.Contracts/Token/JwtTokenService.cs +++ b/Gandalan.IDAS.Contracts/Token/JwtTokenService.cs @@ -54,8 +54,8 @@ public class JwtTokenService private const string ClaimIdasAuthToken = "idasAuthToken"; private const string ClaimRefreshToken = "refreshToken"; private const string ClaimTokenType = "type"; - private const string ClaimRole = "role"; - private const string ClaimRights = "rights"; + public static string ClaimRole = "role"; + public static string ClaimRights = "rights"; public JwtTokenService(DateTime? issuedAt = null) { @@ -233,4 +233,4 @@ private static SigningCredentials GetSigningCredentials(string privateKey) key: new RsaSecurityKey(rsa), SecurityAlgorithms.RsaSha256Signature); } -} \ No newline at end of file +} diff --git a/WebLibs/api/fluentRestClient.js b/WebLibs/api/fluentRestClient.js index 52b2a921..6ca5faa4 100644 --- a/WebLibs/api/fluentRestClient.js +++ b/WebLibs/api/fluentRestClient.js @@ -132,7 +132,9 @@ export function restClient() { return await res.json(); } - if (contentType.includes("image") || contentType.includes("application/pdf")) { + const blobTypes = ["pdf", "zip", "octet-stream"]; + if (contentType.includes("image") || + blobTypes.some(type => contentType.includes(`application/${type}`))) { return await res.blob(); } }