Skip to content

Commit 6fed66d

Browse files
Corrected a few typos (#297)
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
1 parent ad08c68 commit 6fed66d

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

.github/workflows/cross-platform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: choco install openssl
1818

1919
- if: matrix.os == 'macos-latest'
20-
run: cp /usr/local/opt/openssl@1.1/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/
20+
run: sudo cp /usr/local/opt/openssl@1.1/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/
2121

2222
- uses: actions/checkout@v3
2323
- run: cmake -E make_directory ${{ github.workspace }}/build

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ elseif(${JWT_SSL_LIBRARY} MATCHES "LibreSSL")
5959
elseif(${JWT_SSL_LIBRARY} MATCHES "wolfSSL")
6060
find_package(PkgConfig REQUIRED)
6161
pkg_check_modules(wolfssl REQUIRED IMPORTED_TARGET wolfssl)
62-
list(TRANSFORM wolfssl_INCLUDE_DIRS APPEND "/wolfssl") # This is required to access OpenSSL compatability API
62+
list(TRANSFORM wolfssl_INCLUDE_DIRS APPEND "/wolfssl") # This is required to access OpenSSL compatibility API
6363
endif()
6464

6565
if(JWT_EXTERNAL_PICOJSON)
@@ -114,7 +114,7 @@ endif()
114114

115115
if(${JWT_SSL_LIBRARY} MATCHES "wolfSSL")
116116
target_link_libraries(jwt-cpp INTERFACE PkgConfig::wolfssl)
117-
# This is required to access OpenSSL compatability API
117+
# This is required to access OpenSSL compatibility API
118118
target_include_directories(jwt-cpp INTERFACE ${wolfssl_INCLUDE_DIRS})
119119
target_compile_definitions(jwt-cpp INTERFACE OPENSSL_EXTRA OPENSSL_ALL)
120120
endif()

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jwt::basic_claim<my_favorite_json_library_traits> claim(json::object({{"json", t
6868
6969
This allows for complete freedom when picking which libraries you want to use. For more information, [read this page](docs/traits.md)).
7070
71-
For your convience there are serval traits implementation which provide some popular JSON libraries. They are:
71+
For your convenience there are serval traits implementation which provide some popular JSON libraries. They are:
7272
7373
[![picojson][picojson]](https://github.com/kazuho/picojson)
7474
[![nlohmann][nlohmann]](https://github.com/nlohmann/json)
@@ -82,7 +82,7 @@ For your convience there are serval traits implementation which provide some pop
8282
8383
In order to maintain compatibility, [picojson](https://github.com/kazuho/picojson) is still used to provide a specialized `jwt::claim` along with all helpers. Defining `JWT_DISABLE_PICOJSON` will remove this optional dependency. It's possible to directly include the traits defaults for the other JSON libraries. See the [traits examples](https://github.com/Thalhammer/jwt-cpp/tree/master/example/traits) for details.
8484
85-
As for the base64 requirements of JWTs, this libary provides `base.h` with all the required implentation; However base64 implementations are very common, with varying degrees of performance. When providing your own base64 implementation, you can define `JWT_DISABLE_BASE64` to remove the jwt-cpp implementation.
85+
As for the base64 requirements of JWTs, this library provides `base.h` with all the required implementation; However base64 implementations are very common, with varying degrees of performance. When providing your own base64 implementation, you can define `JWT_DISABLE_BASE64` to remove the jwt-cpp implementation.
8686
8787
### Getting Started
8888

cmake/jwt-cpp-config.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include(CMakeFindDependencyMacro)
77
if(${JWT_SSL_LIBRARY} MATCHES "wolfSSL")
88
find_dependency(PkgConfig REQUIRED)
99
pkg_check_modules(wolfssl REQUIRED IMPORTED_TARGET wolfssl)
10-
list(TRANSFORM wolfssl_INCLUDE_DIRS APPEND "/wolfssl") # This is required to access OpenSSL compatability API
10+
list(TRANSFORM wolfssl_INCLUDE_DIRS APPEND "/wolfssl") # This is required to access OpenSSL compatibility API
1111
else()
1212
find_dependency(${JWT_SSL_LIBRARY} REQUIRED)
1313
endif()

docs/faqs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is the expected behaviour. While the integrity of tokens is ensured by the
88
the contents of the token are only **encoded and not encrypted**. This means you can be sure the token
99
has not been modified by an unauthorized party, but you should not store confidential information in it.
1010
Anyone with access to the token can read all the claims you put into it. They can however not modify
11-
them unless they have the (private or symetric) key used to generate the token. If you need to put
11+
them unless they have the (private or symmetric) key used to generate the token. If you need to put
1212
confidential information into it, current industry recommends generating a random id and store the data on your
1313
server, using the id to look it up whenever you need.
1414

@@ -54,7 +54,7 @@ This was brought up in [#212](https://github.com/Thalhammer/jwt-cpp/issues/212#i
5454
[#101](https://github.com/Thalhammer/jwt-cpp/issues/101) as it's an excellent question.
5555
5656
It simply was not required to handle the required keys in JWTs for signing or verification. All the the mandatory keys are numeric,
57-
string or arrary types which required type definitions and access.
57+
string or array types which required type definitions and access.
5858
5959
The alternative is to use the `to_json()` method and use the libraries own APIs to pick the data type you need.
6060

docs/ssl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ cmake . -DJWT_SSL_LIBRARY:STRING=wolfSSL
1515

1616
## Notes
1717

18-
JWT-CPP relies on the OpenSSL API, as a result both LibreSSL and wolfSSL need to include their respective compatability layers.
18+
JWT-CPP relies on the OpenSSL API, as a result both LibreSSL and wolfSSL need to include their respective compatibility layers.
1919
Most system already have OpenSSL so it's important to make sure when compiling your application it only includes one. Otherwise you may have missing symbols when linking.

example/traits/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Traits Examples
22

3-
These example require upstream CMake installation to work. There are expections:
3+
These example require upstream CMake installation to work. There are exceptions:
44

55
- For Boost.JSON headers must be located by custom CMake.
66
- For PicoJSON headers must be located by custom CMake.

include/jwt-cpp/jwt.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ namespace jwt {
493493
*
494494
* \param certstr String containing the certificate encoded as pem
495495
* \param pw Password used to decrypt certificate (leave empty if not encrypted)
496-
* \param ec error_code for error_detection (gets cleared if no error ocurred)
496+
* \param ec error_code for error_detection (gets cleared if no error occurred)
497497
*/
498498
inline std::string extract_pubkey_from_cert(const std::string& certstr, const std::string& pw,
499499
std::error_code& ec) {
@@ -547,7 +547,7 @@ namespace jwt {
547547
* \brief Convert the certificate provided as DER to PEM.
548548
*
549549
* \param cert_der_str String containing the certificate encoded as base64 DER
550-
* \param ec error_code for error_detection (gets cleared if no error occures)
550+
* \param ec error_code for error_detection (gets cleared if no error occurs)
551551
*/
552552
inline std::string convert_der_to_pem(const std::string& cert_der_str, std::error_code& ec) {
553553
ec.clear();
@@ -589,7 +589,7 @@ namespace jwt {
589589
*
590590
* \param cert_base64_der_str String containing the certificate encoded as base64 DER
591591
* \param decode The function to decode the cert
592-
* \param ec error_code for error_detection (gets cleared if no error occures)
592+
* \param ec error_code for error_detection (gets cleared if no error occurs)
593593
*/
594594
template<typename Decode>
595595
std::string convert_base64_der_to_pem(const std::string& cert_base64_der_str, Decode decode,
@@ -643,7 +643,7 @@ namespace jwt {
643643
* (here)[https://tools.ietf.org/html/rfc7517#section-4.7]
644644
*
645645
* \param cert_base64_der_str String containing the certificate encoded as base64 DER
646-
* \param ec error_code for error_detection (gets cleared if no error occures)
646+
* \param ec error_code for error_detection (gets cleared if no error occurs)
647647
*/
648648
inline std::string convert_base64_der_to_pem(const std::string& cert_base64_der_str, std::error_code& ec) {
649649
auto decode = [](const std::string& token) {
@@ -675,7 +675,7 @@ namespace jwt {
675675
*
676676
* \param key String containing the certificate encoded as pem
677677
* \param password Password used to decrypt certificate (leave empty if not encrypted)
678-
* \param ec error_code for error_detection (gets cleared if no error occures)
678+
* \param ec error_code for error_detection (gets cleared if no error occurs)
679679
*/
680680
inline evp_pkey_handle load_public_key_from_string(const std::string& key, const std::string& password,
681681
std::error_code& ec) {
@@ -729,7 +729,7 @@ namespace jwt {
729729
*
730730
* \param key String containing a private key as pem
731731
* \param password Password used to decrypt key (leave empty if not encrypted)
732-
* \param ec error_code for error_detection (gets cleared if no error occures)
732+
* \param ec error_code for error_detection (gets cleared if no error occurs)
733733
*/
734734
inline evp_pkey_handle load_private_key_from_string(const std::string& key, const std::string& password,
735735
std::error_code& ec) {
@@ -770,7 +770,7 @@ namespace jwt {
770770
*
771771
* \param key String containing the certificate encoded as pem
772772
* \param password Password used to decrypt certificate (leave empty if not encrypted)
773-
* \param ec error_code for error_detection (gets cleared if no error occures)
773+
* \param ec error_code for error_detection (gets cleared if no error occurs)
774774
*/
775775
inline evp_pkey_handle load_public_ec_key_from_string(const std::string& key, const std::string& password,
776776
std::error_code& ec) {
@@ -825,7 +825,7 @@ namespace jwt {
825825
*
826826
* \param key String containing a private key as pem
827827
* \param password Password used to decrypt key (leave empty if not encrypted)
828-
* \param ec error_code for error_detection (gets cleared if no error occures)
828+
* \param ec error_code for error_detection (gets cleared if no error occurs)
829829
*/
830830
inline evp_pkey_handle load_private_ec_key_from_string(const std::string& key, const std::string& password,
831831
std::error_code& ec) {
@@ -1972,7 +1972,7 @@ namespace jwt {
19721972
// TODO(prince-chrismc): I am not convienced this is meaningful anymore
19731973
static_assert(
19741974
value,
1975-
"object_type must implementate the subscription operator '[]' taking string_type as an arguement");
1975+
"object_type must implementate the subscription operator '[]' taking string_type as an argument");
19761976
};
19771977

19781978
template<typename object_type, typename value_type, typename string_type>
@@ -2148,14 +2148,14 @@ namespace jwt {
21482148

21492149
/**
21502150
* Serialize claim to output stream from wrapped JSON value
2151-
* \return ouput stream
2151+
* \return output stream
21522152
*/
21532153
std::ostream& operator<<(std::ostream& os) { return os << val; }
21542154

21552155
/**
21562156
* Get type of contained JSON value
21572157
* \return Type
2158-
* \throw std::logic_error An internal error occured
2158+
* \throw std::logic_error An internal error occurred
21592159
*/
21602160
json::type get_type() const { return json_traits::get_type(val); }
21612161

@@ -2427,7 +2427,7 @@ namespace jwt {
24272427
public:
24282428
using basic_claim_t = basic_claim<json_traits>;
24292429
/**
2430-
* Check if algortihm is present ("alg")
2430+
* Check if algorithm is present ("alg")
24312431
* \return true if present, false otherwise
24322432
*/
24332433
bool has_algorithm() const noexcept { return has_header_claim("alg"); }
@@ -2497,7 +2497,7 @@ namespace jwt {
24972497
template<typename json_traits>
24982498
class decoded_jwt : public header<json_traits>, public payload<json_traits> {
24992499
protected:
2500-
/// Unmodifed token, as passed to constructor
2500+
/// Unmodified token, as passed to constructor
25012501
typename json_traits::string_type token;
25022502
/// Header part decoded from base64
25032503
typename json_traits::string_type header;
@@ -2871,7 +2871,7 @@ namespace jwt {
28712871
// The configured default leeway for this verification
28722872
size_t default_leeway{0};
28732873

2874-
// The claim key to apply this comparision on
2874+
// The claim key to apply this comparison on
28752875
typename json_traits::string_type claim_key{};
28762876

28772877
// Helper method to get a claim from the jwt in this context
@@ -3171,7 +3171,7 @@ namespace jwt {
31713171
* Check is casesensitive.
31723172
*
31733173
* \param type Type Header Parameter to check for.
3174-
* \param locale Localization functionality to use when comapring
3174+
* \param locale Localization functionality to use when comparing
31753175
* \return *this to allow chaining
31763176
*/
31773177
verifier& with_type(const typename json_traits::string_type& type, std::locale locale = std::locale{}) {
@@ -3432,7 +3432,7 @@ namespace jwt {
34323432
bool has_key_operations() const noexcept { return has_jwk_claim("key_ops"); }
34333433

34343434
/**
3435-
* Check if algortihm is present ("alg")
3435+
* Check if algorithm is present ("alg")
34363436
* \return true if present, false otherwise
34373437
*/
34383438
bool has_algorithm() const noexcept { return has_jwk_claim("alg"); }

0 commit comments

Comments
 (0)