View Source AshAuthentication.Strategy.Custom.Helpers (ash_authentication v4.1.0)

Helpers for use within custom strategies.

Summary

Functions

Update the add-on in the DSL state by name.

Update the strategy in the DSL state by name.

If there's any chance that an implementor may try and use actions genrated by your strategy programatically then you should register your actions with Ash Authentication so that it can find the appropriate strategy when needed.

Functions

Link to this function

put_add_on(dsl_state, strategy)

View Source
@spec put_add_on(dsl_state, AshAuthentication.Strategy.Custom.strategy()) :: dsl_state
when dsl_state: map()

Update the add-on in the DSL state by name.

This helper should only be used within transformers.

Link to this function

put_strategy(dsl_state, strategy)

View Source
@spec put_strategy(dsl_state, AshAuthentication.Strategy.Custom.strategy()) ::
  dsl_state
when dsl_state: map()

Update the strategy in the DSL state by name.

This helper should only be used within transformers.

Link to this function

register_strategy_actions(action, dsl_state, strategy)

View Source
@spec register_strategy_actions(
  action_or_actions,
  dsl_state,
  AshAuthentication.Strategy.Custom.strategy()
) :: dsl_state
when dsl_state: map(), action_or_actions: atom() | [atom()]

If there's any chance that an implementor may try and use actions genrated by your strategy programatically then you should register your actions with Ash Authentication so that it can find the appropriate strategy when needed.

The strategy can be retrieved again by calling AshAuthentication.Info.strategy_for_action/2.

This helper should only be used within transformers.