CreateOAuth2Client
Creates an OAuth2 client. For a confidential client the secret is generated server-side and returned in clear in plainSecret — this is the only time it is ever exposed.
Signature
mutation {
CreateOAuth2Client(id: ..., name: ..., grants: ..., isConfidential: ..., active: ...)
}
Retourne : OAuth2ClientSecret!
Arguments
| Nom | Type | Requis | Défaut | Description |
|---|---|---|---|---|
id | String! | ✓ | — | — |
name | String! | ✓ | — | — |
grants | [OAuth2Grant!]! | ✓ | — | — |
redirectUris | [String!] | — | Required with the AUTHORIZATION_CODE grant, refused without it. HTTPS, or plain HTTP towards 127.0.0.1 / [::1] only; on those, a * port (e.g. http://127.0.0.1:*/callback) accepts any port. | |
isConfidential | Boolean! | ✓ | — | — |
active | Boolean! | ✓ | — | — |
ownerId | ID | — | — | |
actAsUserId | ID | — | — | |
scopes | [String!] | — | Allowed scopes, validated against the catalogue. vasco:full cannot be granted. Omitted: no scope. | |
allowedOrigins | [String!] | — | Browser origins (https://host[:port], no path nor wildcard) allowed to call the API in CORS on behalf of this client. Plain HTTP only towards 127.0.0.1 or [::1]. Omitted: none. |
Exemple
mutation {
CreateOAuth2Client(
id: $id
name: $name
grants: $grants
isConfidential: $isConfidential
active: $active
) {
client {}
plainSecret
}
}