tg123/sshpiper

how do I customize the authentication order

qimaoxin opened this issue · 2 comments

What I hope to achieve is that the user executes challenge after successful password verification and selects the upstream that the user has permission to access through challenge

My question is, I don't know how to jump to KeyboardInteractiveCallback after PasswordCallback

I hope you can understand what I mean and give me some help

image

tg123 commented
  1. NextAuthMethods return password only
  2. PasswordCallback return err to trigger next auth, set ctx flag if password is correct
  3. NextAuthMethods return keyboard-interactive if ctx contains password succ flag
  4. KeyboardInteractiveCallback return correct upstream by challenge

ok thanks @tg123