Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(agama-smtp): project details #1

Open
duttarnab opened this issue Jan 9, 2024 · 3 comments
Open

feat(agama-smtp): project details #1

duttarnab opened this issue Jan 9, 2024 · 3 comments
Assignees

Comments

@duttarnab
Copy link
Collaborator

duttarnab commented Jan 9, 2024

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
Copy link
Contributor

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

@duttarnab
Copy link
Collaborator Author

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

@ossdhaval ossdhaval self-assigned this Sep 23, 2024
@ossdhaval
Copy link
Contributor

Yeah, arrows are missing. Thanks for pointing out. 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants