Authentication and Authorization experiences, designs and demos

Hi @gokul1, welcome!

You may want to consider starting a new thread as this one is very old. For starters though I’d recommend looking at ember-simple-auth. It’s still the best way to handle a lot of authentication related boilerplate in most cases.

I’m not familiar with JAAS myself but if it uses a username/password I’d think you could probably start with ESA’s password grant authenticator.

Hi, Is it possible to use JAAS authentication in Ember JS. If it’s possible ,Pls tell me “how to implement” Pls, can anyone help me,

Thank you,

Isn’t JAAS back-end related part? It will not be placed inside ember application. Try to use Ember Simple Auth. and please check Restricting access to images - #8 by b-arto for general overview.

@b-arto , Thank you for your response,

What you told is right, JAAS is used for back-end but I am using ember for front-end and servlet for back-end and what I wanted to know is, How to implement the username and password validation using JAAS authentication on the back-end and get my response in the front-end?..I am doing this because once the user is logged in and until he logs out, the page must open without repeated authentication… Example for that is the GMail.

Thank you,

Try first with simple solution to catch the idea. Here you have GitHub - simplabs/ember-simple-auth at 3.1.0-beta.0 example of user password authentication. Authenticated data are stored on client side in cookie or local storage, so after closing the tab and new open user is logged unitl log out or e.g. cookie expiration.

  1. Check how authentication works for client in Ember - return fake valid data e.g
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8

{
  "access_token":"2YotnFZFEjr1zCsicMWpAA",
  "token_type":"bearer",
  "expires_in":3600, // optional
  "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA" // optional
}

for authentication. Check how to restrict routes. Everything is in docs I sent you in the link.

  1. Expose on back-end the route to receive queries from front-end to authenticate user. Probalby there is or should be in your app connection between the route → controller (?) → JAAS. So only small contact point between Emebr’s front end and authentication on back-end is well formatted response’s JSON.