moved resource server access token retrieval into callback; added phpdoc