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

Fix oidc client id on detail page #229

Merged
merged 1 commit into from
Jan 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,10 @@ public function getAcsLocation()
*/
public function getEntityId()
{
return $this->entityId;
if ($this->getProtocol() !== DomainEntity::TYPE_OPENID_CONNECT) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not completely sold on the str_replace '://', '@//' occurrences popping up in the code in several places. What bothers me the most is that this is not really semantically sound. You are not getting an entity id, but a client id.

As this is just cosmetically, we could think about making a Twig filter that displays the entity id as a client id.

Feel free to postpone this change for now, but it just doesn't sit right with me.

Copy link
Contributor Author

@pablothedude pablothedude Jan 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is not the best solution. However it is a lso not a clientId because when an OIDC entity is a draft the clientId is the entityId, only after it's pushed to manage it's replaced. I think the the current solution will be sufficient becasue it should be a temporary solution.

return $this->entityId;
}
return str_replace('://', '@//', $this->entityId);
}

/**
Expand Down