----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56667/#review167186 -----------------------------------------------------------
Sorry for not noticing this before: since this is a libprocess patch, all function and variable names should be in snake_case. CamelCase is used only for struct/class names in libprocess. 3rdparty/libprocess/src/jwt.cpp Lines 36 (patched) <https://reviews.apache.org/r/56667/#comment239352> Could we make this a private member function? 3rdparty/libprocess/src/jwt.cpp Lines 54 (patched) <https://reviews.apache.org/r/56667/#comment239353> This could be a private member function as well? Also, should use snake_case in libprocess for function/variable names I believe. See note at top of review. 3rdparty/libprocess/src/jwt.cpp Lines 59-60 (patched) <https://reviews.apache.org/r/56667/#comment239354> Fits on one line. 3rdparty/libprocess/src/jwt.cpp Lines 67 (patched) <https://reviews.apache.org/r/56667/#comment239370> As long as you're touching these, maybe names like `typ_json` would be more descriptive? 3rdparty/libprocess/src/jwt.cpp Lines 91 (patched) <https://reviews.apache.org/r/56667/#comment239356> Does this need to be an `Option`? Looks like it could just be `JWT::Alg alg;`. 3rdparty/libprocess/src/jwt.cpp Lines 94-95 (patched) <https://reviews.apache.org/r/56667/#comment239355> Join on one line: `} else if ( ... ) {` Could also use a `switch` statement here instead. 3rdparty/libprocess/src/jwt.cpp Lines 126-127 (patched) <https://reviews.apache.org/r/56667/#comment239372> Fits on one line. 3rdparty/libprocess/src/jwt.cpp Lines 173-175 (patched) <https://reviews.apache.org/r/56667/#comment239374> Could fit onto just two lines. - Greg Mann On Feb. 27, 2017, 11:37 a.m., Jan Schlicht wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56667/ > ----------------------------------------------------------- > > (Updated Feb. 27, 2017, 11:37 a.m.) > > > Review request for mesos, Alexander Rojas and Greg Mann. > > > Bugs: MESOS-7001 > https://issues.apache.org/jira/browse/MESOS-7001 > > > Repository: mesos > > > Description > ------- > > JSON Web Tokens can be used to create claim-based access tokens and is > typically used for HTTP authentication. > This implementation is intended for internal use, e.g. Mesos is supposed > to only parse tokens that it also created. It doesn't fully comply with > RFC 7519. Currently the only supported cryptographic algorithm is HMAC > with SHA-256. > > > Diffs > ----- > > 3rdparty/libprocess/Makefile.am 75386184108214e67a58c328258ec204099d638c > 3rdparty/libprocess/include/process/jwt.hpp PRE-CREATION > 3rdparty/libprocess/src/jwt.cpp PRE-CREATION > 3rdparty/libprocess/src/tests/jwt_tests.cpp PRE-CREATION > > > Diff: https://reviews.apache.org/r/56667/diff/4/ > > > Testing > ------- > > make check > > > Thanks, > > Jan Schlicht > >
