GluuFederation / agama-smtp

Agama Project for Authn Techniques that rely on sending email
Apache License 2.0
1 stars 5 forks source link

feat(agama-smtp): project details #1

Open duttarnab opened 8 months ago

duttarnab commented 8 months ago

Sequence diagram

title User Email OTP flow 

actor User
participant Browser
participant jans-auth
participant SMTP Server
participant Email Client

User->Browser: Authz url with\n acr_values=agama\n&agama_flow=io.jans.agamaSmtp.main
Browser->jans-auth:
jans-auth->Browser: Submit email form
User->Browser: Enter and submit email
Browser->jans-auth:
jans-auth->jans-auth: check if user with same\n email already exists

alt user exists - authenticate user
jans-auth->jans-auth: generate OTP
jans-auth->jans-auth: sign OTP email using keys\n in smtp keystore 
jans-auth->SMTP Server: send email:
SMTP Server->Email Client:
Email Client->User: OTP
User->Browser: enter OTP
Browser->jans-auth: sending OTP (POST form)
jans-auth->jans-auth: validate OTP
alt OTP correct
jans-auth<->Browser: continue with OpenID code flow

else OTP incorrect
jans-auth->Browser: Ask OTP till reaching\n the maximum attempts
jans-auth<->Browser: Terminate the flow with message -\n You have reached max allowed attenpts
end
else user does not exists - Register new User
jans-auth->jans-auth: generate OTP
jans-auth->jans-auth: sign OTP email using keys\n in smtp keystore 
jans-auth->SMTP Server: send email:
SMTP Server->Email Client:
Email Client->User: OTP
User->Browser: enter OTP
Browser->jans-auth: sending OTP (POST form)
jans-auth->jans-auth: validate OTP

alt OTP correct
jans-auth->Browser: Registration form
Browser-> User:
User->Browser: Submit FN, MN, LN, email, password
Browser->jans-auth: POST user details
jans-auth->jans-auth: create user
jans-auth<->Browser: continue with OpenID code flow

else OTP incorrect
jans-auth->Browser: Ask OTP till reaching\n the maximum attempts
jans-auth<->Browser: Terminate the flow with message -\n You have reached max allowed attenpts

end
end
ossdhaval commented 4 days ago

@duttarnab If this diagram is good to be added to the readme, I can add it. Let me know.

duttarnab commented 3 days ago

Just the arrows in the generated sequence diagram are missing. The rest looks fine.

ossdhaval commented 1 day ago

Yeah, arrows are missing. Thanks for pointing out. :eyes: