Skip to content

Add isAccessToken to determine _accessToken set #22

@FrancMunoz

Description

@FrancMunoz

Is it possible to add a function to know if access token is set?

public function isAccessToken()
{
  return $this->_accessToken ? true : false;
}

Since _accessToken is private, as it has to be, it would be great to know if it's set or not.

I did a script that does what's commented in #7 , basically a function I call to get phpParticle instance, when it returns, just calling isAccesToken() i know if getting token has gone fine or not without calling any _curlRequest function that will dramatically fail. The function takes care of token and its expiration and refreshes using refresh token.

I can make the PR if agree.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions