Closed Ka0o0 closed 2 years ago
While I am in no way against making it private (you are not really supposed to use it and modifying it wasnt possible anyway) I don't really see a benefit in doing so 🤔
The change itself looks good to merge.
Hi Dominik, thank you for the quick response. Yes true. I was just considering this because the member was const but I also think it's fine to keep it protected as also the other fields are protected. Then I guess this PR is ready for merge.
Thanks for finding and fixing this. Great work. We might reconsider making this stuff private for the next major breaking release, but I'd like to avoid breaking changes (regardless how minor they are) unless we have to or there are already breaks anyway.
This removes the const specifier from the token member class so that objects of type jwt::decoded_token can be moved. IMO it is safe to do so as the variable is only exposed via
get_token
which returns a const reference to it.I'm unsure though in regards to whether or not to make it private. Currently is protected, making it private would then make it a breaking change.
This resolves #224 then.