1

I've been trying to implement the Silhouette library to provide some basic JWT authentication for my Angular frontend but am running into issues with a few No implementation for [...] was bound errors. To provide some context, I am trying to authenticate an admin login, which only consists of a username and password. I am using this (with an added LoginInfo field for Silhouette) to act as Silhouette's User authentication repository, and my AdminService also extends Silhouette's Identity Service.

I followed along some example projects that implement a basic Silhouette environment, but I have not gotten past the guice compiler errors. After writing my SilhouetteModule essentially verbatim what is in these example projects (this is the most recent one I could find), trying to inject even the CredentialsProvider into my controller class results in a few guice CreationExceptions that couldn't find bound implementations. These errors occurred for the AuthInfoRepository and the PasswordHasherRegistry.

Thanks for the help! It's been difficult to track down this error, and even though looking at example projects has gotten me farther with implementing Silhouette, I am pretty stuck at this point.

maxwellmattryan
  • 113
  • 1
  • 9
  • 1
    Have you looked at this? https://discourse.silhouette.rocks/t/play2-6-sv5-no-implementation-bound-provision-exception-for-di/146 – Stefan Aug 16 '20 at 01:35
  • ... simple fix by enabling the module in the application.conf file. Now I'm getting trouble with the module being instantiated by Play even after adding environment and configuration to the constructors. Thank you for your initial link though - I had not seen that particular forum post. – maxwellmattryan Aug 16 '20 at 04:37
  • 1
    I would recommend against using JWT for sessions. Check out this link for reasons why: http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/ – Matthias Berndt Aug 16 '20 at 13:52
  • Reading through the post now - it's very informative / insightful. Thanks for sharing! Can definitely say I'll be making some of those changes today haha – maxwellmattryan Aug 16 '20 at 14:40

0 Answers0