Skip to content

fix ApiClient.setAccessToken #225

@christian-frei

Description

@christian-frei

currently the method is of no use:

  /**
   * Helper method to set access token for the first OAuth2 authentication.
   *
   * @param accessToken Access token
   */
  public void setAccessToken(String accessToken) {
    throw new RuntimeException("No OAuth2 authentication configured!");
  }

I propose to make it a convenience method as follows:

  public void setAccessToken(String accessToken) {
    this.addDefaultHeader("Authorization", "Bearer " + accessToken);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions