package com.airlock.iam.authentication.api.domain.model.step;

import com.airlock.iam.flow.api.domain.model.step.FlowStep;
import com.airlock.iam.flow.api.domain.model.step.StepError;

public interface AuthenticationFlowStep extends AuthenticationMethodVerifyingFlowStep, FlowStep {
   static boolean isAuthFlowStep(FlowStep step) {
      return step instanceof AuthenticationFlowStep;
   }

   static AuthenticationFlowStep asAuthFlowStep(FlowStep step) {
      return (AuthenticationFlowStep)step;
   }

   enum GeneralAuthenticationStepError implements StepError {
      AUTHENTICATION_FAILED,
      NO_VALID_TOKEN,
      AUTH_METHOD_INACTIVE;
   }
}
