@dasniko I have reffer your video regarding Implementing Custom REST Resources (endpoints). while Authenticating the Bearer Token I’m getting null pointer exception.
This is the way to authenticate the Bearer token,
AuthResult authResult = new AppAuthManager.BearerTokenAuthenticator(session).authenticate();
You just provided one line of sourcecode, without anything else.
Where exactly does the NPE occur? Which object is null (not only the line!)?
How does your request looks like?
…???
Again, you just provided some source code. Not the information I asked for.
No information where exactly the NPE occurs (which object is null), no information about the request you are doing.
Without that, I can’t help, I can only guess, but that’s not my approach to help. So, please provide the proper information. Thanks for you understanding.
Ok, if authResult is null, the NPE does not occur in the mentioned line, but after that. That’s a big difference, as null is a valid result of checking the authentication!
As you wrote, you are referencing to my code, you should have seen that there is a null-check in my code:
AuthResult is null when there’s no, or a non-valid authorization header provided in your request.