Show / Hide Table of Contents

Class ClientGrant

Auth0 uses various grant types, or methods by which you grant limited access to your resources to another entity without exposing credentials. The OAuth 2.0 protocol supports several types of grants, which allow different types of access. This resource allows you to create and manage client grants used with configured Auth0 clients.

Example Usage

using Pulumi;
using Auth0 = Pulumi.Auth0;

class MyStack : Stack
{
public MyStack()
{
    var myClient = new Auth0.Client("myClient", new Auth0.ClientArgs
    {
    });
    var myResourceServer = new Auth0.ResourceServer("myResourceServer", new Auth0.ResourceServerArgs
    {
        Identifier = "https://api.example.com/client-grant",
        Scopes = 
        {
            new Auth0.Inputs.ResourceServerScopeArgs
            {
                Description = "Create foos",
                Value = "create:foo",
            },
            new Auth0.Inputs.ResourceServerScopeArgs
            {
                Description = "Create bars",
                Value = "create:bar",
            },
        },
    });
    var myClientGrant = new Auth0.ClientGrant("myClientGrant", new Auth0.ClientGrantArgs
    {
        Audience = myResourceServer.Identifier,
        ClientId = myClient.Id,
        Scopes = 
        {
            "create:foo",
        },
    });
}

}
Inheritance
System.Object
Pulumi.Resource
Pulumi.CustomResource
ClientGrant
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 ClientGrant : CustomResource

Constructors

View Source

ClientGrant(String, ClientGrantArgs, CustomResourceOptions)

Create a ClientGrant resource with the given unique name, arguments, and options.

Declaration
public ClientGrant(string name, ClientGrantArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ClientGrantArgs 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

Audience

String. Audience or API Identifier for this grant.

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

ClientId

String. ID of the client for this grant.

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

Scopes

List(String). Permissions (scopes) included in this grant.

Declaration
public Output<ImmutableArray<string>> Scopes { get; }
Property Value
Type Description
Pulumi.Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, ClientGrantState, CustomResourceOptions)

Get an existing ClientGrant resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ClientGrant Get(string name, Input<string> id, ClientGrantState 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.

ClientGrantState state

Any extra arguments used during the lookup.

Pulumi.CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ClientGrant
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.