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
@iOgre_gitlab Which Java version do you use?
iOgre
@iOgre_gitlab
@akkie 11
Silhouette is only tested with Java 8
iOgre
@iOgre_gitlab
so it will be better to use java 8?
Christian Kaps
@akkie
Yes
iOgre
@iOgre_gitlab
ok, after installing java 8
sbt run leads to:
[error] (*:update) sbt.ResolveException: unresolved dependency: com.atlassian.jwt#jwt-core;1.2.3: not found
one question - I will always face issues like this why trying to simply start application locally?
Christian Kaps
@akkie
You must add the resolver
jwt-core was hosted in jcenter. Now it seems that it is hosted again in the Atlassian repo
iOgre
@iOgre_gitlab
resolvers += "what to type here?" at "and here?"
Christian Kaps
@akkie
resolvers += "Atlassian Releases" at "https://maven.atlassian.com/public/"
iOgre
@iOgre_gitlab

@akkie
plugins.sbt content:
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

resolvers += "Atlassian Releases" at "https://maven.atlassian.com/public/"

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.1")

sbt run - same [error] unresolved dependency: com.atlassian.jwt#jwt-api;1.2.3: not found
build.properties
....
sbt.version=0.13.5
Christian Kaps
@akkie
@iOgre_gitlab I've cleaned my ivy cache. Checked out the master branch of the play-silhouette-seed project and called sbt update. It downloads all dependencies. The jwt-core dependency will be downloaded from bintray.
So the code and the settings works as expected.
What SBT version do you use? 0.13.5?
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