Ressource : Authorization
Ressource d'autorisation Discovery Engine.
| Représentation JSON |
|---|
{
"name": string,
"displayName": string,
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"serverSideOauth2": {
object ( |
| Champs | |
|---|---|
name |
Identifiant. Nom de ressource de l'autorisation. Format: Il doit s'agir d'une chaîne encodée au format UTF-8 d'une longueur maximale de 1 024 caractères. |
displayName |
Obligatoire. Nom à afficher de l'autorisation. Il doit s'agir d'une chaîne encodée au format UTF-8 d'une longueur maximale de 128 caractères. |
| Configuration de l'autorisation. Voici une liste de champs mutuellement exclusifs. Au maximum, un seul de ces champs sera défini dans une réponse : | |
serverSideOauth2 |
Configuration OAuth2 côté serveur. |
| Fin des champs mutuellement exclusifs. | |
ServerSideOAuth2
Configuration OAuth2.
| Représentation JSON |
|---|
{ "clientId": string, "clientSecret": string, "tokenUri": string, "authorizationUri": string, "scopes": [ string ], "pkceVerificationEnabled": boolean } |
| Champs | |
|---|---|
clientId |
Obligatoire. ID client OAuth2. |
clientSecret |
Obligatoire. Code secret du client OAuth2. Chiffré au repos. |
tokenUri |
Obligatoire. Point de terminaison HTTP qui échange une autorisation client contre un jeton d'accès. |
authorizationUri |
Obligatoire. URI vers laquelle l'utilisateur est redirigé lorsqu'il doit autoriser. Doit inclure tout ce qui est nécessaire pour une autorisation réussie : ID OAuth, indicateurs supplémentaires, etc. Exemple : Le paramètre |
scopes[] |
Facultatif. Habilitations à demander. Exemple : |
pkceVerificationEnabled |
Facultatif. Indique s'il faut activer la validation PKCE. https://datatracker.ietf.org/doc/html/rfc7636#section-3.1/ |
Méthodes |
|
|---|---|
|
Utilise le jeton d'actualisation stocké pour l'utilisateur identifié par ses identifiants d'utilisateur final et la ressource donnée, puis renvoie le jeton d'accès généré et ses détails. |
|
Crée une Authorization. |
|
Supprime une Authorization. |
|
Récupère une Authorization. |
|
Répertorie toutes les Authorization sous un Engine. |
|
Met à jour une Authorization. |
|
Échange les identifiants d'autorisation OAuth contre un jeton d'actualisation, puis stocke le jeton d'actualisation et les habilitations. |