Method Web.Auth.OAuth2.Base()->refresh_access_token()


Method refresh_access_token

string|zero refresh_access_token(string|zero oauth_token_uri, void|function(bool, string:void) async_cb)

Description

Refreshes the access token, if a refresh token exists in the object.

Parameter oauth_token_uri

Endpoint of the authentication service.

Parameter async_cb

If given an async request will be made and this function will be called when the request is finished. The first argument passed to the callback will be true or false depending on if the request was successfull or not. The second argument will be a string. If the request failed it will be an error message. If it succeeded it will be the result as a string encoded with encode_value().