I have an application where the header needs to be send as Authorization: Bearer some-token. My question is how can I get the value of Authorization header within my yii2 application. Of course it will now Bearer some-token, can how can I get only the some-token value in yii2 way(I can do php str_replace) but if there is better way.
Also can someone explain how the HttpBeareAuth works does it compare the value in the header with the one in the database I keep on getting
{"name":"Unauthorized","message":"You are requesting with an invalid credential.","code":0,"status":401,"type":"yii\\web\\UnauthorizedHttpException"}
also does it get it from class user in common?