Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fluentRestClient: extend blob for addtional types #463

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"];
rafalgradziel marked this conversation as resolved.
Show resolved Hide resolved
if (contentType.includes("image") ||
blobTypes.some(type => contentType.includes(`application/${type}`))) {
return await res.blob();
}
}
Expand Down
Loading