CreateAccessProvider
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
CreateAccessProvider( param_object )
Not available in this language yet.
Not available in this language yet.
Description
CreateAccessProvider
creates a new AccessProvider document, based on the
settings in param_object
, which can be used to control access to the
current database via a third-party identity provider (IdP) , such as
Auth0.
Parameters
Argument | Type | Definition and Requirements |
---|---|---|
|
The |
param_object
Field Name | Field Type | Definition and Requirements |
---|---|---|
|
A unique name for the AccessProvider. You can use this name to retrieve the AccessProvider later. |
|
|
An HTTPS URI for the IdP that you are using to grant access to Fauna. This is typically an account-/app-specific URI that your IdP provides. |
|
|
A valid HTTPS URI, which should serve the JSON Web Key that signs the JWT tokens from your IdP. |
|
|
Optional - Defines the roles that should be evaluated to determine access for a provided JWT token. When The usual use of
Per overlapping roles, any role that grants access means that the query involving a JWT token is processed, even if another Role might deny access. A Role-predicate object specifies a Role to potentially evaluate, whose evaluation is determined by the specified predicate function:
The The |
|
|
Optional - Contains user-defined metadata for the AccessProvider. It is provided for the developer to store AccessProvider-relevant information. |
Returns
An object containing the metadata about the results of CreateAccessProvider
operations.
Field Name | Field Type | Definition and Requirements |
---|---|---|
|
The reference is an automatically-generated, unique identifier within the database to the AccessProvider that was created. |
|
|
The timestamp, with microsecond resolution, associated with the creation of the AccessProvider. |
|
|
The name for this AccessProvider. |
|
|
The |
|
|
The |
|
|
A database-specific HTTP URI. Queries that should be authenticated
using a JWT token should use this URI, instead of the default
Every AccessProvider for the current database shares the same |
Examples
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
client.query(
q.CreateAccessProvider({
name: 'Auth0-myapp',
issuer: 'https://myapp.auth0.com/',
jwks_uri: 'https://myapp.auth0.com/.well-known/jwks.json',
})
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
{
ref: AccessProvider("Auth0-myapp"),
ts: 1604524688650000,
name: 'Auth0-myapp',
issuer: 'https://myapp.auth0.com/',
jwks_uri: 'https://myapp.auth0.com/.well-known/jwks.json',
audience: 'https://db.fauna.com/db/yxuihtdghybyy'
}
Not available in this language yet.
Not available in this language yet.
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!