@@ -252,7 +252,7 @@ std::shared_ptr<VPackBuilder> auth::TokenCache::parseJson(std::string const& str
252
252
253
253
bool auth::TokenCache::validateJwtHeader (std::string const & header) {
254
254
std::shared_ptr<VPackBuilder> headerBuilder =
255
- parseJson (StringUtils::decodeBase64 (header), " jwt header" );
255
+ parseJson (StringUtils::decodeBase64U (header), " jwt header" );
256
256
if (headerBuilder.get () == nullptr ) {
257
257
return false ;
258
258
}
@@ -287,7 +287,7 @@ bool auth::TokenCache::validateJwtHeader(std::string const& header) {
287
287
288
288
auth::TokenCache::Entry auth::TokenCache::validateJwtBody (std::string const & body) {
289
289
std::shared_ptr<VPackBuilder> bodyBuilder =
290
- parseJson (StringUtils::decodeBase64 (body), " jwt body" );
290
+ parseJson (StringUtils::decodeBase64U (body), " jwt body" );
291
291
if (bodyBuilder.get () == nullptr ) {
292
292
LOG_TOPIC (TRACE, Logger::AUTHENTICATION) << " invalid JWT body" ;
293
293
return auth::TokenCache::Entry::Unauthenticated ();
@@ -369,8 +369,8 @@ std::string auth::TokenCache::generateRawJwt(VPackSlice const& body) const {
369
369
headerBuilder.add (" typ" , VPackValue (" JWT" ));
370
370
}
371
371
372
- std::string fullMessage (StringUtils::encodeBase64 (headerBuilder.toJson ()) +
373
- " ." + StringUtils::encodeBase64 (body.toJson ()));
372
+ std::string fullMessage (StringUtils::encodeBase64U (headerBuilder.toJson ()) +
373
+ " ." + StringUtils::encodeBase64U (body.toJson ()));
374
374
if (_jwtSecret.empty ()) {
375
375
LOG_TOPIC (INFO, Logger::AUTHENTICATION)
376
376
<< " Using cluster without JWT Token" ;
0 commit comments