Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Fixed the parameter name
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-dev004 committed Mar 7, 2022
1 parent d43a660 commit 22ac59a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public Task<string> VerifyAsync(V1EventLogRequest eventLogRequest)
return GetSafetyNetAttestationAsync(nonce);
}

public bool IsErrorPayload(string jwsResult)
public bool IsErrorPayload(string token)
{
try
{
var jwt = new JwtSecurityToken(jwsResult);
var jwt = new JwtSecurityToken(token);
var payloadJson = jwt.Payload.SerializeToJson();

var error = JObject.Parse(payloadJson).Value<string>("error");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public async Task<string> VerifyAsync(V1EventLogRequest _)
return Convert.ToBase64String(token.ToArray());
}

public bool IsErrorPayload(string jwsResult)
public bool IsErrorPayload(string token)
=> false;
}
}
2 changes: 1 addition & 1 deletion Covid19Radar/Covid19Radar/Services/IDeviceVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public interface IDeviceVerifier

Task<string> VerifyAsync(V1EventLogRequest eventLogRequest);

bool IsErrorPayload(string jwsResult);
bool IsErrorPayload(string token);
}
}

0 comments on commit 22ac59a

Please sign in to comment.