-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ClientID property is ignored when creating a new OAuth2 Client #924
Comments
Are you calling the SQLManager directly? The HTTP handler (aka REST API) calls a validator which in turn hydrates the client id based on both If you're calling the SQLManager directly please be aware that those are internals and they are not intended to be exposed/consumed by outside code. The respective storage structs are "dumb" - ie don't care about validation as the only source of data should be the REST handler. If this is in fact about the REST API then I'll investigate, otherwise this will be closed as wontfix. |
Apologies, the error occurs while using the Swagger Go SDK. I mistakenly believed the SQLManager example would be a minimal case. A more appropriate example would be
I have tested using |
Hm, first of all I really like the
Did I miss something here? I'll update the code nonetheless because I really like the |
Closes #924 Signed-off-by: arekkas <aeneas@ory.am>
See #927 |
Closes #924 Signed-off-by: arekkas <aeneas@ory.am>
That test case is using the |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When creating a new OAuth2 client using the
client.Client
struct, if an ID is specified it must currently be done via theID
property, while theClientID
property is ignored. This is counter to the documentation, which states thatID
is an alias ofClientID
, whereas the opposite appears to be true.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Results in a client with a generated UUID for a Client ID.
What is the expected behavior?
That ClientID be an accepted form of input for client IDs.
Which version of the software is affected?
v1.0.0-beta.6
Suggested Fix
Step 1: In github.com/ory/go-convenience/stringsx add a new convenience function called
Coalesce
(concept borrowed from SQL):Playground Link
Step 2: At
hydra/client/manager_sql.go
Line 205 in 694b483
This would maintain compatibility with existing applications, prioritizing the existing behavior, while enabling the
ClientID
option.The text was updated successfully, but these errors were encountered: