Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Play 2.6 #184

Open
JakubKahovec opened this issue Mar 16, 2017 · 24 comments
Open

Support for Play 2.6 #184

JakubKahovec opened this issue Mar 16, 2017 · 24 comments

Comments

@JakubKahovec
Copy link

Hello,

Do you plan to add support for Play 2.6.x

Thank you

@Daxten
Copy link

Daxten commented Jun 24, 2017

@t2v 2.6 is out now, will you update this library or will someone has to fork?

best regards

@djx314
Copy link

djx314 commented Jun 27, 2017

+1

@ezhulkov
Copy link

ezhulkov commented Jun 27, 2017

It would be highly appreciated
All of my projects are waiting for play2-auth with 2.6 support
+1

@dancetrain
Copy link

Looking forward to see 2.6 play framework support

@gakuzzzz
Copy link
Member

Thanks for open this issue.

And I'm sorry about the delay in integration to Play 2.5 over.

We are planning for create play2-auth version2 for Play2.6.

It will be DI based composition instead of mix-in based composition.

Probably it can not keep the source compatibility to play2-auth 0.x.

However I think that it is better way to integrate to current Play2 ecosystem.

I would like to hear your opinions about it.

best regards

@Daxten
Copy link

Daxten commented Jun 29, 2017

exactly what I thought,
RequestWithAttributes shouldn't be necessary anymore for example (see: https://www.playframework.com/documentation/2.6.x/Highlights26#Request-attributes)

@gakuzzzz
Copy link
Member

Yes, the next play2-auth should use the Request attribute API built-in Play2

@ezhulkov
Copy link

@gakuzzzz nice news, thank you
Just wondering, how are you going to compose injected actions? Inject many ActionBuilders into Controller and then use something like
builder1 andThen builder2
to get resulting Action?

@Daxten
Copy link

Daxten commented Jun 29, 2017

Hi,
https://github.com/Daxten/bay-scalajs.g8/blob/e447955c34123e04b0298db931b3e88a14abaa4b/server/app/controllers/Security.scala

this is me just trying out the actionBuilder stuff, but this can create nearly the same syntax then before

I would keep all the builders private or in a nested class and compose them before handing out the dsl to the user

@gakuzzzz
Copy link
Member

@ezhulkov @Daxten
This is an annoying problem.
ActionFunctions what have a same Request type can compose each other.
However Different Request type ActionFunctions can not compose.
And ActionBuilders can not compose other ActionBuilder.

To tell the truth, play2-auth has ActionFunctions what partially solves this problem
https://github.com/t2v/play2-auth/blob/master/README.ja.md#actionfunction-%E3%81%A8%E3%81%97%E3%81%A6%E3%81%AE%E5%88%A9%E7%94%A8 (Japanese)

Currently, I think that a better way to compose ActionBuilders is like the action-zipper approach.

@Daxten
Copy link

Daxten commented Jun 30, 2017

I don't think that should be a problem, you can use a sealed trait for example and create a more generic ActionFunction that way

@gakuzzzz
Copy link
Member

@Daxten
play2-auth's ActionBuilder should be enable to compose all ActionBuilders (provided by any libraries which play2-auth does not know)

@Daxten
Copy link

Daxten commented Jun 30, 2017

Ah! Now I see the problem, yes that's shitty design then by play :/

@ezhulkov
Copy link

ezhulkov commented Jun 30, 2017

Agree, action composition in play looks not very convinient

And ActionBuilders can not compose other ActionBuilder.

You can try to compose many ActionBuilders using andThen or compose syntax. Smth like this https://gist.github.com/ezhulkov/90d050a0701206d318999f2995f14472#file-testcontroller-scala-L8

May be it will be better and more concise to have current approach with super() calls and trait chains?

I've forked recently you stackable-controller and put some fixes to support play26 API.
Have not got a chance to get rid of RequestWithAttributes, but it's coming.

https://github.com/zeptolab/stackable-controller/blob/play26/core/src/main/scala/com/zeptolab/play2/stackc/StackableController.scala

@Daxten
Copy link

Daxten commented Jul 18, 2017

@gakuzzzz how are you doing? :)

@ezhulkov
Copy link

ezhulkov commented Sep 4, 2017

Any news? Scala 2.12.3 and play 2.6.3 are waiting for t2v support :)

@fdoumet
Copy link

fdoumet commented Sep 4, 2017

We built on Scala 2.12 and Play 2.6 using this branch.

@Daxten
Copy link

Daxten commented Oct 6, 2017

would you mind to release it somewhere (bintray is incredibly easy for example) ? @fdoumet

@nafg
Copy link

nafg commented Oct 15, 2017

@fdoumet can you open a pull request at least?

@ptrdom
Copy link

ptrdom commented Oct 19, 2017

@fdoumet some sort of release would be amazing!

@lu4nm3
Copy link

lu4nm3 commented Oct 31, 2017

What's the timeline looking like for releasing support for Play 2.6?

@andrewswan
Copy link

It's a few months later - any news please?

@Enalmada
Copy link

Enalmada commented Jun 18, 2018

Looks like there is a pull request: #191

I recommend you migrate to silhouette which I now use in all new projects. It's much more complicated but also well maintained. I would ask the author of play2-auth to just merge the pull request and be done with it. Don't worry about maintaining pre-2.6 branches as the current release version is fine for pre-2.6 and there are critical fixes in 2.6 that everyone should be up to by now anyway.

@fdoumet
Copy link

fdoumet commented May 11, 2019

If anybody's still looking for this, here are the details:
https://bintray.com/adenda/play2-auth/play2-auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests