Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement disconnect method #32

Open
jbardnz opened this issue Jun 11, 2020 · 2 comments
Open

Implement disconnect method #32

jbardnz opened this issue Jun 11, 2020 · 2 comments

Comments

@jbardnz
Copy link

jbardnz commented Jun 11, 2020

Hey,

The calcinai/xero-php package has added a disconnect() which is required by Xero on OAuth2 applications: https://developer.xero.com/documentation/oauth2/auth-flow#disconnect

The disconnect method is documented at the bottom of this example: https://github.com/calcinai/xero-php/blob/9b248a1b27d026d8265975354afeb2c2be978c45/examples/demo.php

Are you able to add this method to this package as well?

@kamleshDefsys
Copy link

kamleshDefsys commented Sep 15, 2020

Hello.

Can we please add this method in LangleyFoxall\XeroLaravel\OAuth2.php and upgrade the package ?

public function disconnect(AccessTokenInterface $accessToken,$connectionId)
    {
        return $this->getProvider()->disconnect($accessToken,$connectionId);
    }

temporary solution to override this file until package is updated.
update composer.json
with this two lines
--exclude-from-classmap
--files

copy the file into app/Overrides/ folder without changing the namesapce.

"autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "exclude-from-classmap": ["vendor/langleyfoxall/xero-laravel/src/OAuth2.php"],
        "files": ["app/Overrides/OAuth2.php"]
    },

finally don't forget to run the composer dump-autoload.

@acirinelli
Copy link

acirinelli commented Jul 11, 2022

#56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants