View Source AshAuthentication.Igniter (ash_authentication v4.3.7)

Codemods for working with AshAuthentication

Summary

Functions

Adds an add on to the authentication.add_ons section of a resource

Adds a new add_on to the authentication.strategies section of a resource

Adds a new strategy to the authentication.strategies section of a resource

Adds a secret to a secret module that reads from application env

Adds a strategy to the authentication.strategies section of a resource

Returns true if the given resource defines an authentication add on with the provided name

Returns true if the given resource defines an authentication strategy with the provided name

Functions

add_add_on(igniter, resource, contents)

@spec add_add_on(
  Igniter.t(),
  Ash.Resource.t(),
  contents :: String.t()
) :: Igniter.t()

Adds an add on to the authentication.add_ons section of a resource

add_new_add_on(igniter, resource, type, name, contents)

@spec add_new_add_on(
  Igniter.t(),
  Ash.Resource.t(),
  type :: atom(),
  name :: atom(),
  contents :: String.t()
) :: Igniter.t()

Adds a new add_on to the authentication.strategies section of a resource

add_new_strategy(igniter, resource, type, name, contents)

@spec add_new_strategy(
  Igniter.t(),
  Ash.Resource.t(),
  type :: atom(),
  name :: atom(),
  contents :: String.t()
) :: Igniter.t()

Adds a new strategy to the authentication.strategies section of a resource

add_secret_from_env(igniter, module, resource, path, env_key)

@spec add_secret_from_env(Igniter.t(), module(), Ash.Resource.t(), [atom()], atom()) ::
  Igniter.t()

Adds a secret to a secret module that reads from application env

add_strategy(igniter, resource, contents)

@spec add_strategy(
  Igniter.t(),
  Ash.Resource.t(),
  contents :: String.t()
) :: Igniter.t()

Adds a strategy to the authentication.strategies section of a resource

defines_add_on(igniter, resource, constructor, name)

@spec defines_add_on(
  Igniter.t(),
  Ash.Resource.t(),
  constructor :: atom(),
  name :: atom()
) ::
  {Igniter.t(), true | false}

Returns true if the given resource defines an authentication add on with the provided name

defines_strategy(igniter, resource, constructor, name)

@spec defines_strategy(
  Igniter.t(),
  Ash.Resource.t(),
  constructor :: atom(),
  name :: atom()
) ::
  {Igniter.t(), true | false}

Returns true if the given resource defines an authentication strategy with the provided name