View Source AshAuthentication.Igniter (ash_authentication v4.2.5)

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

Link to this function

add_add_on(igniter, resource, contents)

View Source
@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

Link to this function

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

View Source
@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

Link to this function

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

View Source
@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

Link to this function

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

View Source
@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

Link to this function

add_strategy(igniter, resource, contents)

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

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

Link to this function

defines_add_on(igniter, resource, constructor, name)

View Source
@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

Link to this function

defines_strategy(igniter, resource, constructor, name)

View Source
@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