-
Notifications
You must be signed in to change notification settings - Fork 36
Make the parameter "realm" optional #173
Copy link
Copy link
Open
Description
Currently, each call needs a parameter "realm" as first argument. As we only have one realm we are working with (we do not use the master realm), this parameter does not make lot of sense for us. As the realm is already defined in the httpClient, it could be taken from there and overwritten if necessary.
So my proposal would be as follows:
public function get(string $userId, ?string $realm = null): UserRepresentation
{
$realm = $this->getRealm($realm);
....
and, in Resource.php
public function getRealm(string|null $realm): string
{
if (!$realm) {
return $this->realm;
}
return $realm;
}
I can try to create a merge request, but as it will be a breaking change, I want to ask first. Maybe there is also a better approach to solve the problem.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels