Skip to content

OAuth2ServerFactory is not returning instance of OAuth2\Server #14

@weierophinney

Description

@weierophinney

The ZF\OAuth2\Factory\OAuth2ServerFactory is no longer returning a OAuth2\Server instance?

https://github.com/zfcampus/zf-oauth2/blob/master/src/Factory/OAuth2ServerFactory.php

The file has been changed in the latest version and it returns a closure (Factory!?) now. My code is broken since I simply used $serviceLocator->get('ZF\OAuth2\Service\OAuth2Server'); elsewhere to get the OAuth2\Server instance from the server manager.

The documentation has also not been updated accordingly and is no longer up to date since it still states it will give me an OAuth\Server.

Is returning another factory from a factory really the way to go? How should I now get my oauth server instance? Is it maybe possible to separate the keys so getting the server is still possible?


Originally posted by @Wilt at zfcampus/zf-oauth2#114

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