by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 04 11:09

    akkie on gh-pages

    updated site (compare)

  • May 04 10:58

    akkie on gh-pages

    updated site (compare)

  • May 04 10:56

    akkie on gh-pages

    updated site (compare)

  • May 04 10:45

    akkie on master

    Fixed Auth0ProfileParser to get… (compare)

  • May 04 10:45
    akkie closed #578
  • May 04 10:44
    akkie commented #578
  • May 03 03:23
    coveralls commented #578
  • May 03 03:02
    ymotchi opened #578
  • Feb 27 17:45
    rorygraves commented #569
  • Feb 27 16:39

    akkie on gh-pages

    updated site (compare)

  • Feb 27 16:33

    akkie on gh-pages

    updated site (compare)

  • Feb 27 16:30
    akkie closed #569
  • Feb 27 16:30
    akkie commented #569
  • Feb 27 16:28

    akkie on 7.0.0

    (compare)

  • Feb 27 16:25

    akkie on master

    Release version 7.0.0 (compare)

  • Feb 10 19:05
    akkie commented #569
  • Feb 10 19:04

    akkie on 7.0.0-RC1

    (compare)

  • Feb 10 19:04

    akkie on 7.0.0-RC1

    (compare)

  • Feb 10 19:01

    akkie on 7.0.0-RC1

    Release version 7.0.0-RC1 (compare)

  • Feb 10 18:53

    akkie on gh-pages

    updated site (compare)

asedghi
@asedghi
So i can set authenticatorIdleTimeout in configuration at startup and it works fine. However if I set the same setting during user login it does nothing. the authenticatorIdleTimeout stays the same.
asedghi
@asedghi
I've also debug the code and can see that authenticator has the updated settings from remember me when it call authenticatorService.init(authenticator) .
asedghi
@asedghi
The issue for me is purely with JWT. Cookie auth works as expected.
Christian Kaps
@akkie
Remember me was only planned for cookies. Does it work with JWT in the previous version?
asedghi
@asedghi
its documented as "Can be used for remember me functionality" and is used in play-silhouette-angular-typescript.g8 looks like the last working version was 5.0.3. the code example above was from that code
Christian Kaps
@akkie
You say that the settings of the authenticator service has the remember me settings but that the generated token doesn't have the correct dates set? The serialize function uses the dates from the authenticator when creating the token. So if you change the dates in the authenticator, then the token should also contain these dates. Have you double checked your new updated values and the exp and iat claims in your token? Are they not the same?
asedghi
@asedghi
Christian, thank so much for taking time to help me out.
I see the code related to expirationDateTime and that works as expected. idleTimeout also makes makes it into the serialize. However, unserialize ignores authenticatorIdleTimeout and uses settings.authenticatorIdleTimeout
asedghi
@asedghi
I also see where iat and exp are set but It looks like idletimeout is entirely ignored. in the serialize method
Christian Kaps
@akkie
Yes, the idleTimeout is currently not stored in the JWT. We could introduce a new reserved claim idt and set the idle timeout during serialization. So we can extract it from the JWT during unserialization. Would you create a PR containing these changes with also some tests?
asedghi
@asedghi
Sure, should be simple enough. I'll take a stab at it over the weekend.
@ugobourdon
@ubourdon
Hi. Where can i find an example using OpenIDProvider ?
@ugobourdon
@ubourdon
Hi. When try to instanciate OpenIdProvider i have this error :
java.lang.NullPointerException: null
at com.mohiva.play.silhouette.impl.providers.SocialProvider$class.$init$(SocialProvider.scala:57)
Have you ever seen this ?
@ugobourdon
@ubourdon
ok thx. I'll go there to append more details
nafg
@nafg
This message was deleted
@ugobourdon
@ubourdon
@akkie Have you been able to reproduce reproduce my issue ? I really don't know how to do to instanciate my Provider ...
Aidar
@SunPj
Hi. I have prepared VueJs + Silhouette sample. Demo is on heroku https://vuejs-slihouette.herokuapp.com/
Github repo is https://github.com/SunPj/silhouette-vuejs-app
Hope someone can find that useful. I would be happy if you add it among samples in Silhouette website. Thanks
Christian Kaps
@akkie
@SunPj you can add a suggested edit on the website
Aidar
@SunPj
Thanks @akkie . Will do
neimspace11
@neimspace11

Hi @SunPj , thanks for creating VueJs + Silhouette sample. I have tried to build & run it locally, however receiving this error when trying to open localhost:9000:

No configuration setting found for key 'silhouette.csrfStateItemHandler.signer.key' at modules.SilhouetteModule.provideCSRFStateItemSigner(SilhouetteModule.scala:179)

Any ideas what I am missing ?

neimspace11
@neimspace11
@SunPj Nevermind the above question, as I sorted out myself (changing ENV variable did the trick).
Aidar
@SunPj
Hi @neimspace11 Sorry to hear that. There are some conf params that are wired to ENV pararms. Happy to hear that you solved the issue. Let me know if you have any questions.
neimspace11
@neimspace11

@SunPj Thank you for response. So I managed to launch the app on localhost:8080, however when trying to submit sign-in or registration I am receiving HTTP status code - 404 Not Found on front-end part (on backend app I don't receive any error logs)

POST http://localhost:8080/signIn 404

As backend is running on port :9000, could it be that some routing between front-end and backend is missing here.

Aidar
@SunPj
Hi @neimspace11 You should run both apps but use :9000 on your browser. Frontend part will be proxied by backend
neimspace11
@neimspace11

Yes, I just tried and I am receiving 500 Internal Server error
On backend part, the error logs are as following:

[error] a.a.ActorSystemImpl - Internal server error, sending 500 response
akka.http.impl.util.One2OneBidiFlow$OutputTruncationException: Inner flow was completed without producing result elements for 1 outstanding elements
at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
at akka.http.impl.util.One2OneBidiFlow$One2OneBidi

KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲1: anon$1
anon$4.onUpstreamFinish(One2OneBidiFlow.scala:97)
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:506)

Any ideas what could be wrong

Aidar
@SunPj
@neimspace11 Is there any other output?
@neimspace11 Do you have both frontent and backend parts running?
neimspace11
@neimspace11
Yes, both front-end and back-end parts are running.
1) Back-end part through sbt run and front-end part through npm run serve. Both parts are shown in terminal that they are running successfully
2) If I open localhost:8080, then no error is being received and landing page is being opened.
3) If I open localhost:9000, then I receive 500 Internal server error in browser and that error log for back-end part which i pasted before.
Aidar
@SunPj
@neimspace11 Could you try following
Create devEnv.conf file in <project_root>/conf directory and specify there your keys
play.filters.headers.contentSecurityPolicy = "*"

silhouette {
  csrfStateItemHandler.signer.key="..."
  oauth1TokenSecretProvider.signer.key="..."
  oauth1TokenSecretProvider.crypter.key="..."
  authenticator.sharedSecret="..."
}

sendgrid.api.key = "..."


play.crypto.secret="..."
neimspace11
@neimspace11
Okey, I will try that. Will let you know if it helped.
Aidar
@SunPj
Could you double check your conf files and all changes and make sure there is no any non utf8 symbols. That error says that the issue relates to parsing but I am not sure
neimspace11
@neimspace11
conf files indeed was the cause of that issue, so now that's solved
Aidar
@SunPj
@neimspace11 What was the cause of the issue? Was it non UTF8 symbol? Does everything work well now?
neimspace11
@neimspace11
@SunPj I removed all ENV parameters (no need for my local deployment) and it started to work. Now localhost:9000 opens fine and I can connect to PostgreSQL database.
Btw, was wondering if you have any plans to finish your todo list:
  • Integration Silholuette's social auth
  • Test heroku autodeployment
  • User management page for admin
Aidar
@SunPj
@neimspace11 I am working on them. Hope will finish User management page for admin by the end of this week
neimspace11
@neimspace11
Great! Keep up the good work !
Aidar
@SunPj
@neimspace11 User management functionality is already in place
Andrey Zhukov
@zulus23
Hello! I'm begginer in Silhouette. I have error: A binding to com.mohiva.play.silhouette.api.actions.SecuredErrorHandler was already configured at modules.SilhouetteModule.configure(SilhouetteModule.scala:41) and I don't know what's a problem, setup module is bind[UnsecuredErrorHandler].to[CustomUnsecuredErrorHandler]
bind[SecuredErrorHandler].to[CustomSecuredErrorHandler]
Aidar
@SunPj
@zulus23 Seems you are trying to define Guice binding for component that has already defined in Silhouette module. Just remove your one and error should go away
Andrey Zhukov
@zulus23
thanks. I protected index with silhouette.SecuredAction and in SecurityAction.scala I find class class SecuredErrorHandlerModule extends Module {
def bindings(environment: PlayEnv, configuration: Configuration) = {
Seq(
bind[SecuredErrorHandler].to[DefaultSecuredErrorHandler]
)
}
} and I think it's code don't give bind my SecuredErrorHandler.
Andrey Zhukov
@zulus23
Sorry. I found my error. I should add in application.config this rows disabled += "com.mohiva.play.silhouette.api.actions.SecuredErrorHandlerModule"
disabled += "com.mohiva.play.silhouette.api.actions.UnsecuredErrorHandlerModule"
neimspace11
@neimspace11
@SunPj Thanks!
Aidar
@SunPj
@neimspace11 I am going to integrate social login by the end of this week
neimspace11
@neimspace11
@SunPj Sounds perfect!

Btw, was testing the app locally and encountered following problem when trying to 'Sign In' with the user which is activated:

POST http://localhost:9000/signIn 500 (Internal Server Error)

On back-end receiving following error:

Caused by: com.mohiva.play.silhouette.api.exceptions.AuthenticatorInitializationException: [Silhouette][jwt-authenticator] Could not init authenticator: JWTAuthenticator(6434c722ab87ceb8c5b514e5d9659f47c2deb68cbd021786a1a8564ce3e4c7eb5116002584c7187fb81803dcae53eb0c453fdecccb4b87821eb6848d96bcd7a481504f4b5f1b1eb76abbea1915dc66570759f52caac81b5c0407777622f7408787fd5804a9c2e1f1516646bced070d3c806ccd001abbb52d07dee2f3b7f53162,LoginInfo(credentials,test@test.lv),2019-12-10T14:28:37.659+02:00,2019-12-11T02:28:37.659+02:00,None,None)

Any ideas, what could be wrong ?

Aidar
@SunPj
@neimspace11 Don't you use some existing database (used for another app) for new app with different secret keys?
neimspace11
@neimspace11
Hmm, nope. I have created a separate DB for this app. On DB level I can see that password is stored and user is activated, but when trying to log-in I am receiving this error.
Aidar
@SunPj
@neimspace11 Is there any additional info in your stack? Don't you have something like Caused by: com.nimbusds.jose.KeyLengthException: The secret length must be at least 256 bits?