1. Packages
  2. Keycloak
  3. API Docs
  4. getAuthenticationExecution
Keycloak v5.3.0 published on Tuesday, Jan 9, 2024 by Pulumi

keycloak.getAuthenticationExecution

Explore with Pulumi AI

keycloak logo
Keycloak v5.3.0 published on Tuesday, Jan 9, 2024 by Pulumi

    This data source can be used to fetch the ID of an authentication execution within Keycloak.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Keycloak = Pulumi.Keycloak;
    
    return await Deployment.RunAsync(() => 
    {
        var realm = new Keycloak.Realm("realm", new()
        {
            RealmName = "my-realm",
            Enabled = true,
        });
    
        var browserAuthCookie = Keycloak.GetAuthenticationExecution.Invoke(new()
        {
            RealmId = realm.Id,
            ParentFlowAlias = "browser",
            ProviderId = "auth-cookie",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
    			Realm:   pulumi.String("my-realm"),
    			Enabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_ = keycloak.GetAuthenticationExecutionOutput(ctx, keycloak.GetAuthenticationExecutionOutputArgs{
    			RealmId:         realm.ID(),
    			ParentFlowAlias: pulumi.String("browser"),
    			ProviderId:      pulumi.String("auth-cookie"),
    		}, nil)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.keycloak.Realm;
    import com.pulumi.keycloak.RealmArgs;
    import com.pulumi.keycloak.KeycloakFunctions;
    import com.pulumi.keycloak.inputs.GetAuthenticationExecutionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var realm = new Realm("realm", RealmArgs.builder()        
                .realm("my-realm")
                .enabled(true)
                .build());
    
            final var browserAuthCookie = KeycloakFunctions.getAuthenticationExecution(GetAuthenticationExecutionArgs.builder()
                .realmId(realm.id())
                .parentFlowAlias("browser")
                .providerId("auth-cookie")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    realm = keycloak.Realm("realm",
        realm="my-realm",
        enabled=True)
    browser_auth_cookie = keycloak.get_authentication_execution_output(realm_id=realm.id,
        parent_flow_alias="browser",
        provider_id="auth-cookie")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const realm = new keycloak.Realm("realm", {
        realm: "my-realm",
        enabled: true,
    });
    const browserAuthCookie = keycloak.getAuthenticationExecutionOutput({
        realmId: realm.id,
        parentFlowAlias: "browser",
        providerId: "auth-cookie",
    });
    
    resources:
      realm:
        type: keycloak:Realm
        properties:
          realm: my-realm
          enabled: true
    variables:
      browserAuthCookie:
        fn::invoke:
          Function: keycloak:getAuthenticationExecution
          Arguments:
            realmId: ${realm.id}
            parentFlowAlias: browser
            providerId: auth-cookie
    

    Using getAuthenticationExecution

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAuthenticationExecution(args: GetAuthenticationExecutionArgs, opts?: InvokeOptions): Promise<GetAuthenticationExecutionResult>
    function getAuthenticationExecutionOutput(args: GetAuthenticationExecutionOutputArgs, opts?: InvokeOptions): Output<GetAuthenticationExecutionResult>
    def get_authentication_execution(parent_flow_alias: Optional[str] = None,
                                     provider_id: Optional[str] = None,
                                     realm_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetAuthenticationExecutionResult
    def get_authentication_execution_output(parent_flow_alias: Optional[pulumi.Input[str]] = None,
                                     provider_id: Optional[pulumi.Input[str]] = None,
                                     realm_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetAuthenticationExecutionResult]
    func GetAuthenticationExecution(ctx *Context, args *GetAuthenticationExecutionArgs, opts ...InvokeOption) (*GetAuthenticationExecutionResult, error)
    func GetAuthenticationExecutionOutput(ctx *Context, args *GetAuthenticationExecutionOutputArgs, opts ...InvokeOption) GetAuthenticationExecutionResultOutput

    > Note: This function is named GetAuthenticationExecution in the Go SDK.

    public static class GetAuthenticationExecution 
    {
        public static Task<GetAuthenticationExecutionResult> InvokeAsync(GetAuthenticationExecutionArgs args, InvokeOptions? opts = null)
        public static Output<GetAuthenticationExecutionResult> Invoke(GetAuthenticationExecutionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthenticationExecutionResult> getAuthenticationExecution(GetAuthenticationExecutionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: keycloak:index/getAuthenticationExecution:getAuthenticationExecution
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ParentFlowAlias string
    The alias of the flow this execution is attached to.
    ProviderId string
    The name of the provider. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. This was previously known as the "authenticator".
    RealmId string
    The realm the authentication execution exists in.
    ParentFlowAlias string
    The alias of the flow this execution is attached to.
    ProviderId string
    The name of the provider. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. This was previously known as the "authenticator".
    RealmId string
    The realm the authentication execution exists in.
    parentFlowAlias String
    The alias of the flow this execution is attached to.
    providerId String
    The name of the provider. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. This was previously known as the "authenticator".
    realmId String
    The realm the authentication execution exists in.
    parentFlowAlias string
    The alias of the flow this execution is attached to.
    providerId string
    The name of the provider. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. This was previously known as the "authenticator".
    realmId string
    The realm the authentication execution exists in.
    parent_flow_alias str
    The alias of the flow this execution is attached to.
    provider_id str
    The name of the provider. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. This was previously known as the "authenticator".
    realm_id str
    The realm the authentication execution exists in.
    parentFlowAlias String
    The alias of the flow this execution is attached to.
    providerId String
    The name of the provider. This can be found by experimenting with the GUI and looking at HTTP requests within the network tab of your browser's development tools. This was previously known as the "authenticator".
    realmId String
    The realm the authentication execution exists in.

    getAuthenticationExecution Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ParentFlowAlias string
    ProviderId string
    RealmId string
    Id string
    The provider-assigned unique ID for this managed resource.
    ParentFlowAlias string
    ProviderId string
    RealmId string
    id String
    The provider-assigned unique ID for this managed resource.
    parentFlowAlias String
    providerId String
    realmId String
    id string
    The provider-assigned unique ID for this managed resource.
    parentFlowAlias string
    providerId string
    realmId string
    id str
    The provider-assigned unique ID for this managed resource.
    parent_flow_alias str
    provider_id str
    realm_id str
    id String
    The provider-assigned unique ID for this managed resource.
    parentFlowAlias String
    providerId String
    realmId String

    Package Details

    Repository
    Keycloak pulumi/pulumi-keycloak
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the keycloak Terraform Provider.
    keycloak logo
    Keycloak v5.3.0 published on Tuesday, Jan 9, 2024 by Pulumi