Refactor use Entity#get_token_from_params_or_headers

And remove redundant `get_token_from_params_or_headers`
Refactor use Entity#get_identifier_from_params_or_headers

And remove redundant `get_identifier_from_params_or_headers`