composePluginTopology method

  1. @override
void composePluginTopology(
  1. Iterable<AuthServerPlugin<TContext>> plugins
)
override

Composes this plugin with the complete registered plugin topology.

Implementation

@override
void composePluginTopology(Iterable<AuthServerPlugin<TContext>> plugins) {
  _credentialPolicies
    ..clear()
    ..addAll(
      plugins
          .where((plugin) => !identical(plugin, this))
          .whereType<AuthCredentialPolicyContributor<TContext>>(),
    );
  _passwordPolicies
    ..clear()
    ..addAll(
      plugins
          .where((plugin) => !identical(plugin, this))
          .whereType<AuthPasswordPolicyContributor<TContext>>(),
    );
  _authenticationPolicies
    ..clear()
    ..addAll(
      plugins
          .where((plugin) => !identical(plugin, this))
          .whereType<AuthAuthenticationPolicyContributor<TContext>>(),
    );
  _twoFactor = plugins.whereType<TwoFactorPlugin<TContext>>().firstOrNull;
}