Questo contenuto non è disponibile nella lingua selezionata.
Chapter 6. Authorizations
Name | Description |
---|---|
id | Unique OpenShift login that created this authorization token. |
scope | Scope of the authorization token to determine type of access. Scopes that are supported by a server are described in the ADD_AUTHORIZATION resource link and may be different for each server. |
note | A reminder description of what the authorization is for. |
expires_in | Total time in seconds before this authorization expires. Out of range values will be set to the maximum allowed time. |
expires_in_seconds | Remaining time in seconds before this authorization expires. |
reuse | Attempt to locate and reuse an authorization that matches the scope and note and has not yet expired. |
token | Authorization string that contains user credentials. |
scope
options that determine the type of access a user is granted with an authorization.
Name | Description |
---|---|
session | Grants a client the authority to perform all API actions against an account. Valid for one day. |
read | Access to the API is read-only, while authorization endpoints cannot be read. |
userinfo | Only read access to the /user API resource is provided. |
6.1. Add an Authorization Copia collegamentoCollegamento copiato negli appunti!
Add an authorization to the specified user account.
Method | URL Structure |
---|---|
POST | /broker/rest/user/authorizations |
Name | Description | Required | Default |
---|---|---|---|
scope | Scope of the authorization | No | userinfo |
note | Reminder description of authorization | No | |
expires_in | Number of seconds before authorization expires | No | -1 [a] |
reuse | Attempt to locate and reuse an authorization matching scope and note and has not expired | No | false |
[a]
For invalid values, the default is determined by the server.
|
curl -X POST https://openshift.redhat.com/broker/rest/user/authorizations --user user@example.com:password --data-urlencode scope=userinfo --data-urlencode note=This is my UPDATED note to myself --data-urlencode expires_in=-1 --data-urlencode reuse=false
$ curl -X POST https://openshift.redhat.com/broker/rest/user/authorizations --user user@example.com:password --data-urlencode scope=userinfo --data-urlencode note=This is my UPDATED note to myself --data-urlencode expires_in=-1 --data-urlencode reuse=false
The related resource links returned by the API have been left out for brevity. See Chapter 6, Authorizations for more information on all authorization parameters.