Uso di allowSelfChange per aggiornare gli attributi del profilo

È possibile utilizzare l'API per modificare i propri attributi del profilo (ad esempio, un indirizzo di posta elettronica o una password) in un dominio di Identity impostando l'attributo allowSelfChange su true nel payload richieste o nel parametro della stringa di query URL. L'impostazione predefinita di questo attributo è false.

Utilizzare l'attributo allowSelfChange nel payload richieste per le operazioni riportate di seguito.

  • Utenti (PATCH, REPLACE)
  • UserCapabilityChanger (SOSTITUISCI)
  • UserLockedStateChanger (CREA)
  • UserPasswordChanger (SOSTITUISCI)
  • UserPasswordResetter (SOSTITUISCI)
  • UserStateChanger (PATCH)
  • UserStatusChanger (SOSTITUISCI)
  • UserDbCredentials (CREA)
  • ApiKeys (CREA, AGGIORNA)
  • AuthTokens (CREA, AGGIORNA)
  • CustomerSecretKeys (CREA, AGGIORNA)
  • OAuth2ClientCredentials (CREA, AGGIORNA)
  • SmtpCredentials (CREA, AGGIORNA)
  • SupportAccounts (CREA)
Utilizzare l'attributo allowSelfChange come parametro della stringa di query URL per l'operazione DELETE nelle seguenti API.
Nota

È necessario impostare allowSelfChange=true come parametro della stringa di query URL per le operazioni DELETE.
  • UserDbCredentials
  • ApiKeys
  • AuthTokens
  • CustomerSecretKeys
  • OAuth2ClientCredentials
  • SmtpCredentials
  • SupportAccounts

Richiesta di esempio: /Utenti

Operazione: PATCH /admin/v1/Users/<id>
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "path": "phoneNumbers",
            "value": [
                {
                    "type": "home",
                    "value": "555-555-0100"
                }
            ]
        },
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange",
            "value": true
        }
    ]
}

Richiesta di esempio: /UserCapabilitiesChanger

Operazione: PUT /admin/v1/UserCapabilitiesChanger/<id>
{
    "canUseApiKeys": true,
    "canUseAuthTokens": false,
    "canUseConsolePassword": true,
    "canUseCustomerSecretKeys": true,
    "canUseOAuth2ClientCredentials": true,
    "canUseSmtpCredentials": true,
    "canUseDbCredentials": true,
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:UserCapabilitiesChanger"
    ]
}

Richiesta di esempio: /UserLockedStateChanger

Operazione: POST /admin/v1/UserLockedStateChanger
{
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:UserLockedStateChanger"
    ],
    "userId": "<unique_ID>",
    "locked": false,
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true
}

Richiesta di esempio: /UserPasswordChanger

Operazione: PUT /admin/v1/UserPasswordChanger
{
    "password": "example-password",
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": [
      "urn:ietf:params:scim:schemas:oracle:idcs:UserPasswordChanger"
    ]
  }

Richiesta di esempio: /UserPasswordResetter

Operazione: PUT /admin/v1/UserPasswordResetter
{
    "schemas": [
      "urn:ietf:params:scim:schemas:oracle:idcs:UserPasswordResetter"
    ],
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true
  }

Richiesta di esempio: /UserStatusChanger

Operazione: PUT /admin/v1/UserStatusChanger
{
    "active": true,
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": [
      "urn:ietf:params:scim:schemas:oracle:idcs:UserStatusChanger"
    ]
  }

Richieste campioni: /ApiKeys

Operazione: POST /admin/v1/ApiKeys
{
    "user": {
        "value": "<unique_ID>"
    },
    "key": "-----BEGIN PUBLIC KEY-----<your_public_key>
 -----END PUBLIC KEY-----",
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:apikey"
    ]
}
Operazione: PATCH /admin/v1/ApiKeys/<id>
{
      "Operations": [
        {
          "op": "replace",
          "path": "description",
          "value": "<updated_api_key>"
        },
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange",
            "value": true
        }
      ],
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ]
    }
Operazione: DELETE /admin/v1/ApiKeys/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Richieste campioni: /SmtpCredentials

Operazione: POST /admin/v1/SmtpCredentials/<id>
{
    "description": "John's smtp credential",
    "user": {
        "value": "<unique_ID>"
    },
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:smtpCredential"
    ]
}
Operazione: PATCH /admin/v1/SmtpCredentials
{
      "Operations": [
        {
          "op": "replace",
          "path": "description",
          "value": "updated_credential_description"
        },
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange",
            "value": true
        }
      ],
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ]
    }

Operazione: DELETE /admin/v1/SmtpCredentials/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Richieste campioni: /AuthTokens

Operazione: POST /admin/v1/AuthTokens
{
    "description": "John's auth token",
    "user": {
        "value": "<unique_ID>"
    },
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": ["urn:ietf:params:scim:schemas:oracle:idcs:authToken"]
}
Operazione: PATCH /admin/v1/AuthTokens/<id>
{
      "Operations": [
        {
          "op": "replace",
          "path": "description",
          "value": "<updated_credential_description>"
        },
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange",
            "value": true
        }
      ],
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ]
    }

Operazione: DELETE /admin/v1/SmtpCredentials/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Richieste campioni: /CustomerSecretKeys

Operazione: POST /admin/v1/CustomerSecretKeys
{
    "diplayName": "Alice Customer Secret Key",
    "description": "Alice's Customer Secret Key",
    "user": {
        "value": "<unique_ID>"
    },
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:customerSecretKey"
    ]
}
Operazione: PATCH /admin/v1/CustomerSecretKeys/<id>
{
      "Operations": [
        {
          "op": "replace",
          "path": "description",
          "value": "<updated_credential_description>"
        },
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange",
            "value": true
        }
      ],
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ]
    }

Operazione: DELETE /admin/v1/CustomerSecretKeys/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Richieste campioni: /OAuth2ClientCredentials

Operazione: POST /admin/v1/OAuth2ClientCredentials
{
  "name": "User's oauth2 client credential",
  "scopes": [
    {
      "audience": "urn:opc:idm",
      "scope": "__myscopes__"
    }
  ],
  "user": {
    "value": "<unique_ID>"
  },
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true,
  "schemas": [
    "urn:ietf:params:scim:schemas:oracle:idcs:oauth2ClientCredential"
  ]
}
Operazione: PATCH /admin/v1/OAuth2ClientCredentials/<id>
{
      "Operations": [
        {
          "op": "replace",
          "path": "description",
          "value": "<updated_credential_description>"
        },
        {
            "op": "add",
            "path": "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange",
            "value": true
        }
      ],
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ]
    }

Operazione: DELETE /admin/v1/OAuth2ClientCredentials/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Richiesta di esempio: /SupportAccounts

Operazione: POST /admin/v1/SupportAccounts
{
    "schemas": [
        "urn:ietf:params:scim:schemas:oracle:idcs:supportAccount"
    ],
    "token": "dummy",
    "user": {
        "ocid": "ocid1.user.region1..<unique_ID>"
    },
    "urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User:allowSelfChange": true
}

Operazione: DELETE /admin/v1/ApiKeys/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true