Uso de allowSelfChange para actualizar atributos de perfil

Puede utilizar la API para cambiar sus propios atributos de perfil (por ejemplo, una dirección de correo electrónico o una contraseña) en un dominio de identidad definiendo el atributo allowSelfChange en true en el parámetro de cadena de consulta de URL o carga útil de la solicitud. Por defecto, este atributo se define en false.

Utilice el atributo allowSelfChange en la carga útil de solicitud para las siguientes operaciones:

  • Usuarios (PATCH, REPLACE)
  • UserCapabilityChanger (SUSTITUIR)
  • UserLockedStateChanger (CREAR)
  • UserPasswordChanger (SUSTITUIR)
  • UserPasswordResetter (SUSTITUIR)
  • UserStateChanger (PARCHE)
  • UserStatusChanger (SUSTITUIR)
  • UserDbCredentials (CREAR)
  • ApiKeys (CREAR, ACTUALIZAR)
  • AuthTokens (CREAR, ACTUALIZAR)
  • CustomerSecretKeys (CREAR, ACTUALIZAR)
  • OAuth2ClientCredentials (CREAR, ACTUALIZAR)
  • SmtpCredentials (CREAR, ACTUALIZAR)
  • SupportAccounts (CREAR)
Utilice el atributo allowSelfChange como parámetro de cadena de consulta de URL para la operación DELETE en las siguientes API.
Nota

Debe definir allowSelfChange=true como parámetro de cadena de consulta de URL para las operaciones DELETE.
  • UserDbCredentials
  • ApiKeys
  • AuthTokens
  • CustomerSecretKeys
  • OAuth2ClientCredentials
  • SmtpCredentials
  • SupportAccounts

Solicitud de muestra: /Usuarios

Operación: PARCHE /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
        }
    ]
}

Solicitud de muestra: /UserCapabilitiesChanger

Operación: 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"
    ]
}

Solicitud de muestra: /UserLockedStateChanger

Operación: 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
}

Solicitud de muestra: /UserPasswordChanger

Operación: 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"
    ]
  }

Solicitud de muestra: /UserPasswordResetter

Operación: 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
  }

Solicitud de muestra: /UserStatusChanger

Operación: 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"
    ]
  }

Solicitudes de muestra: /ApiKeys

Operación: 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"
    ]
}
Operación: PARCHE /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"
      ]
    }
Operación: DELETE /admin/v1/ApiKeys/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Solicitudes de muestra: /SmtpCredentials

Operación: 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"
    ]
}
Operación: PARCHE /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"
      ]
    }

Operación: DELETE /admin/v1/SmtpCredentials/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Solicitudes de muestra: /AuthTokens

Operación: 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"]
}
Operación: PARCHE /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"
      ]
    }

Operación: DELETE /admin/v1/SmtpCredentials/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Solicitudes de muestra: /CustomerSecretKeys

Operación: 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"
    ]
}
Operación: PARCHE /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"
      ]
    }

Operación: DELETE /admin/v1/CustomerSecretKeys/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Solicitudes de muestra: /OAuth2ClientCredentials

Operación: 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"
  ]
}
Operación: PARCHE /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"
      ]
    }

Operación: DELETE /admin/v1/OAuth2ClientCredentials/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true

Solicitud de muestra: /SupportAccounts

Operación: 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
}

Operación: DELETE /admin/v1/ApiKeys/e1eaf8a28e58485fb86f16f914fd08c7?allowSelfChange=true