Skip to content

Allow Refresh/Update of Management Api Token #131

@sean-91

Description

@sean-91

As it stands there appears to be no easy way to refresh the apiToken of a ManagementApi. Since the token used here has an expiration, a new ManagementApi requires instantiating with a new valid token when this occurs.

The problem arises with the use of the OkHttpClient instantiated with a ManagementApi. This leads to a memory leak, as each successive ManagementApi creates a new OkHttpClient that is never cleaned up.

A similar issue was addressed here: square/okhttp#2846

A setter for the apiToken would alleviate this issue, allowing it to be updated without the need to re-instantiate the ManagementApi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions