Skip to content

Commit

Permalink
Merge pull request #463 from rafalgradziel/flientRestClient_applicati…
Browse files Browse the repository at this point in the history
…onBlob

fluentRestClient: extend blob for addtional types
  • Loading branch information
Saibamen authored Dec 18, 2024
2 parents 184aea6 + 59571e8 commit d622640
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Gandalan.IDAS.Contracts/Token/JwtTokenService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -233,4 +233,4 @@ private static SigningCredentials GetSigningCredentials(string privateKey)
key: new RsaSecurityKey(rsa),
SecurityAlgorithms.RsaSha256Signature);
}
}
}
4 changes: 3 additions & 1 deletion WebLibs/api/fluentRestClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit d622640

Please sign in to comment.