Skip to content

Declare C++17 in CMake and implement scitokens-verify --profile - #225

Open
djw8605 wants to merge 2 commits into
scitokens:masterfrom
djw8605:chore/cxx17-cleanups
Open

Declare C++17 in CMake and implement scitokens-verify --profile#225
djw8605 wants to merge 2 commits into
scitokens:masterfrom
djw8605:chore/cxx17-cleanups

Conversation

@djw8605

@djw8605 djw8605 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Two small correctness cleanups:

CMake declares C++11, the code is C++17

target_compile_features(SciTokens PUBLIC cxx_std_11) — but the sources use structured bindings (json_to_claim_map in scitokens_internal.cpp, C++17) and std::make_unique (C++14). The project only compiles because modern compilers default to gnu++17; on a toolchain where the compile feature actually pins -std=c++11, the build fails. Declare cxx_std_17 to match reality (CMake minimum here is 3.10, which supports it).

scitokens-verify --profile was parsed but ignored

The tool documents -p | --profile Profile to enforce (wlcg, scitokens1, scitokens2, atjwt) and stores the value — then never uses it: every token was accepted under COMPAT rules regardless. Wire it up via scitoken_set_deserialize_profile + scitoken_deserialize_v2, with an error for unknown profile names.

Testing

  • Full make (library, CLI tools, tests) and ctest unit/env_config/monitoring suites pass.
  • scitokens-verify -p bogus now reports unknown token profile; valid profile names flow through deserialization.

🤖 Generated with Claude Code

djw8605 and others added 2 commits July 6, 2026 16:22
The build declared cxx_std_11, but the sources use C++17 features:
structured bindings in scitokens_internal.cpp (json_to_claim_map) and
std::make_unique (C++14) in the background refresh manager.  The
project only compiled because modern compilers default to gnu++17; on
a toolchain where the compile feature actually pins -std=c++11 the
build fails.  Declare cxx_std_17 to match reality.

scitokens-verify parsed a --profile option and documented it as
'Profile to enforce', but never used the value.  Wire it up through
scitoken_set_deserialize_profile / scitoken_deserialize_v2 so the tool
actually restricts the accepted token profile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@djw8605 djw8605 added the ai-gen label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant