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

OAuth Client Callback Support #100

Closed
michaelrsweet opened this issue Feb 17, 2021 · 3 comments · Fixed by #268
Closed

OAuth Client Callback Support #100

michaelrsweet opened this issue Feb 17, 2021 · 3 comments · Fixed by #268
Assignees
Labels
enhancement New feature or request priority-high
Milestone

Comments

@michaelrsweet
Copy link
Member

Add OAuth support to libcups.

@michaelrsweet michaelrsweet added enhancement New feature or request priority-high labels Feb 17, 2021
@michaelrsweet michaelrsweet self-assigned this Feb 17, 2021
@michaelrsweet michaelrsweet added this to the v2.4.0 milestone Feb 17, 2021
@michaelrsweet
Copy link
Member Author

Looks like for GNOME we want to use the GNOME Online Accounts D-Bus API: https://wiki.gnome.org/Projects/GnomeOnlineAccounts

@michaelrsweet michaelrsweet modified the milestones: v2.4, v2.5 Aug 31, 2021
@michaelrsweet michaelrsweet modified the milestones: v2.5, v2.4 Sep 13, 2021
@michaelrsweet
Copy link
Member Author

Retargeting this issue for just a basic client-side callback function, something like:

typedef const char *(*cups_oauth_cb_t)(http_t *http, const char *realm, const char *scope, const char *resource, void *user_data);

extern void cupsSetOAuthCallback(cups_oauth_cb_t cb, void *data) _CUPS_PUBLIC;

The "realm" and "scope" strings can be NULL and contain the corresponding values from the WWW-Authenticate value. "resource" is the resource path for the request. The return value is the Bearer token or NULL on error.

As for the password callback, the OAuth callback is per-thread.

@michaelrsweet michaelrsweet changed the title OAuth Support OAuth Client Callback Support Sep 13, 2021
@michaelrsweet
Copy link
Member Author

Renaming to cupsSetOAuthCB to match naming of cupsSetPasswordCB.

michaelrsweet added a commit that referenced this issue Oct 5, 2021
Initial implementation of OAuth client callback (Issue #100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant