accessProvider.update()
Learn: Access providers |
---|
We recommend you use FSL to create and update access providers. See Access provider schema. |
Updates an access provider.
Description
The update()
method updates the provider with the object fields
and returns the updated provider. During the update, fields from object
are copied to the document, creating new fields or updating existing
fields. The operation is similar to a merge.
Only the fields included in object are updated, all other document fields aren’t updated. Fields with nested objects in object are merged with the identically named nested object in the document.
To remove a document field, set its value in object to null
.
Examples
AccessProvider.byName("someIssuer")?.update({
name: "someIssuer",
issuer: "https://example.com/",
roles: "customer"
})
{
name: "someIssuer",
coll: AccessProvider,
ts: Time("2099-06-25T15:00:27.295Z"),
jwks_uri: "https://example.com/.well-known/jwks.json",
roles: "customer",
issuer: "https://example.com/",
audience: "https://db.fauna.com/db/ysjowue14yyr1"
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!