mirror of
https://github.com/arun11299/cpp-jwt.git
synced 2025-05-14 16:58:34 +00:00
Some tests don't pass #14
This commit is contained in:
parent
672fb0c15d
commit
99d041deb9
1 changed files with 9 additions and 9 deletions
|
@ -425,10 +425,10 @@ std::error_code jwt_object::verify(
|
|||
{
|
||||
if (has_claim(registered_claims::issuer))
|
||||
{
|
||||
jwt::string_view p_issuer = payload()
|
||||
const std::string& p_issuer = payload()
|
||||
.get_claim_value<std::string>(registered_claims::issuer);
|
||||
|
||||
if (p_issuer.data() != dparams.issuer) {
|
||||
if (p_issuer != dparams.issuer) {
|
||||
ec = VerificationErrc::InvalidIssuer;
|
||||
return ec;
|
||||
}
|
||||
|
@ -443,10 +443,10 @@ std::error_code jwt_object::verify(
|
|||
{
|
||||
if (has_claim(registered_claims::audience))
|
||||
{
|
||||
jwt::string_view p_aud = payload()
|
||||
const std::string& p_aud = payload()
|
||||
.get_claim_value<std::string>(registered_claims::audience);
|
||||
|
||||
if (p_aud.data() != dparams.aud) {
|
||||
if (p_aud != dparams.aud) {
|
||||
ec = VerificationErrc::InvalidAudience;
|
||||
return ec;
|
||||
}
|
||||
|
@ -461,9 +461,9 @@ std::error_code jwt_object::verify(
|
|||
{
|
||||
if (has_claim(registered_claims::subject))
|
||||
{
|
||||
jwt::string_view p_sub = payload()
|
||||
const std::string& p_sub = payload()
|
||||
.get_claim_value<std::string>(registered_claims::subject);
|
||||
if (p_sub.data() != dparams.sub) {
|
||||
if (p_sub != dparams.sub) {
|
||||
ec = VerificationErrc::InvalidSubject;
|
||||
return ec;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue