-
Notifications
You must be signed in to change notification settings - Fork 16
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
maint(authd): Expose public API to build and parse UI layouts #788
base: main
Are you sure you want to change the base?
Conversation
case UIQrCode: | ||
return QrCode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't rename these on purpose (I didn't want to change behavior), but I think it's now a good moment for doing it... So likely this should be now called externally WebAuth
or something similar (I wouldn't call it device auth since that's not dependent on any device per se, but rather on a web authentication triggered through the content URI).
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #788 +/- ##
==========================================
- Coverage 83.43% 83.13% -0.31%
==========================================
Files 83 101 +18
Lines 8689 9880 +1191
Branches 74 74
==========================================
+ Hits 7250 8214 +964
- Misses 1111 1277 +166
- Partials 328 389 +61 ☔ View full report in Codecov by Sentry. |
ef7ff7f
to
e2f8737
Compare
e2f8737
to
8c84e44
Compare
8c84e44
to
20d567f
Compare
We may want to expose some proto types externally, but these needs to be sanitized so that they don't include any type we may not want to expose. At the same time we want to have automatic conversion without having to deal maintaining generated code... So here it is the types-parser: - It introspects types given the parameters provided - Generates a list of types - Creates functions wrappers and conversion functions
…se them We use to create UI options manually and converting them to maps for being transferred via DBus, it's something we also need to do in the broker side, so let's expose this publicly for being reused by brokers too
If some values are unset, there's no point to expose them to the brokers
Now that it has been tested with the manually generated version we can use the utility functions.
It can be useful for brokers to handle the received messages
…layouts It adds a convenient way to handle the value as a native type.
These can be used by brokers and authd to parse the results back and forth from the dbus format.
Now that authd can be imported we should not expose anything that isn't an API.
20d567f
to
ee0d2d8
Compare
This is the continuation of #626 that allows to have a single codebase to both parse and generate UI layouts from the client and broker sides.
Compared to the initial version of this change, now the types that we export are still based on the proto definitions, but we generate them with a new code generator that ensures that types can be exported and that does 1:1 copies when required.
Broker side: ubuntu/authd-oidc-brokers#234
UDENG-5522