Show / Hide Table of Contents

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
System.Object
Pulumi.Resource
Pulumi.CustomResource
Hook
Inherited Members
Pulumi.CustomResource.Id
Pulumi.Resource.GetResourceType()
Pulumi.Resource.GetResourceName()
Pulumi.Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Auth0
Assembly: Pulumi.Auth0.dll
Syntax
public class Hook : CustomResource

Constructors

View Source

Hook(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 Source

Enabled

Whether the hook is enabled, or disabled

Declaration
public Output<bool?> Enabled { get; }
Property Value
Type Description
Pulumi.Output<System.Nullable<System.Boolean>>
View Source

Name

Name of this hook

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Pulumi.Output<System.String>
View Source

Script

Code to be executed when this hook runs

Declaration
public Output<string> Script { get; }
Property Value
Type Description
Pulumi.Output<System.String>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.