1

I want to authenticate on the client so I don't have to manage a session on the server. This seems to be possible with ember-cli-simple-auth, but I don't know the first thing about how to create a custom authenticator to pass login credentials to the backend API (Spring Java). I am only a couple months into Ember and ember-cli as well, so the flood of things to learn has been daunting.

There's plenty of stuff for authenticating with OAuth2 and such, but that's not what I need. This is an intranet application, so I just need to pass credentials to the server, the server authenticates with LDAP, and then has to return something (what, I'm not sure, that's something else I need to know) so that simple-auth can recognize the user as authenticated or not.

Again, sorry if I could have phrased something better. I'm at the stage where I hardly know how to ask the question, which is why I'm asking here.

halfer
  • 19,824
  • 17
  • 99
  • 186
redOctober13
  • 3,662
  • 6
  • 34
  • 61
  • this is the exact opposite of what you're asking since it doesn't deal with simple-auth, but there's a little bit about the csrf service he proposes that perhaps you could take in the concepts: https://www.youtube.com/watch?v=KzasJuhsTSs&index=13&list=PLLUBPLc28H8c8ihVHkYeRHe8OiB8P5WL0 – MilkyWayJoe Oct 22 '14 at 17:50
  • 1
    Here's an example of a (very simple) custom authenticator: https://github.com/simplabs/ember-simple-auth/blob/master/examples/6-custom-server.html#L118 – marcoow Oct 23 '14 at 06:24
  • Thanks @marcoow, I watched your Ember Munich video and was all over that repo yesterday. I got some help yesterday as well, so I plan to post an answer with relevant files once I get some spare time. I have a custom authenticator set up and working, so I think I just need a custom authorizer, and your example looks to fit the bill. I'm just not sure how to do it in ember-cli. – redOctober13 Oct 23 '14 at 15:27
  • In Ember ClI you'd just put the authenticator/authorizer in the "utils" folder and add an initializer that registers them with the container - see e.g. this question: http://stackoverflow.com/questions/26526960/how-to-use-a-custom-authorizer-and-custom-authenticator-for-ember-simple-auth-in/26527037?noredirect=1#comment41681200_26527037 – marcoow Oct 24 '14 at 09:53

0 Answers0