Registering an additional OAuth client
Register additional OAuth clients to manage authentication for applications that need to interact with your Red Hat OpenShift Container Platform cluster.
-
To register additional OAuth clients:
$ oc create -f <(echo ' kind: OAuthClient apiVersion: oauth.openshift.io/v1 metadata: name: demo secret: "..." redirectURIs: - "http://www.example.com/" grantMethod: prompt ')where:
metadata.name-
Specifies the OAuth client name. This value is used as the
client_idparameter when making requests to<namespace_route>/oauth/authorizeand<namespace_route>/oauth/token. secret-
Specifies the secret value used as the
client_secretparameter when making requests to<namespace_route>/oauth/token. redirectURIs-
Specifies the list of valid redirect URIs. The
redirect_uriparameter specified in requests to<namespace_route>/oauth/authorizeand<namespace_route>/oauth/tokenmust be equal to or prefixed by one of these URIs. grantMethod-
Specifies the action to take when this client requests tokens and has not yet been granted access by the user. Use
autoto automatically approve the grant and retry the request, orpromptto prompt the user to approve or deny the grant.