Beginner Question on Silhouette


#1

Hi All,

I’m planning to use Silhouette for the support of OAuth & JWT tokens. I have few questions on the same:

  1. I guess Silhouette should be used only with Scala. By any chance any bindings for Java is available?
  2. I want to start with implementing my own OAuth provider for generating refresh tokens. Is it possible?
  3. Also I want to use JWT tokens for access tokens for authorization purpose. Is it possible?
  4. I may need Google / Facebook OAuth in future, I guess it will be easy to integrate with the system.

Thanks for your time on this.


#2

Hi,

I guess Silhouette should be used only with Scala. By any chance any bindings for Java is available?

It’s currently Scala only.

I want to start with implementing my own OAuth provider for generating refresh tokens. Is it possible?

Yes, you can create your own client implementation in Silhouette.

Also I want to use JWT tokens for access tokens for authorization purpose. Is it possible?

Possible with the JWT authenticator.

I may need Google / Facebook OAuth in future, I guess it will be easy to integrate with the system.

Both providers are already implemented.

Best regards,
Christian


#3

Thanks for response.

Is there any examples for implementing own custom provider in github repo?


#4

You should distinguish if you talk from a provider (the backend part which issues the token) or the client part (which Silhouette provides).

For the backend part you could use: https://github.com/nulab/scala-oauth2-provider
The the client part you can use an existing provider from Silhouette and adapt it for your own provider. this should be really straight forward.