Reputation: 123
I'm working in an implemenentation of authenticator with token using the JWTAuthenticator of Silhouette. For the sake of simplicity I decided to adapt the Silhouette Slick Seed Template which constitutes a very nice example for getting started. Making some slight changes in the code (I've followed Silhouette Angular Seed Template) I got an issue after the following code line
env.authenticatorService.init(authenticator).flatMap { v =>
... It seems like this implemented method "init" is the responsible of changing the value of some val result = Redirect(routes.ApplicationController.index()) to a proper route, like "GET /" in this case. When I run the JWTAuthenticator version I got the value Result(303, Map(Location -> /)) instead! (for the route defined in index)
Playing a little bit with the code in the authenticate definition (CredentialsAuthController.scala) you get this kind of Result(303, Map(Location -> /)) anywhere before the init method... So its like this "init" function allows you to get a proper route to redirect to. Is that correct?. So in basis of these results, my question is: Why after applying this init function doesn't give me the proper route?
If you are interested in the question please take a look to the jwtimpl branch at
https://github.com/renexdev/Silhouette-Slick-Seed-pg-jwt
Thanks for your time, ReneX
Upvotes: 0
Views: 94
Reputation: 123
So far its like the JWTAutheticator doesnt persist the authenticator. See the full discussion at https://groups.google.com/forum/#!topic/play-silhouette/hKg0ThjUEAI. I'll turn to Silhouette Angular Seed Template to use JWTAuthenticator. Thanks akkie!
Upvotes: 0