Trioxidation / Triox

A free file hosting server that focuses on speed, reliability and security.
GNU Affero General Public License v3.0
100 stars 14 forks source link

Tests for JWT extractor #10

Closed AaronErhardt closed 3 years ago

AaronErhardt commented 3 years ago

Tests for the extractor in jwt.rs which extracts the JWT as String from the request headers. There should be multiple tests for the from_request method of the JWT struct whether it can properly extract the JWT and whether it can detect error cases correctly. The api documentation describes how a correct request with an authorization or cookie header should look like. The extraction of the claims itself can be assumed to be correct because they are done by the jsonwebtoken crate.

List of possible test scenarios:

realaravinth commented 3 years ago

closing because we no longer use jwt