jeffw16 / JWTAuth

Adds support for using JSON Web Tokens to log in to MediaWiki.
MIT License
3 stars 5 forks source link

mod 'get raw JWT' to support Authorization header #2

Closed olsonjaredm closed 1 year ago

olsonjaredm commented 1 year ago

This modification to JWTLogin allows it to receive JWT data from either the Authorization header or POST data. The new code first checks if the Authorization header is present and if so, extracts the JWT from it. If the header is not present, it checks if the POST data contains a JWT. If a JWT is found in either location, it is used to authenticate the user.