Skip to content

Problem with configuration generic client #186

Open
@bas4555

Description

@bas4555

Problem with configuration generic ouath2-client: https://github.com/ekapusta/oauth2-esia

This client requires data (signer) in collaborators array in Provider construct

public function __construct(array $options = [], array $collaborators = [])
    {
        parent::__construct($options, $collaborators);
        if (!filter_var($this->remoteUrl, FILTER_VALIDATE_URL)) {
            throw new InvalidArgumentException('Remote URL is not provided!');
        }
        if (!file_exists($this->remoteCertificatePath)) {
            throw new InvalidArgumentException('Remote certificate is not provided!');
        }

        if (isset($collaborators['signer']) && $collaborators['signer'] instanceof SignerInterface) {
            $this->signer = $collaborators['signer'];
            $this->encoder = new Encoder();
        } else {
            throw new InvalidArgumentException('Signer is not provided!');
        }
    }

But through parameters in the yaml file, I can pass only the provider_options array. Is it possible to pass collaborators array with signer?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions