Class Hook
Hooks are secure, self-contained functions that allow you to customize the behavior of Auth0 when executed for selected extensibility points of the Auth0 platform. Auth0 invokes Hooks during runtime to execute your custom Node.js code.
Depending on the extensibility point, you can use Hooks with Database Connections and/or Passwordless Connections.
Example Usage
using Pulumi;
using Auth0 = Pulumi.Auth0;
class MyStack : Stack
{
public MyStack()
{
var myHook = new Auth0.Hook("myHook", new Auth0.HookArgs
{
Enabled = true,
Script = @"function (user, context, callback) {
callback(null, { user });
}
",
TriggerId = "pre-user-registration",
});
}
}
Inheritance
Inherited Members
Namespace: Pulumi.Auth0
Assembly: Pulumi.Auth0.dll
Syntax
public class Hook : CustomResource
Constructors
View SourceHook(String, HookArgs, CustomResourceOptions)
Create a Hook resource with the given unique name, arguments, and options.
Declaration
public Hook(string name, HookArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| HookArgs | args | The arguments used to populate this resource's properties |
| Pulumi.CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEnabled
Whether the hook is enabled, or disabled
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.Nullable<System.Boolean>> |
Name
Name of this hook
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
Script
Code to be executed when this hook runs
Declaration
public Output<string> Script { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
TriggerId
Execution stage of this rule. Can be credentials-exchange, pre-user-registration, post-user-registration, post-change-password, or send-phone-message
Declaration
public Output<string> TriggerId { get; }
Property Value
| Type | Description |
|---|---|
| Pulumi.Output<System.String> |
Methods
View SourceGet(String, Input<String>, HookState, CustomResourceOptions)
Get an existing Hook resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Hook Get(string name, Input<string> id, HookState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Pulumi.Input<System.String> | id | The unique provider ID of the resource to lookup. |
| HookState | state | Any extra arguments used during the lookup. |
| Pulumi.CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Hook |