cups-oauth(1)

Name

cups-oauth - interact with an oauth/openid authorization server

Synopsis

cups-oauth --help
cups-oauth --version
cups-oauth [ -a OAUTH-URI ] [ -s SCOPE(S) ] authorize [RESOURCE]
cups-oauth [ -a OAUTH-URI ] clear [RESOURCE]
cups-oauth [ -a OAUTH-URI ] get-access-token [RESOURCE]
cups-oauth [ -a OAUTH-URI ] get-client-id
cups-oauth [ -a OAUTH-URI ] get-metadata [NAME]
cups-oauth [ -a OAUTH-URI ] get-user-id [RESOURCE] [NAME]
cups-oauth [ -a OAUTH-URI ] set-access-token [RESOURCE] TOKEN
cups-oauth [ -a OAUTH-URI ] set-client-data CLIENT-ID CLIENT-SECRET

Description

The cups-oauth utility interacts with an OAuth/OpenID authorization server. Authorizations are often linked to a resource (a printer URI, web page URL, etc.)

Options

The following options are recognized by cups-oauth:

--help
Show program usage.

--version
Show the CUPS version.

-a OAUTH-URI
Specifies the OAuth/OpenID authorization server URL.

-s SCOPE(S)
Specifies a space-delimited list of scope names to use when authorizing access. The default is to request authorization for all supported scopes.

Commands

Authorize

Starts an authorization workflow with the default web browser. If a resource URI is specified, the authorization is specific to that resource. The access token is send to the standard output on success.

Clear

Clears any authorization for the specified resource or for all resources if no resource URI is supplied.

Get-Access-Token

Output the current, unexpired access token, if any, to the standard output.

Get-Client-Id

Output the client ID string, if any, to the standard output.

Get-Metadata

Get the OAuth/OpenID authorization server metadata and send it to the standard output. If a name is specified, the output is just the value for the specified metadata.

Get-User-Id

Get the OpenID user ID information and send it to the standard output. If a name is specified, the output is just the named claim from the user ID.

Set-Access-Token

Set the access token (which is sometimes also called an API key) for the specified resource or for all resources.

Set-Client-Data

Set the client ID string and secret for an OAuth/OpenID authorization server.

Environment Variables

The CUPS_OAUTH_URI environment variable sets the default OAuth/OpenID authorization server URL.

The CUPS_OAUTH_SCOPES environment variable sets the default OAuth/OpenID scopes as a space-delimited list.

Notes

CUPS uses a redirect URI of "http://127.0.0.1/" for all authorization on the local system.

Examples

TBD

See Also

cups(1)

Copyright

Copyright © 2025 by OpenPrinting.