We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d0a5ce commit 732e466Copy full SHA for 732e466
src/verify.cpp
@@ -0,0 +1,21 @@
1
+#include <iostream>
2
+
3
+#include "scitokens.h"
4
5
+int main(int argc, const char** argv) {
6
+ if (argc < 2) {
7
+ std::cerr << "Usage: " << argv[0] << " (TOKEN)" << std::endl;
8
+ return 1;
9
+ }
10
+ std::string token(argv[1]);
11
12
+ SciToken scitoken;
13
+ char *err_msg = nullptr;
14
+ if (scitoken_deserialize(token.c_str(), &scitoken, &err_msg)) {
15
+ std::cout << "Failed to deserialize a token: " << err_msg << std::endl;
16
17
18
+ std::cout << "Token deserialization successful." << std::endl;
19
+ return 0;
20
+}
21
0 commit comments