Code Monkey home page Code Monkey logo

agama-smtp's Introduction

Agama-SMTP logo

Agama SMTP Project

Agama Flows to register and authenticate a person via email.

Implementations

  • Jans Auth Server
  • Gluu Flex

Flow: Combined Authn / Registration

The main flow of this project is org.gluu.agama.smtp.main. In step one, the person enters their email address, to which the IDP sends an OTP code. After OTP verification, if the email address is known, the flow is successful. If the email address is new, the IDP displays a registration form.

Requirements

  1. A way to send email messages! If you are using Jans Auth Server, it has an SMTP service for sending email, which needs to be configured.

Testing

  1. You'll need an OpenID Connect test RP. You can try
  1. Send an OpenID Authn Request to your IDP using acr_values=agama and agama_flow=org.gluu.agama.smtp.main

Core Developers

Arnab
Arnab Dutta

License

This project is provided under the Apache 2.0 License

agama-smtp's People

Contributors

duttarnab avatar nynymike avatar

Stargazers

 avatar

Watchers

Ganesh Dutt Sharma avatar YuriyZ avatar  avatar Yuriy Movchan avatar  avatar gasmyr avatar  avatar

agama-smtp's Issues

feat(agama-smtp): project details

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.