メインコンテンツへスキップ
PATCH
https://{tenantDomain}/api/v2
/
client-grants
/
{id}
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.UpdateClientGrantRequestContent{}
    client.ClientGrants.Update(
        context.TODO(),
        "id",
        request,
    )
}
{
  "allow_all_scopes": true,
  "allow_any_organization": true,
  "audience": "<string>",
  "authorization_details_types": [
    "<string>"
  ],
  "client_id": "<string>",
  "default_for": "third_party_clients",
  "id": "<string>",
  "is_system": true,
  "scope": [
    "<string>"
  ]
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

id
string
必須

更新するクライアントグラントの ID。

ボディ

allow_all_scopes
boolean | null

有効にすると、このグラントではリソースサーバーに設定されているすべてのスコープが許可されます。

allow_any_organization
boolean | null

このグラントで任意の組織を使用できるようにするかどうかを制御します

authorization_details_types
string[]

このクライアントグラントで許可される authorization_details の種類。

Required string length: 1 - 255
organization_usage
enum<string> | null

このグラントで組織をどのように使用できるかを制御します。

利用可能なオプション:
deny,
allow,
require,
null
scope
string[] | null

このクライアントグラントで許可されるスコープ。

Required string length: 1 - 280

レスポンス

クライアントグラントを正常に更新しました。

allow_all_scopes
boolean

有効にすると、リソースサーバーで設定されているすべてのスコープがこのグラントで許可されます。

allow_any_organization
boolean

有効にすると、このグラントでは任意の組織を使用できます。無効な場合(デフォルト)は、このグラントを対象の組織に明示的に割り当てる必要があります。

audience
string

このクライアントグラントのオーディエンス(API 識別子)。

Minimum string length: 1
authorization_details_types
string[]

このクライアントグラントで許可される authorization_details の種類。

Required string length: 1 - 255
client_id
string

クライアントの ID。

default_for
enum<string>
GA

このクライアントグラントを、指定したグループ内のすべてのクライアントのデフォルトとして適用します。指定できる値は third_party_clients のみで、これによりすべての third-party クライアントにグラントが適用されます。同じオーディエンスに対するクライアント単位のグラントが優先されます。client_id とは同時に使用できません。

利用可能なオプション:
third_party_clients
id
string

クライアントグラントの ID。

is_system
boolean

有効にすると、このグラントは Auth0 によって作成された特別なグラントになります。直接変更または削除することはできません。

organization_usage
enum<string>

このグラントで、クライアントクレデンシャル交換に組織を使用できるかどうかを定義します。

利用可能なオプション:
deny,
allow,
require
scope
string[]

このクライアントグラントで許可されるスコープ。

Minimum string length: 1
subject_type
enum<string>

このクライアントグラントで許可されるアプリケーションアクセスの種類。

利用可能なオプション:
client,
user