Skip to content

Commit 83c383a

Browse files
committed
Change scitoken profile name to match spec, scitoken:2.0
Original: scitokens:2.0 Spec: scitoken:2.0 Fixes #40
1 parent 6870564 commit 83c383a

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"] = std::string(uuid_str);
207207

208208
if (m_serialize_profile == Profile::SCITOKENS_2_0) {
209-
m_claims["ver"] = std::string("scitokens:2.0");
209+
m_claims["ver"] = std::string("scitoken:2.0");
210210
auto iter = m_claims.find("aud");
211211
if (iter == m_claims.end()) {
212212
m_claims["aud"] = 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)