resolve method

  1. @override
ResolvedAuth resolve(
  1. String? getSecret(
    1. String name
    )
)
override

Returns the resolved auth for the first auth request that has all necessary secrets.

Implementation

@override
ResolvedAuth resolve(String? Function(String name) getSecret) {
  // Walk the auths in order, see if we have all secrets for any of them
  // if so, return the resolved auth for that auth.
  for (final auth in auths) {
    if (auth.haveSecrets(getSecret)) {
      return auth.resolve(getSecret);
    }
  }
  // If we get here, we don't have all the secrets for any of the auths.
  return throw MissingSecretsException(this);
}