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

Invalid authentication type #8

Closed
agaleski opened this issue Aug 14, 2016 · 7 comments
Closed

Invalid authentication type #8

agaleski opened this issue Aug 14, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@agaleski
Copy link

agaleski commented Aug 14, 2016

The last update changed src/Webservice/Driver/Twitter.php to solve some test issues.

This leads to the following error when trying to use the controller example from the README:

Invalid authentication type CvoTechnologies/Twitter.Twitter

I fixed it temporary for me by changing src/Webservice/Driver/Twitter.php on line 31 from:

'type' => 'CvoTechnologies/Twitter.Twitter',

to:

'type' => 'oauth',

But this should be checked and fixed. I did not have a look on the results of the tests so far.

@Marlinc
Copy link
Contributor

Marlinc commented Aug 14, 2016

Thank you for reporting the issue.

On what version of CakePHP is this?

@agaleski
Copy link
Author

CakePHP : v3.3.0
PHP : 7.0.8-0ubuntu0.16.04.2

@agaleski
Copy link
Author

agaleski commented Aug 14, 2016

And the Controller in the Readme is missing a line too:

I had to add
$this->modelFactory('Endpoint', ['Muffin\Webservice\Model\EndpointRegistry', 'get']);
before
$this->loadModel('CvoTechnologies/Twitter.Statuses', 'Endpoint');
to avoid the Error:

Unknown repository type "Endpoint". Make sure you register a type before trying to use it.

But besides that, it works just like a charm.
Nice peace of code 👍

@Marlinc
Copy link
Contributor

Marlinc commented Aug 14, 2016

That shouldn't be necessary as the Webservice plugin tries to load it before the controller starts. Do you load the bootstrap file when loading the Webservice plugin as shown in the readme?

@Marlinc
Copy link
Contributor

Marlinc commented Aug 14, 2016

A new version has been released that fixes this issue.

@Marlinc Marlinc added the bug label Aug 14, 2016
@Marlinc Marlinc self-assigned this Aug 14, 2016
@Marlinc Marlinc added this to the 1.2.0 milestone Aug 14, 2016
@Marlinc
Copy link
Contributor

Marlinc commented Aug 14, 2016

Good to hear that you like it! 👍

@agaleski
Copy link
Author

That shouldn't be necessary as the Webservice plugin tries to load it before the controller starts.
That might have been my issue.

Anyways, I did my composer update and your new version works without any error for me. :)

Thanks for your quick fix.

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

No branches or pull requests

2 participants