Skip to content

Add client scope CRUD#43

Merged
looorent merged 11 commits intolooorent:mainfrom
AaronCDee:add-client-scope-crud
Mar 27, 2026
Merged

Add client scope CRUD#43
looorent merged 11 commits intolooorent:mainfrom
AaronCDee:add-client-scope-crud

Conversation

@AaronCDee
Copy link
Copy Markdown
Contributor

This PR adds client scope CRUD to manage scopes for a given realm.

Please take a look and let me know what you think.

@AaronCDee
Copy link
Copy Markdown
Contributor Author

@looorent No worries about the other one. I just realized today that authz scopes were not the same as client scopes, so that's on me :).

I've also changed the client for protocol mappers to use save instead of update. It brings that client in-line with the other clients in the gem. :)

rep.description = hash["description"]
rep.protocol = hash["protocol"]
rep.attributes = hash["attributes"]
rep.protocolMappers = (hash["protocolMappers"] || []).map { |m| ProtocolMapperRepresentation.from_hash(m) }
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why did you use camel case on the Representation?
They are supposed to be snake case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahh, I thought so... I saw that in the protocol_mapper_representation that it uses camel case for protocolMapper, so I wanted to remain consistent with the naming. I'll adjust to use snake case, thanks. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would you like me to fix the protocol_mapper_representation while I'm at it? :)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This would create a breaking change. This is not ideal but I think this is better to keep the (wrong) old protocolMappers as it is, and change the new one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, cool, thanks. I've added the adjustment. This one should be ready to go. :)

@looorent looorent merged commit 308e9e6 into looorent:main Mar 27, 2026
1 check passed
@looorent
Copy link
Copy Markdown
Owner

Thanks for your contributions, @AaronCDee !
This is now available in version 1.1.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants