Skip to content

Commit f3c7523

Browse files
committed
Merge branch 'fix-ver-name' of https://github.com/djw8605/scitokens-cpp into djw8605-fix-ver-name
2 parents fe4525c + 83c383a commit f3c7523

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scitokens_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ friend class scitokens::Validator;
206206
m_claims["jti"] = jwt::claim(std::string(uuid_str));
207207

208208
if (m_serialize_profile == Profile::SCITOKENS_2_0) {
209-
m_claims["ver"] = jwt::claim(std::string("scitokens:2.0"));
209+
m_claims["ver"] = jwt::claim(std::string("scitoken:2.0"));
210210
auto iter = m_claims.find("aud");
211211
if (iter == m_claims.end()) {
212212
m_claims["aud"] = jwt::claim(std::string("ANY"));
@@ -312,7 +312,7 @@ class Validator {
312312
throw jwt::token_verification_exception("'ver' claim value must be a string (if present)");
313313
}
314314
std::string ver_string = claim.as_string();
315-
if (ver_string == "scitokens:2.0") {
315+
if ((ver_string == "scitokens:2.0") || (ver_string == "scitoken:2.0")) {
316316
must_verify_everything = false;
317317
if ((m_validate_profile != SciToken::Profile::COMPAT) &&
318318
(m_validate_profile != SciToken::Profile::SCITOKENS_2_0))

0 commit comments

Comments
 (0)