mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
Merge pull request #3 from ThalmicRevane/fix_warnings
Fix warnings in JWT
This commit is contained in:
@@ -6,13 +6,12 @@ namespace jwt {
|
||||
namespace alphabet {
|
||||
struct base64 {
|
||||
static const std::array<char, 64>& data() {
|
||||
static std::array<char, 64> data = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
|
||||
};
|
||||
return data;
|
||||
static std::array<char, 64> data = {
|
||||
{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}};
|
||||
return data;
|
||||
};
|
||||
static const std::string& fill() {
|
||||
static std::string fill = "=";
|
||||
@@ -21,13 +20,12 @@ namespace jwt {
|
||||
};
|
||||
struct base64url {
|
||||
static const std::array<char, 64>& data() {
|
||||
static std::array<char, 64> data = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'
|
||||
};
|
||||
return data;
|
||||
static std::array<char, 64> data = {
|
||||
{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'}};
|
||||
return data;
|
||||
};
|
||||
static const std::string& fill() {
|
||||
static std::string fill = "%3d";
|
||||
@@ -167,4 +165,4 @@ namespace jwt {
|
||||
return res;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +70,10 @@ namespace jwt {
|
||||
namespace algorithm {
|
||||
|
||||
struct none {
|
||||
std::string sign(const std::string& data) const {
|
||||
std::string sign(const std::string&) const {
|
||||
return "";
|
||||
}
|
||||
void verify(const std::string& data, const std::string& signature) const {
|
||||
void verify(const std::string&, const std::string& signature) const {
|
||||
if (!signature.empty())
|
||||
throw signature_verification_exception();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user