locked
How to refesh_token in HttpClient(client). RRS feed

  • Question

  • User729207731 posted

    i have api when post token.

    {
        "access_token": "_aJTZlQ893kt0h1dUcyCf7knNG_MEhqoTCgvgwjBP9PlN8nUxdrD9JNqLaKE9WPwCEnPQVc9UmvEAF4zQXYOxTbosvMDydlZBkA-QE1yiC2tVaQ2rqV4zyfXi28x_TCaPQUtXB8T4gaJJo1dhHK3WIkbkQlaECBRCN5AGIdCIc24BXKgjT2aj7kmBKGP_Vco7vmtA9yDHC6hMIarzjCYtgNPHRk7O0djr-drfW2W_0VyZBZPFqcuAWtUJYzXwjmC",
        "token_type": "bearer",
        "expires_in": 3599,
        "refresh_token": "49985c1b-eb89-4e25-b296-364e6edc6a61",
        "userName": "admin",
        "roles": "[\"admins\",\"users\"]",
        ".issued": "Sun, 15 Oct 2017 12:28:42 GMT",
        ".expires": "Sun, 15 Oct 2017 13:28:42 GMT"
    }

    and expires_in one hour. now i want auto refesh token. How to do this, thanks many.

    Sunday, October 15, 2017 12:30 PM

All replies

  • User475983607 posted

    The refresh token is sent to the authentication server and the server returns a new token.  Of course, you must be using the proper flow for this to work as expected. 

    Unfortunately, there is no way to answer you question as we do not know if you built a home-grown token server or if you are using a framework.  You'll need to consult the documentation for the framework you are using or read the specs; RFC 6749.

    https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/

    Sunday, October 15, 2017 3:24 PM