0

I am creating an application using Java EE.

I have created a table in a PostgreSQL database for the user data(username, password, role). I want to make a security realm or something like that in which to put some of the servlets. The goal is to generate a unique code and send it to the user number so that the user can login to the application. The purpose of this realm is to renforce the authentication mechanism.

The problem that I am having is that I don't know if there is a framework/API that can help me implementing this.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
Bouanani Meher
  • 107
  • 1
  • 3
  • 13

1 Answers1

3

You need to have access to some SMS provider. Most likely you will have to pay for it and most likely they provide HTTP REST-like API. You will need or simple URL class to make a request and send message (MT).

Receiving incoming messages is similar. Typically you have to expose some simple URL that the SMS provider will call when message is sent back to you. Servlet and public IP is sufficient to handle incoming (MO) traffic.

Look for SMS providers and sign contract with them. They will provide you documentation. Unfortunately there is no standard API. There is low-level SMPP but providers don't expose it typically.

There is no framework support I know of. But it's as simple as generating random password, storing it in DB, sending to user and reading it back when reply from customer comes back.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
  • Thank you for answering , I think that this is it what i will do, but there still some points to be cleared before i start. – Bouanani Meher Feb 18 '13 at 12:53