Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 12 2021 11:51
    akkie closed #493
  • Sep 12 2021 11:51
    akkie closed #545
  • Sep 12 2021 11:51
    akkie closed #551
  • Sep 12 2021 11:46

    akkie on master

    Update README.md (compare)

  • Sep 12 2021 11:46

    akkie on master

    Update README.md (compare)

  • Jun 22 2020 01:20
    asazernik commented #579
  • Jun 22 2020 01:07
    asazernik edited #579
  • Jun 22 2020 01:01
    asazernik opened #579
  • May 04 2020 11:09

    akkie on gh-pages

    updated site (compare)

  • May 04 2020 10:58

    akkie on gh-pages

    updated site (compare)

  • May 04 2020 10:56

    akkie on gh-pages

    updated site (compare)

  • May 04 2020 10:45

    akkie on master

    Fixed Auth0ProfileParser to get… (compare)

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

    akkie on gh-pages

    updated site (compare)

  • Feb 27 2020 16:33

    akkie on gh-pages

    updated site (compare)

  • Feb 27 2020 16:30
    akkie closed #569
Christian Kaps
@akkie
Maybe you should call ./scripts/sbt update
That uses the project SBT version 1.1.6
iOgre
@iOgre_gitlab
./scripts/sbt from user directory? I'm using windows
iOgre
@iOgre_gitlab

@akkie [info] play.api.Play - Application started (Dev)
java.lang.UnsupportedClassVersionError: controllers/routes has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I've installed jdk-8u191-windows-x64 - the version of jdk/jre is too high?

damn, the java/scala development is way too clumsy that .net
Christian Kaps
@akkie
I think that error comes from the case that you have compiled the code previously with a higher Java version. sbt cleanshould do the trick
That removes all your compiled class files
If that not helps,remove the target directories
iOgre
@iOgre_gitlab
aha

[info] play.api.Play - Application started (Dev)
java.lang.UnsupportedClassVersionError: controllers/routes has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

same issue after sdk clean and removing target directory (

iOgre
@iOgre_gitlab
all ok ) thank you
Christian Kaps
@akkie
Please remove the complete project directory. Remove also the ivy directory in your windows home directory. Download an actual sbt version. Checkout the master branch of the play-silhouette-seed project. Change into the project directory and run sbt run
OK, fine
iOgre
@iOgre_gitlab
I have oauth2 authorization server, and can obtain access_code from it
also, I have spring-based rest service, which authorizes with this token (via authorization: Bearer {token})
to implement the same via silhouette, I should implement new OAuth2Provider? is any docs for this?
Christian Kaps
@akkie
@iOgre_gitlab Yes, create a new provider. You should start from an existing. This is really straight forward. The concrete provider implementation contains only the parsing of the data returned from your OAuth2 authorization server. The basic OAuth2 handling is covered in the abstract OAuth2Provider implementation.
iOgre
@iOgre_gitlab

I have token received from oauth2 server
I can use this token in spring-based rest service

Which steps should I perform to use this token in play-based rest service? (maybe with silhouette)

iOgre
@iOgre_gitlab

@Provides
def provideJwtAuthenticatorService(
@Named("authenticator-crypter") crypter: Crypter,
idGenerator: IDGenerator,
configuration: Configuration,
clock: Clock): AuthenticatorService[JWTAuthenticator] = {

val config = configuration.underlying.as[JWTAuthenticatorSettings]("silhouette.jwt.authenticator")
val encoder = new CrypterAuthenticatorEncoder(crypter)
new JWTAuthenticatorService(config, None, encoder, idGenerator, clock)

}
...
silhouette.conf:
jwt.authenticator.headerName="X-Auth-Token"
jwt.authenticator.issuerClaim="PlaySilhouetteRest"
jwt.authenticator.encryptSubject=true
jwt.authenticator.authenticatorExpiry=12 hours
jwt.authenticator.sharedSecret="changeme"
jwt.authenticator.rememberMe.authenticatorExpiry=30 days
jwt.authenticator.rememberMe.authenticatorIdleTimeout=5 days
jwt.authenticator.crypter.key = "[changeme]" // A unique encryption key

Cannot generate a config value reader for type Option[Option[Seq[com.mohiva.play.silhouette.api.util.RequestPart.Value]]], because value readers cannot be auto-generated for types with type parameters. Consider defining your own ValueReader[Option[Option[Seq[com.mohiva.play.silhouette.api.util.RequestPart.Value]]]]
What I am doing wrong here?!

iOgre
@iOgre_gitlab

`def secured = silhouette.SecuredAction(WithProviderBTEnv#A).async { implicit request: SecuredRequest[BTEnv, AnyContent] =>

Future.successful(Ok("42"))

}andtrait BTEnv extends Env {
type I = User
type A = BearerTokenAuthenticator
}`

and
val ID = "myprovider"

and

why myProvider do not handle requests?
iOgre
@iOgre_gitlab
(sigh) nobody here (
iOgre
@iOgre_gitlab
anybody here?
iOgre
@iOgre_gitlab

If I have custom Provider, which extends OAuth2Provider
how should I inject this provider into action, to use BearerTokenAuth?

def secured = silhouette.SecuredAction(WithProviderBTEnv#A) { implicit request: SecuredRequest[BTEnv, AnyContent] =>

Ok("42")

}

iOgre
@iOgre_gitlab
=
iOgre
@iOgre_gitlab
Naftoli Gugenheim
@nafg
@iOgre_gitlab refactoring of play-silhouette to be web-framework-agnostic
iOgre
@iOgre_gitlab
did you use silhouette? can I ask you a question?
Naftoli Gugenheim
@nafg
@iOgre_gitlab yes
Nick Fellows
@halfhp
Is there a way to pass authorization failure details from an implementation of Authorization.isAuthorized (which simply returns true|false) to SecuredErrorHandler.onNotAuthorized(request)? The goal is to render an error response that includes the specific reason for the authorization failure.
Christian Kaps
@akkie
@halfhp The isAuthorized method returns a Future. So you can return a Future.failed(SomeException). Have you tried to return a NotAuthorizedEception? This should be caught by the error handler. Let me know if that works.
MarcoH
@mheuer
Heya - Looks like the current BaseGoogleProvider is still using the soon-to-be-deprecated Google+ API for the profile information. These will start to be shut down starting Jan 2019. Are there any plans underway to update Silhouette? Happy to help out if need be!
Nick Fellows
@halfhp
Hey @akkie - I was actually considering trying that, but was worried that it would potentially subvert some important part of the authz handling mechanism. I imagine you'd be the person to know if it were tho, so on your suggestion I'll give that a shot. thx!
Christian Kaps
@akkie
@mheuer yes, I know. Most of my spare free time goes to the framework agnostic version of Silhouette. Recently, I've started to implement the binding for Play. It's on a very early stage. But my plan is it to release the next version based of this binding. I'm not sure if it is realistic, because the next Play version is around the corner. There is a lot of work, because a lot has changed. There is no up-to-date documentation and I've dropped support for OAuth1 and OpenID.
Naftoli Gugenheim
@nafg
@akkie great to hear
MarcoH
@mheuer
Thanks for the feedback, @akkie, had a quick look at the auth flows and it seems we may not need the extra call to get the basic user profile info out of the id token itself after verifying it. Before I get started, do you have a rough timeframe when there might be the next release? I am sure that there are others that use Google+ auth today in a production setting that will benefit this API update.
Christian Kaps
@akkie
Is the new Google API based on OpenID Connect? I don't have a time frame. It's done when it's done. Sorry.
MarcoH
@mheuer
Okis, not too much pressure from my side. Just wanted to get a feel for a rough time frame. I don’t know yet about the specific flows, I will delve into this after Xmas and revert back. Merry Xmas or Happy Holidays!
Nick Fellows
@halfhp

I am sure that there are others that use Google+ auth today in a production setting that will benefit this API update.

@mheuer FWIW The company I work for will definitely be interested in using this. We're in the process of migrating away from Parse, which currently handles auth, with the intention of leveraging Silhouette there instead.

Christian Kaps
@akkie
Thanks, Merry Xmas too
MarcoH
@mheuer
Quick update, I had a look at the upcoming changes, and the actual auth flows do not change (phew), only the API we use to get the user profiles. I did a write-up and will start on this. Ticket to track the work is here: mohiva/play-silhouette#548 . PR should be ready in a couple of days.
MarcoH
@mheuer
Please review and any feedback or comments are most welcome.
Christian Kaps
@akkie
I'm a few days away from home. I'll look into it when I'm back.
MarcoH
@mheuer
Sure thing. Enjoy your time off!
Rory Graves
@rorygraves
Hi all, does anybody have an example of using a UserAwareAction with a file upload in a form submission - I'm trying to allow a user to submit a form with an image in it. effectively I want to do this silhouette.UserAwareAction.async(parse.multipartFormData) but the types and I'm not sure how to square the circle.
Rory Graves
@rorygraves
To answer my own question - the key is to ensure that the form is submitted as multipart/form-data and then the default body parse recognises it and allows you access to the data.
MarcoH
@mheuer
@rorygraves I was about to post you what I did to handle PDF and image uploads. But looks like you already have a solution. One note though, depending on the uploaded file size you may need to adjust the buffer of the parser. It is in our application.conf play.http.parser.maxMemoryBuffer = 512k for example.
Rory Graves
@rorygraves
Thanks @mheuer - That was probably my next question ;)
MarcoH
@mheuer
yvw!
threeel
@threeel
Hello everybody. Can silhouette be used in a multi-tenant single database ? Any comment would be appreciated